{"openapi":"3.1.1","x-mint":{"mcp":{"enabled":true}},"info":{"title":"Crevio API V1","version":"1.0.0","description":"API for the Crevio creator platform — a multi-tenant SaaS for digital product sales.\nUses snake_case keys following Stripe conventions. All resource IDs are string IDs (e.g., \"prod_abc123\").\n\nAuthentication is a bearer token: `Authorization: Bearer $CREVIO_API_KEY`.\nList endpoints are cursor-paginated with `limit` and `starting_after`.\nWrites accept an `Idempotency-Key` header and are safe to retry.\n\nEvery response carries IETF RateLimit headers (`RateLimit`, `RateLimit-Policy`) so a client can\nself-throttle, and `Retry-After` on a 429. The quota is 600 requests per minute per credential.\n\nThe API is versioned in the URL path (`/v1`). Nothing is removed without in-band warning: a\ndeprecated operation is marked `\"deprecated\": true` here and serves `Deprecation` (RFC 9745),\n`Sunset` (RFC 8594) and `Link; rel=\"deprecation\"` headers for at least six months before it\nstops answering. See https://crevio.co/docs/developer/guides/versioning.\n","contact":{"email":"support@crevio.co","name":"Crevio Support","url":"https://crevio.co/docs"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"termsOfService":"https://crevio.co/legal/terms-of-service"},"x-api-lifecycle":{"current_major_version":"v1","versioning_scheme":"URL path","deprecation_policy_url":"https://crevio.co/docs/developer/guides/versioning","minimum_notice_days":183,"deprecation_headers":["Deprecation","Sunset","Link"]},"paths":{"/account":{"get":{"summary":"Get current account","description":"Returns information about the authenticated account","operationId":"getAccount","x-speakeasy-name-override":"get","tags":["Account"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Account information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.account.get();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update current account","description":"Updates the authenticated account's information","operationId":"updateAccount","x-speakeasy-name-override":"update","tags":["Account"],"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRequest"}}}},"responses":{"200":{"description":"Account updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Plan upgrade required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.account.update({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads":{"get":{"summary":"List ads","description":"Ads with metrics, scoped to the tenant's accounts.","operationId":"adsList","x-speakeasy-group":"ads","x-speakeasy-name-override":"list","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"}},{"name":"platform","in":"query","description":"Filter by platform: facebook, instagram, tiktok, linkedin, pinterest, google, twitter.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by status.","schema":{"type":"string"}},{"name":"campaign_id","in":"query","description":"Filter by platform campaign id.","schema":{"type":"string"}},{"name":"source","in":"query","description":"zernio (Crevio-created only) or all (incl. externally synced). Defaults to all.","schema":{"type":"string"}},{"name":"from","in":"query","description":"Start of date range (YYYY-MM-DD).","schema":{"type":"string"}},{"name":"to","in":"query","description":"End of date range (YYYY-MM-DD).","schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (1-based).","schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Ads.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create ad","description":"Create a standalone ad with its own creative.","operationId":"adsCreate","x-speakeasy-group":"ads","x-speakeasy-name-override":"create","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Ad to create.","properties":{"account_id":{"type":"string"},"ad_account_id":{"type":"string"},"name":{"type":"string"},"goal":{"type":"string"},"budget_amount":{"type":"number","description":"Budget for the new ad set (or campaign, with budget_level=campaign). Whole currency units, NOT cents: 20 = $20.00. Meta's own Marketing API takes this number in minor units, so it is an easy and expensive mix-up — 2000 here buys $2000.00 of ads, not $20.00."},"budget_type":{"type":"string","description":"`daily` or `lifetime`. A lifetime budget also needs `end_date`."},"headline":{"type":"string"},"body":{"type":"string"},"call_to_action":{"type":"string"},"link_url":{"type":"string"},"image_url":{"type":"string"}}}}}},"responses":{"201":{"description":"Created ad.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Created ad."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/ads/ad-accounts":{"get":{"summary":"List ad accounts","description":"Platform ad accounts (Meta, Google, TikTok…) under a connected channel.","operationId":"adsAdAccountsList","x-speakeasy-group":"ads.adAccounts","x-speakeasy-name-override":"list","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"ad_account_id","in":"query","description":"Platform ad account id (e.g. Meta act_…).","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Ad accounts.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.adAccounts.list({\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/ad-groups/{id}":{"get":{"summary":"Retrieve ad group","description":"One ad group (ad set), derived from the ad tree.","operationId":"adsAdGroupsGet","x-speakeasy-group":"ads.adGroups","x-speakeasy-name-override":"get","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform ad set id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Ad group.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Ad group."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.adGroups.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update ad group","description":"Update ad group budget / bid / schedule.","operationId":"adsAdGroupsUpdate","x-speakeasy-group":"ads.adGroups","x-speakeasy-name-override":"update","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform ad set id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Fields to update.","properties":{"platform":{"type":"string"},"budget":{"type":"object"},"bid_strategy":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated ad group.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Updated ad group."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.adGroups.update({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/ads/ad-groups/{id}/pause":{"post":{"summary":"Pause ad group","description":"Pause a single ad group.","operationId":"adsAdGroupsPause","x-speakeasy-group":"ads.adGroups","x-speakeasy-name-override":"pause","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform ad set id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Platform.","properties":{"platform":{"type":"string"}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.adGroups.pause({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/ad-groups/{id}/resume":{"post":{"summary":"Resume ad group","description":"Resume a single ad group.","operationId":"adsAdGroupsResume","x-speakeasy-group":"ads.adGroups","x-speakeasy-name-override":"resume","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform ad set id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Platform.","properties":{"platform":{"type":"string"}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.adGroups.resume({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/ads/audiences":{"get":{"summary":"List custom audiences","description":"Custom audiences for a connected account's ad account.","operationId":"adsAudiencesList","x-speakeasy-group":"ads.audiences","x-speakeasy-name-override":"list","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"ad_account_id","in":"query","description":"Platform ad account id (e.g. Meta act_…).","schema":{"type":"string"},"required":true},{"name":"platform","in":"query","description":"Filter by platform: facebook, instagram, tiktok, linkedin, pinterest, google, twitter.","schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Custom audiences.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.audiences.list({\n    accountId: \"<id>\",\n    adAccountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create custom audience","description":"Create a customer-list, retargeting, or lookalike audience (Meta).","operationId":"adsAudiencesCreate","x-speakeasy-group":"ads.audiences","x-speakeasy-name-override":"create","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Audience to create.","properties":{"account_id":{"type":"string"},"ad_account_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}}}}}},"responses":{"201":{"description":"Created audience.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Created audience."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.audiences.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/audiences/{id}":{"get":{"summary":"Retrieve custom audience","description":"One custom audience, with fresh platform metadata when available.","operationId":"adsAudiencesGet","x-speakeasy-group":"ads.audiences","x-speakeasy-name-override":"get","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Audience id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Audience.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Audience."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.audiences.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete custom audience","description":"Delete a custom audience.","operationId":"adsAudiencesDelete","x-speakeasy-group":"ads.audiences","x-speakeasy-name-override":"delete","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Audience id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.audiences.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/ads/audiences/{id}/users":{"post":{"summary":"Upload audience users","description":"Upload hashed user data (≤10k) to a customer-list audience.","operationId":"adsAudiencesAddUsers","x-speakeasy-group":"ads.audiences","x-speakeasy-name-override":"addUsers","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Audience id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Users to upload.","properties":{"users":{"type":"array","items":{"type":"object"}}}}}}},"responses":{"200":{"description":"Upload result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Upload result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.audiences.addUsers({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/boost":{"post":{"summary":"Boost a post","description":"Promote an existing published post as an ad.","operationId":"adsBoost","x-speakeasy-group":"ads","x-speakeasy-name-override":"boost","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Boost request.","properties":{"account_id":{"type":"string"},"ad_account_id":{"type":"string"},"post_id":{"type":"string"},"name":{"type":"string"},"goal":{"type":"string"},"budget":{"type":"object","description":"`{ amount, type }` — `type` is `daily` or `lifetime`. Whole currency units, NOT cents: 20 = $20.00. Meta's own Marketing API takes this number in minor units, so it is an easy and expensive mix-up — 2000 here buys $2000.00 of ads, not $20.00.","properties":{"amount":{"type":"number","description":"Whole currency units, NOT cents: 20 = $20.00. Meta's own Marketing API takes this number in minor units, so it is an easy and expensive mix-up — 2000 here buys $2000.00 of ads, not $20.00."},"type":{"type":"string","enum":["daily","lifetime"]}},"required":["amount","type"]}}}}}},"responses":{"201":{"description":"Created ad.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Created ad."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.boost({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/ads/business-centers":{"get":{"summary":"List TikTok Business Centers","description":"Business Centers for a connected TikTok Ads channel.","operationId":"adsAdAccountsListBusinessCenters","x-speakeasy-group":"ads.adAccounts","x-speakeasy-name-override":"listBusinessCenters","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Business centers.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.adAccounts.listBusinessCenters({\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/campaigns":{"get":{"summary":"List campaigns","description":"Campaigns with aggregate metrics, scoped to the tenant's accounts.","operationId":"adsCampaignsList","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"list","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"}},{"name":"ad_account_id","in":"query","description":"Platform ad account id (e.g. Meta act_…).","schema":{"type":"string"}},{"name":"platform","in":"query","description":"Filter by platform: facebook, instagram, tiktok, linkedin, pinterest, google, twitter.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by status.","schema":{"type":"string"}},{"name":"source","in":"query","description":"zernio (Crevio-created only) or all (incl. externally synced). Defaults to all.","schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (1-based).","schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Campaigns.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/campaigns/bulk-pause":{"post":{"summary":"Bulk pause campaigns","description":"Pause up to 50 campaigns in one call.","operationId":"adsCampaignsBulkPause","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"bulkPause","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Campaigns to pause.","properties":{"campaigns":{"type":"array"}}}}}},"responses":{"200":{"description":"Bulk result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Bulk result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.bulkPause({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/campaigns/bulk-resume":{"post":{"summary":"Bulk resume campaigns","description":"Resume up to 50 campaigns in one call.","operationId":"adsCampaignsBulkResume","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"bulkResume","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Campaigns to resume.","properties":{"campaigns":{"type":"array"}}}}}},"responses":{"200":{"description":"Bulk result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Bulk result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.bulkResume({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/ads/campaigns/{id}":{"get":{"summary":"Retrieve campaign","description":"One campaign (derived from the campaign list).","operationId":"adsCampaignsGet","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"get","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform campaign id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Campaign.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Campaign."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update campaign","description":"Update campaign budget / bid strategy (Meta).","operationId":"adsCampaignsUpdate","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"update","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform campaign id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Fields to update.","properties":{"platform":{"type":"string"},"budget":{"type":"object","description":"`{ amount, type }` — `type` is `daily` or `lifetime`. Whole currency units, NOT cents: 20 = $20.00. Meta's own Marketing API takes this number in minor units, so it is an easy and expensive mix-up — 2000 here buys $2000.00 of ads, not $20.00.","properties":{"amount":{"type":"number","description":"Whole currency units, NOT cents: 20 = $20.00. Meta's own Marketing API takes this number in minor units, so it is an easy and expensive mix-up — 2000 here buys $2000.00 of ads, not $20.00."},"type":{"type":"string","enum":["daily","lifetime"]}},"required":["amount","type"]},"bid_strategy":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated campaign.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Updated campaign."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.update({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true},"delete":{"summary":"Delete campaign","description":"Delete a campaign and its hierarchy (Meta).","operationId":"adsCampaignsDelete","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"delete","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform campaign id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Platform.","properties":{"platform":{"type":"string"}}}}}},"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.delete({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/ads/campaigns/{id}/ad-groups":{"get":{"summary":"List campaign ad groups","description":"The ad groups (ad sets) within a campaign.","operationId":"adsCampaignsListAdGroups","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"listAdGroups","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform campaign id.","schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Ad groups.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.listAdGroups({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/campaigns/{id}/ads":{"get":{"summary":"List campaign ads","description":"The ads within a campaign.","operationId":"adsCampaignsListAds","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"listAds","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform campaign id.","schema":{"type":"string"}},{"name":"platform","in":"query","description":"Filter by platform: facebook, instagram, tiktok, linkedin, pinterest, google, twitter.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by status.","schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (1-based).","schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Ads.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.listAds({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/campaigns/{id}/duplicate":{"post":{"summary":"Duplicate campaign","description":"Duplicate a campaign to scale a winner (Meta + TikTok).","operationId":"adsCampaignsDuplicate","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"duplicate","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Source platform campaign id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Duplication options.","properties":{"platform":{"type":"string"}}}}}},"responses":{"200":{"description":"Duplication result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Duplication result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.duplicate({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/ads/campaigns/{id}/pause":{"post":{"summary":"Pause campaign","description":"Pause every ad in a campaign.","operationId":"adsCampaignsPause","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"pause","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform campaign id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Platform.","properties":{"platform":{"type":"string"}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.pause({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/campaigns/{id}/resume":{"post":{"summary":"Resume campaign","description":"Resume every ad in a campaign.","operationId":"adsCampaignsResume","x-speakeasy-group":"ads.campaigns","x-speakeasy-name-override":"resume","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Platform campaign id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Platform.","properties":{"platform":{"type":"string"}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.campaigns.resume({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/ads/connect":{"post":{"summary":"Connect ads","description":"Connect ads for a platform (separate from posting). Required before campaigns/ads sync. Same-token platforms (facebook, instagram, linkedin, pinterest) need no extra OAuth; tiktok, twitter and googleads return an auth_url. ChatGPT ads (openaiads) have no OAuth: send an `api_key` from ChatGPT Ads Manager, which covers exactly one ad account.","operationId":"adsConnect","x-speakeasy-group":"ads","x-speakeasy-name-override":"connect","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"platform":{"type":"string","enum":["facebook","instagram","linkedin","tiktok","twitter","pinterest","googleads","openaiads"]},"account_id":{"type":"string","description":"Parent posting channel (sacct_…), for same-token platforms."},"api_key":{"type":"string","description":"openaiads only, and required there. API key from ChatGPT Ads Manager (Settings). OpenAI has no read-only scope, so the key carries full campaign write access. Posting a rotated key for the same ad account updates the connection in place. A key OpenAI rejects returns 422."},"ad_account_id":{"type":"string","description":"Scope sync to one Meta ad account (act_…)."},"redirect_url":{"type":"string"},"force":{"type":"boolean","description":"Re-run OAuth even though a connection already exists. Without it a same-token connection (facebook/instagram/linkedin/pinterest) keeps answering `already_connected` on its posting token, so a channel whose token lacks ads scopes can never be repaired."}},"required":["platform"]}}}},"responses":{"200":{"description":"Connection result (already_connected, account, or auth_url).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Account not activated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.connect({\n    platform: \"linkedin\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/connections":{"get":{"summary":"List ads connections","description":"The connected ad accounts (metaads, tiktokads, …) mirrored locally, with their sacct_ ids — referenceable by pixels and conversions.","operationId":"adsConnections","x-speakeasy-group":"ads","x-speakeasy-name-override":"connections","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Connected ad accounts.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SocialAccount"}},"has_more":{"type":"boolean"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Account not activated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.connections({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/conversions":{"post":{"summary":"Send conversions","description":"Send server-side conversion events (Meta CAPI / Google / LinkedIn).","operationId":"adsConversionsSend","x-speakeasy-group":"ads.conversions","x-speakeasy-name-override":"send","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Conversion events.","properties":{"account_id":{"type":"string"},"destination_id":{"type":"string"},"events":{"type":"array"},"test_code":{"type":"string"}}}}}},"responses":{"200":{"description":"Conversion result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Conversion result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.conversions.send({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/ctwa":{"post":{"summary":"Create Click-to-WhatsApp ad","description":"Create Click-to-WhatsApp ad(s) (Meta).","operationId":"adsCreateCtwaAd","x-speakeasy-group":"ads","x-speakeasy-name-override":"createCtwaAd","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"CTWA ad.","properties":{"account_id":{"type":"string"},"ad_account_id":{"type":"string"},"name":{"type":"string"}}}}}},"responses":{"201":{"description":"Created ad(s).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Created ad(s)."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.createCtwaAd({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/ads/lead-forms":{"get":{"summary":"List lead forms","description":"Lead-gen (Instant) forms (Meta).","operationId":"adsLeadFormsList","x-speakeasy-group":"ads.leadForms","x-speakeasy-name-override":"list","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Pagination cursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"Lead forms.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.leadForms.list({\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create lead form","description":"Create a lead-gen form (Meta).","operationId":"adsLeadFormsCreate","x-speakeasy-group":"ads.leadForms","x-speakeasy-name-override":"create","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Form to create.","properties":{"account_id":{"type":"string"},"name":{"type":"string"},"questions":{"type":"array"},"privacy_policy_url":{"type":"string"}}}}}},"responses":{"201":{"description":"Created form.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Created form."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.leadForms.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/lead-forms/{id}":{"get":{"summary":"Retrieve lead form","description":"One lead-gen form.","operationId":"adsLeadFormsGet","x-speakeasy-group":"ads.leadForms","x-speakeasy-name-override":"get","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Form id.","schema":{"type":"string"}},{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Lead form.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Lead form."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.leadForms.get({\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Archive lead form","description":"Archive a form (Meta has no hard delete).","operationId":"adsLeadFormsArchive","x-speakeasy-group":"ads.leadForms","x-speakeasy-name-override":"archive","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Form id.","schema":{"type":"string"}},{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.leadForms.archive({\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/ads/lead-forms/{id}/leads":{"get":{"summary":"List form leads","description":"Leads submitted against one form.","operationId":"adsLeadFormsListLeads","x-speakeasy-group":"ads.leadForms","x-speakeasy-name-override":"listLeads","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Form id.","schema":{"type":"string"}},{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Pagination cursor.","schema":{"type":"string"}},{"name":"since","in":"query","description":"Unix seconds.","schema":{"type":"string"}}],"responses":{"200":{"description":"Leads.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.leadForms.listLeads({\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/lead-forms/{id}/test-leads":{"post":{"summary":"Create test lead","description":"Seed a synthetic test lead.","operationId":"adsLeadFormsCreateTestLead","x-speakeasy-group":"ads.leadForms","x-speakeasy-name-override":"createTestLead","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Form id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Test lead.","properties":{"account_id":{"type":"string"},"field_data":{"type":"array"}}}}}},"responses":{"201":{"description":"Test lead.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Test lead."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.leadForms.createTestLead({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/leads":{"get":{"summary":"List leads","description":"Submitted leads across forms (Meta lead-gen CRM view).","operationId":"adsLeadsList","x-speakeasy-group":"ads.leads","x-speakeasy-name-override":"list","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"}},{"name":"form_id","in":"query","description":"Filter by form id.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"since","in":"query","description":"Unix seconds.","schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Pagination cursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"Leads.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.leads.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/pixels":{"get":{"summary":"List pixels","description":"Pixels / conversion actions / rules for an account.","operationId":"adsPixelsList","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"list","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"platform","in":"query","description":"Filter by platform: facebook, instagram, tiktok, linkedin, pinterest, google, twitter.","schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Pixels.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.list({\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create pixel","description":"Create a conversion destination (LinkedIn).","operationId":"adsPixelsCreate","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"create","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Pixel to create.","properties":{"account_id":{"type":"string"},"ad_account_id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"}}}}}},"responses":{"201":{"description":"Created pixel.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Created pixel."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/pixels/{id}":{"get":{"summary":"Retrieve pixel","description":"One pixel / conversion destination.","operationId":"adsPixelsGet","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"get","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Pixel id.","schema":{"type":"string"}},{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Pixel.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Pixel."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.get({\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update pixel","description":"Update a conversion destination.","operationId":"adsPixelsUpdate","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"update","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Pixel id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Fields to update.","properties":{"account_id":{"type":"string"},"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated pixel.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Updated pixel."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.update({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete pixel","description":"Delete a conversion destination.","operationId":"adsPixelsDelete","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"delete","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Pixel id.","schema":{"type":"string"}},{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.delete({\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/ads/pixels/{id}/associations":{"get":{"summary":"List pixel associations","description":"Campaigns linked to a pixel.","operationId":"adsPixelsListAssociations","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"listAssociations","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Pixel id.","schema":{"type":"string"}},{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Associations.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.listAssociations({\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Link pixel to campaigns","description":"Link a pixel to campaigns.","operationId":"adsPixelsAddAssociations","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"addAssociations","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Pixel id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Association request.","properties":{"account_id":{"type":"string"},"ad_account_id":{"type":"string"},"campaign_ids":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.addAssociations({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Unlink pixel from campaigns","description":"Unlink a pixel from campaigns.","operationId":"adsPixelsRemoveAssociations","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"removeAssociations","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Pixel id.","schema":{"type":"string"}},{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"ad_account_id","in":"query","description":"Platform ad account id (e.g. Meta act_…).","schema":{"type":"string"}},{"name":"campaign_ids","in":"query","description":"Campaign ids (repeatable).","schema":{"type":"string"}}],"responses":{"200":{"description":"Result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Result."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.removeAssociations({\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/pixels/{id}/metrics":{"get":{"summary":"Pixel metrics","description":"Conversion metrics for a destination.","operationId":"adsPixelsMetrics","x-speakeasy-group":"ads.pixels","x-speakeasy-name-override":"metrics","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Pixel id.","schema":{"type":"string"}},{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"ad_account_id","in":"query","description":"Platform ad account id (e.g. Meta act_…).","schema":{"type":"string"}},{"name":"start_date","in":"query","description":"YYYY-MM-DD.","schema":{"type":"string"}},{"name":"end_date","in":"query","description":"YYYY-MM-DD.","schema":{"type":"string"}},{"name":"granularity","in":"query","description":"daily or total.","schema":{"type":"string"}}],"responses":{"200":{"description":"Metrics.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Metrics."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pixels.metrics({\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/reports":{"get":{"summary":"Performance report","description":"Daily performance time-series for a connected account.","operationId":"adsReportsTimeline","x-speakeasy-group":"ads.reports","x-speakeasy-name-override":"timeline","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"ad_account_id","in":"query","description":"Platform ad account id (e.g. Meta act_…).","schema":{"type":"string"}},{"name":"platform","in":"query","description":"Filter by platform: facebook, instagram, tiktok, linkedin, pinterest, google, twitter.","schema":{"type":"string"}},{"name":"from","in":"query","description":"Start of date range (YYYY-MM-DD).","schema":{"type":"string"}},{"name":"to","in":"query","description":"End of date range (YYYY-MM-DD).","schema":{"type":"string"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Daily rows.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.reports.timeline({\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/targeting/reach-estimate":{"post":{"summary":"Estimate audience reach","description":"Pre-flight audience size for a targeting spec.","operationId":"adsTargetingReachEstimate","x-speakeasy-group":"ads.targeting","x-speakeasy-name-override":"reachEstimate","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Reach estimate request.","properties":{"account_id":{"type":"string"},"ad_account_id":{"type":"string"},"spec":{"type":"object"},"optimization_goal":{"type":"string"}}}}}},"responses":{"200":{"description":"Reach estimate.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Reach estimate."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.targeting.reachEstimate({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-read-only":true,"x-crevio-approval":"allow"}},"/ads/targeting/search":{"get":{"summary":"Search targeting options","description":"Search interests, locations, behaviors, or income targeting for audience building.","operationId":"adsTargetingSearch","x-speakeasy-group":"ads.targeting","x-speakeasy-name-override":"search","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"account_id","in":"query","description":"Connected ad-capable channel id (sacct_…).","schema":{"type":"string"},"required":true},{"name":"q","in":"query","description":"Search query.","schema":{"type":"string"},"required":true},{"name":"dimension","in":"query","description":"geo, interest, behavior, or income.","schema":{"type":"string"}},{"name":"geo_type","in":"query","description":"city, region, zip, or metro (for geo).","schema":{"type":"string"}},{"name":"country_code","in":"query","description":"ISO country code (for geo).","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Cursor for the next page — the `next_cursor` of the previous response","schema":{"type":"string"}}],"responses":{"200":{"description":"Targeting options.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.targeting.search({\n    accountId: \"<id>\",\n    q: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/{id}":{"get":{"summary":"Retrieve ad","description":"One ad with creative, targeting, status, and metrics. Accepts the Zernio id, Meta numeric id, or story/media id.","operationId":"adsGet","x-speakeasy-group":"ads","x-speakeasy-name-override":"get","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Ad id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Ad.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Ad."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update ad","description":"Live edits to an ad's budget, targeting, or name.","operationId":"adsUpdate","x-speakeasy-group":"ads","x-speakeasy-name-override":"update","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Ad id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Fields to update.","properties":{"budget":{"type":"object","description":"`{ amount, type }` — `type` is `daily` or `lifetime`. Whole currency units, NOT cents: 20 = $20.00. Meta's own Marketing API takes this number in minor units, so it is an easy and expensive mix-up — 2000 here buys $2000.00 of ads, not $20.00.","properties":{"amount":{"type":"number","description":"Whole currency units, NOT cents: 20 = $20.00. Meta's own Marketing API takes this number in minor units, so it is an easy and expensive mix-up — 2000 here buys $2000.00 of ads, not $20.00."},"type":{"type":"string","enum":["daily","lifetime"]}},"required":["amount","type"]},"targeting":{"type":"object"},"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated ad.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Updated ad."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.update({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true},"delete":{"summary":"Delete ad","description":"Cancel an ad (kept for history).","operationId":"adsDelete","x-speakeasy-group":"ads","x-speakeasy-name-override":"delete","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Ad id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/ads/{id}/analytics":{"get":{"summary":"Ad performance","description":"Per-ad performance with optional demographic breakdowns.","operationId":"adsAnalytics","x-speakeasy-group":"ads","x-speakeasy-name-override":"analytics","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Ad id.","schema":{"type":"string"}},{"name":"from","in":"query","description":"Start of date range (YYYY-MM-DD).","schema":{"type":"string"}},{"name":"to","in":"query","description":"End of date range (YYYY-MM-DD).","schema":{"type":"string"}},{"name":"breakdowns","in":"query","description":"Comma-separated: age, gender, country, …","schema":{"type":"string"}}],"responses":{"200":{"description":"Ad analytics.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Ad analytics."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.analytics({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/{id}/comments":{"get":{"summary":"Ad comments","description":"Comments on the ad's underlying post (Meta dark posts).","operationId":"adsComments","x-speakeasy-group":"ads","x-speakeasy-name-override":"comments","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Ad id.","schema":{"type":"string"}},{"name":"placement","in":"query","description":"facebook or instagram.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page.","schema":{"type":"integer"}},{"name":"cursor","in":"query","description":"Pagination cursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"Comments.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Resource object (snake_case passthrough from the ad platform)."}},"has_more":{"type":"boolean"},"url":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.comments({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/{id}/pause":{"post":{"summary":"Pause ad","description":"Pause a single ad.","operationId":"adsPause","x-speakeasy-group":"ads","x-speakeasy-name-override":"pause","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Ad id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Updated ad.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Updated ad."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.pause({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/ads/{id}/resume":{"post":{"summary":"Resume ad","description":"Resume a single ad.","operationId":"adsResume","x-speakeasy-group":"ads","x-speakeasy-name-override":"resume","tags":["Ads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Ad id.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Updated ad.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Updated ad."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Account not activated for ads (call POST /v1/socials/activate first).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.ads.resume({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/analytics":{"get":{"summary":"Get business overview","description":"Account-wide business pulse in one call: revenue, orders, leads, new customers, and live-site traffic over a date range, each compared against the immediately preceding period of equal length. Defaults to the last 7 days; the range cannot exceed 366 days. Use this as the starting point for any business review — drill into a specific site with GET /sites/{id}/analytics, and into records with the orders/customers list endpoints.","operationId":"getBusinessOverview","x-speakeasy-name-override":"overview","tags":["Analytics"],"security":[{"ApiKey":[]}],"parameters":[{"name":"start_date","in":"query","description":"Start of the date range (inclusive), as an ISO-8601 date (YYYY-MM-DD). Defaults to 7 days before end_date.","schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","description":"End of the date range (inclusive), as an ISO-8601 date (YYYY-MM-DD). Defaults to today.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Business overview for the requested period","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["business_overview"]},"period":{"type":"object","description":"The resolved date range the metrics cover.","properties":{"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"days":{"type":"integer"}},"required":["start_date","end_date","days"]},"previous_period":{"type":"object","description":"The comparison period: the range of equal length immediately before period.start_date.","properties":{"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"}},"required":["start_date","end_date"]},"currency":{"type":"string","description":"Lowercase ISO currency code all monetary amounts are expressed in (the account's display currency)."},"lifetime_revenue":{"type":"integer","description":"All-time revenue in the account currency, in the smallest currency unit (cents for USD)."},"revenue":{"type":"object","description":"Revenue in the account currency, in the smallest currency unit (cents for USD), with the preceding period of equal length for comparison and a per-day time series.","properties":{"total":{"type":"integer"},"previous_total":{"type":"integer"},"change_pct":{"type":["number","null"],"description":"Percent change vs. the previous period; null when the previous period was zero (no baseline)."},"by_day":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"amount":{"type":"integer","description":"Revenue for the day in the account currency, in the smallest currency unit."}},"required":["date","amount"]},"description":"Per-day series with one entry per day in the period; days with no activity are zero-filled."}},"required":["total","previous_total"]},"orders":{"type":"object","description":"Period totals with the preceding period of equal length for comparison and a per-day time series.","properties":{"total":{"type":"number"},"previous_total":{"type":"number"},"change_pct":{"type":["number","null"],"description":"Percent change vs. the previous period; null when the previous period was zero (no baseline)."},"by_day":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"number","description":"Orders created that day (excluding pending and failed)."}},"required":["date","count"]},"description":"Per-day series with one entry per day in the period; days with no activity are zero-filled."}},"required":["total","previous_total"]},"leads":{"type":"object","description":"Period totals with the preceding period of equal length for comparison and a per-day time series.","properties":{"total":{"type":"number"},"previous_total":{"type":"number"},"change_pct":{"type":["number","null"],"description":"Percent change vs. the previous period; null when the previous period was zero (no baseline)."},"by_day":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"number","description":"Leads captured that day."}},"required":["date","count"]},"description":"Per-day series with one entry per day in the period; days with no activity are zero-filled."}},"required":["total","previous_total"]},"new_customers":{"type":"object","description":"Period totals with the preceding period of equal length for comparison.","properties":{"total":{"type":"number"},"previous_total":{"type":"number"},"change_pct":{"type":["number","null"],"description":"Percent change vs. the previous period; null when the previous period was zero (no baseline)."}},"required":["total","previous_total"]},"refunds":{"type":"object","description":"Orders created in the period that have since been refunded or partially refunded. Attribution is by order date (refund timestamps are not tracked); amounts are in the account currency, in the smallest currency unit.","properties":{"count":{"type":"integer"},"previous_count":{"type":"integer"},"amount":{"type":"integer"},"previous_amount":{"type":"integer"}},"required":["count","previous_count","amount","previous_amount"]},"top_products":{"type":"array","description":"Top products by units sold over the period (units, not revenue — per-item revenue attribution is not tracked). Empty when nothing sold.","items":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Prefix id of the product (e.g. prod_abc123)."},"name":{"type":"string"},"units":{"type":"integer"},"orders":{"type":"integer","description":"Distinct orders containing the product."}},"required":["name","units","orders"]}},"traffic":{"type":["object","null"],"description":"Traffic for the account's live site; null when no site is deployed. Zeros may also mean analytics collection is temporarily degraded.","properties":{"site_id":{"type":"string","description":"Prefix id of the live site (e.g. site_abc123)."},"visitors":{"type":"object","description":"Period totals with the preceding period of equal length for comparison and a per-day time series.","properties":{"total":{"type":"number"},"previous_total":{"type":"number"},"change_pct":{"type":["number","null"],"description":"Percent change vs. the previous period; null when the previous period was zero (no baseline)."},"by_day":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"count":{"type":"number","description":"Unique visitors that day."}},"required":["date","count"]},"description":"Per-day series with one entry per day in the period; days with no activity are zero-filled."}},"required":["total","previous_total"]},"pageviews":{"type":"object","description":"Period totals with the preceding period of equal length for comparison.","properties":{"total":{"type":"number"},"previous_total":{"type":"number"},"change_pct":{"type":["number","null"],"description":"Percent change vs. the previous period; null when the previous period was zero (no baseline)."}},"required":["total","previous_total"]},"top_sources":{"type":"array","description":"Top traffic sources by unique visitors over the period.","items":{"type":"object","properties":{"source":{"type":"string"},"count":{"type":"integer"}},"required":["source","count"]}},"top_pages":{"type":"array","description":"Top pages by unique visitors over the period.","items":{"type":"object","properties":{"path":{"type":"string"},"count":{"type":"integer"}},"required":["path","count"]}}}}},"required":["object","period","previous_period","currency","lifetime_revenue","revenue","orders","leads","new_customers","refunds","top_products","traffic"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/approvals":{"get":{"summary":"List approvals","description":"Human-in-the-loop approvals for gated integration actions. Filter by `status`.","operationId":"listApprovals","x-speakeasy-name-override":"list","tags":["Approvals"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by status","schema":{"type":"string","enum":["pending_approval","executed","failed","denied"]}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Approval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.approvals.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/approvals/{id}":{"get":{"summary":"Get an approval","description":"Fetch one approval, including its result or error once resolved.","operationId":"getApproval","x-speakeasy-name-override":"get","tags":["Approvals"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Approval id (apr_...)","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.approvals.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/approvals/{id}/approve":{"post":{"summary":"Approve an action","description":"Approves and replays the exact frozen action through the shared executor. A 200 means the approval was resolved; the returned object is `executed` (with `result`) or `failed` (with `error`). The Crevio agent can never approve: its calls are refused with 403 `approval_requires_user`.","operationId":"approveApproval","x-speakeasy-name-override":"approve","tags":["Approvals"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Approval id (apr_...)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.approvals.approve({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/approvals/{id}/deny":{"post":{"summary":"Deny an action","description":"Denies the action (never replayed). Records the optional reason and unblocks the originating chat turn if any.","operationId":"denyApproval","x-speakeasy-name-override":"deny","tags":["Approvals"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Approval id (apr_...)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Optional reason recorded on the approval"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.approvals.deny({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/audio/generate":{"post":{"summary":"Generate audio","description":"Submits an asynchronous audio (text-to-speech) generation job to the fal.ai queue and returns the queued job immediately. Poll `GET /v1/jobs/{id}` or `GET /v1/audio/{id}` for status and results. Credits are charged only when the job completes successfully.","operationId":"generateAudio","x-speakeasy-name-override":"generate","tags":["Audio"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudioGenerateRequest"}}}},"responses":{"202":{"description":"Generation job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.audio.generate({\n    input: {\n      text: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/audio/models":{"get":{"summary":"List audio models","description":"Lists the audio (text-to-speech) generation models available to `POST /v1/audio/generate`, enriched with live fal.ai pricing.","operationId":"listAudioModels","x-speakeasy-name-override":"listModels","tags":["Audio"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"List of audio models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_GenerationModel"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.audio.listModels();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/audio/{id}":{"get":{"summary":"Get audio job","description":"Convenience alias for `GET /v1/jobs/{id}` that asserts the job is an audio generation job (404 otherwise).","operationId":"getAudioJob","x-speakeasy-name-override":"get","tags":["Audio"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Job details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.audio.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/auth/keys":{"get":{"summary":"List API keys","description":"Returns the API keys for the current account. The secret is never returned here—only the last four characters (`last4`).","operationId":"listApiKeys","x-speakeasy-name-override":"list","tags":["ApiKeys"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_ApiKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.apiKeys.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create API key","description":"Creates a new API key. The full secret (`token`) is returned only in this response—store it securely, it cannot be retrieved again. Only an account admin on a plan with API access can create keys (`402 plan_required` otherwise), and OAuth tokens cannot create them (`403 insufficient_scope`).","operationId":"createApiKey","x-speakeasy-name-override":"create","tags":["ApiKeys"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateRequest"}}}},"responses":{"201":{"description":"API key created (includes the full secret)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.apiKeys.create();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/auth/keys/{id}":{"delete":{"summary":"Revoke API key","description":"Permanently revokes (deletes) an API key. Any request authenticating with it afterward fails.","operationId":"revokeApiKey","x-speakeasy-name-override":"revoke","tags":["ApiKeys"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"API key revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.apiKeys.revoke({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/blog_categories":{"get":{"summary":"List blog categories","description":"Returns a list of blog categories for the current account","operationId":"listBlogCategories","x-speakeasy-name-override":"list","tags":["BlogCategories"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","description":"Search by category name","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of blog categories","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_BlogCategory"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.blogCategories.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/blog_categories/{id_or_slug}":{"get":{"summary":"Get blog category","description":"Returns a specific blog category","operationId":"getBlogCategory","x-speakeasy-name-override":"get","tags":["BlogCategories"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Blog category details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogCategory"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.blogCategories.get({\n    idOrSlug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/blog_posts":{"get":{"summary":"List blog posts","description":"Returns a list of blog posts, optionally filtered by status","operationId":"listBlogPosts","x-speakeasy-name-override":"list","tags":["BlogPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by status: draft, published, scheduled, archived","schema":{"type":"string","enum":["draft","published","scheduled","archived"]}},{"name":"category","in":"query","description":"Filter by category slug","schema":{"type":"string"}},{"name":"query","in":"query","description":"Search by title","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of blog posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_BlogPost"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.blogPosts.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create blog post","description":"Creates a new blog post.","operationId":"createBlogPost","x-speakeasy-name-override":"create","tags":["BlogPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostRequest"}}}},"responses":{"201":{"description":"Blog post created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPost"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.blogPosts.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/blog_posts/{id_or_slug}":{"get":{"summary":"Get blog post","description":"Returns a specific blog post by ID or slug","operationId":"getBlogPost","x-speakeasy-name-override":"get","tags":["BlogPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Blog post details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPost"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.blogPosts.get({\n    idOrSlug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update blog post","description":"Updates an existing blog post.","operationId":"updateBlogPost","x-speakeasy-name-override":"update","tags":["BlogPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPostRequest"}}}},"responses":{"200":{"description":"Blog post updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BlogPost"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.blogPosts.update({\n    idOrSlug: \"<value>\",\n    blogPostRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"},"delete":{"summary":"Delete blog post","description":"Deletes a blog post.","operationId":"deleteBlogPost","x-speakeasy-name-override":"delete","tags":["BlogPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Blog post deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.blogPosts.delete({\n    idOrSlug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/bookings":{"get":{"summary":"List bookings","description":"Returns bookings for the current account, newest first. Filter by `status` to separate confirmed bookings from pending or cancelled ones, or by `event_type_id` to scope to a single bookable service. Use `expand` to inline the related event type and customer instead of following their IDs.","operationId":"listBookings","x-speakeasy-name-override":"list","tags":["Bookings"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by status","schema":{"type":"string","enum":["pending","confirmed","cancelled","completed","no_show"]}},{"name":"event_type_id","in":"query","description":"Filter by event type","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: event_type","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of bookings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Booking"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bookings.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create a booking","description":"Books a slot on an event type. Free event types confirm immediately; paid event types return a `pending` booking whose `checkout_url`(via the linked checkout) must be paid to confirm.","operationId":"createBooking","x-speakeasy-name-override":"create","tags":["Bookings"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event_type_id":{"type":"string","example":"etype_abc123"},"start_time":{"type":"string","format":"date-time","description":"UTC slot start (from the slots endpoint)."},"time_zone":{"type":"string","example":"America/New_York","description":"Attendee's timezone (for their confirmation/reminders)."},"attendee":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]}},"required":["email"]},"intake_answers":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Answers to the event type's intake form (when one is attached). Stored as a FormSubmission."},"price_variant_id":{"type":"string","example":"pv_abc123","description":"For paid event types: which price variant to charge. Defaults to the experience's first paid variant. The response includes a `checkout` with a `purchase_url` — redirect the customer there to pay; the booking confirms once paid."}},"required":["event_type_id","start_time","attendee"]}}}},"responses":{"201":{"description":"The created booking","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"The requested slot is no longer available.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string","enum":["slot_unavailable"]},"message":{"type":"string"}}}}}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bookings.create({\n    eventTypeId: \"etype_abc123\",\n    startTime: new Date(\"2026-02-01T21:30:21.072Z\"),\n    timeZone: \"America/New_York\",\n    attendee: {\n      email: \"Trey77@hotmail.com\",\n    },\n    priceVariantId: \"pv_abc123\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/bookings/{id}":{"get":{"summary":"Retrieve a booking","description":"Retrieves a single booking by ID, including its start and end times, status, and the answers the customer gave when booking. Use `expand` to inline the related event type and customer.","operationId":"getBooking","x-speakeasy-name-override":"get","tags":["Bookings"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: event_type","schema":{"type":"string"}}],"responses":{"200":{"description":"The booking","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bookings.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/bookings/{id}/cancel":{"post":{"summary":"Cancel a booking","description":"Cancels a booking, frees the slot, removes the calendar event, and notifies the attendee.","operationId":"cancelBooking","x-speakeasy-name-override":"cancel","tags":["Bookings"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"The cancelled booking","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bookings.cancel({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/bookings/{id}/reschedule":{"post":{"summary":"Reschedule a booking","description":"Moves a confirmed booking to a new start time, re-validating availability and patching the calendar event.","operationId":"rescheduleBooking","x-speakeasy-name-override":"reschedule","tags":["Bookings"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"start_time":{"type":"string","format":"date-time","description":"New UTC slot start (from the slots endpoint)."}},"required":["start_time"]}}}},"responses":{"200":{"description":"The rescheduled booking","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"The requested slot is no longer available.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string","enum":["slot_unavailable"]},"message":{"type":"string"}}}}}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bookings.reschedule({\n    id: \"<id>\",\n    requestBody: {\n      startTime: new Date(\"2025-01-19T12:49:16.210Z\"),\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/bots":{"get":{"summary":"List bots","description":"Returns the account's bot roster, newest first. Search by name, handle, or role with `query`.","operationId":"listBots","x-speakeasy-name-override":"list","tags":["Bots"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","description":"Search by bot name, handle, or role","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of bots","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_AiBot"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bots.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create bot","description":"Creates a bot — a named identity that parameterizes the agent Crevio runs for you: its persona, the skills it may load, and the toolsets it may call. `handle` is derived from `name` when omitted, and is unique within the account. `skill_slugs` and `toolsets` are tri-state: `null` means every skill / every toolset, `[]` means none, and a list restricts the bot to exactly those. Omitting a field leaves it unchanged.","operationId":"createBot","x-speakeasy-name-override":"create","tags":["Bots"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBotRequest"}}}},"responses":{"201":{"description":"Bot created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBot"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bots.create({\n    name: \"Support Sam\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/bots/{id}":{"get":{"summary":"Get bot","description":"Returns a specific bot.","operationId":"getBot","x-speakeasy-name-override":"get","tags":["Bots"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Bot details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBot"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bots.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update bot","description":"Updates an existing bot. `skill_slugs` and `toolsets` are tri-state: `null` means every skill / every toolset, `[]` means none, and a list restricts the bot to exactly those. Omitting a field leaves it unchanged.","operationId":"updateBot","x-speakeasy-name-override":"update","tags":["Bots"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBotRequest"}}}},"responses":{"200":{"description":"Bot updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiBot"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bots.update({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete bot","description":"Deletes a bot. Its chats and tasks are kept and unbound from it, so transcripts survive.","operationId":"deleteBot","x-speakeasy-name-override":"delete","tags":["Bots"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Bot deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.bots.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/broadcasts":{"get":{"summary":"List broadcasts","description":"Lists the account's broadcasts, newest first. Filter by `status`, or by when they went out with `sent_after` / `sent_before`.","operationId":"broadcastsList","x-speakeasy-name-override":"list","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"status","in":"query","required":false,"description":"Only return broadcasts in this state.","schema":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","failed"]}},{"name":"sent_after","in":"query","required":false,"description":"Only return broadcasts sent at or after this timestamp.","schema":{"type":"string","format":"date-time"}},{"name":"sent_before","in":"query","required":false,"description":"Only return broadcasts sent at or before this timestamp.","schema":{"type":"string","format":"date-time"}},{"name":"metadata","in":"query","required":false,"style":"deepObject","explode":true,"description":"Filter by caller-owned metadata key/value pairs, e.g. `metadata[campaign]=spring`. Repeatable (up to 10 keys); all pairs must match.","schema":{"type":"object","additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"Broadcasts","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Broadcast"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create a broadcast","description":"Creates a broadcast. Omit `scheduled_at` to save a draft, pass a future timestamp to schedule it, or pass `send_now: true` to resolve the audience and start sending immediately.\n\nSending a 1:1 email? Use `POST /v1/email/inboxes/{inbox_id}/messages` instead — it creates a tracked thread you can reply within.","operationId":"broadcastsCreate","x-speakeasy-name-override":"create","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastRequest"}}}},"responses":{"201":{"description":"The created broadcast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"description":"The account's daily email limit for its plan has been reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"}}},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.create({\n    subject: \"Launch day is here\",\n    body: \"<p>Everything we shipped this month.</p>\",\n    audience: { sendToAll: true },\n    sendNow: true,\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/broadcasts/{id}":{"get":{"summary":"Retrieve a broadcast","description":"Returns a broadcast, including its current delivery and engagement `stats`.","operationId":"broadcastsGet","x-speakeasy-name-override":"get","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The broadcast's prefixed id (e.g. `bcst_abc123`).","schema":{"type":"string"}}],"responses":{"200":{"description":"The broadcast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.get({ id: \"bcst_abc123\" });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update a broadcast","description":"Updates a draft or scheduled broadcast. Only fields included in the request body change. Clearing `scheduled_at` demotes a scheduled broadcast back to a draft; setting it on a draft schedules it. A broadcast that is already sending or sent can no longer be edited.","operationId":"broadcastsUpdate","x-speakeasy-name-override":"update","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The broadcast's prefixed id (e.g. `bcst_abc123`).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastRequest"}}}},"responses":{"200":{"description":"The updated broadcast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.update({\n    id: \"bcst_abc123\",\n    subject: \"Launch day (one more thing)\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"},"delete":{"summary":"Delete a broadcast","description":"Permanently deletes a draft or scheduled broadcast. A sent broadcast is a permanent record of what went out and cannot be deleted.","operationId":"broadcastsDelete","x-speakeasy-name-override":"delete","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The broadcast's prefixed id (e.g. `bcst_abc123`).","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["broadcast"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.delete({ id: \"bcst_abc123\" });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/broadcasts/{id}/cancel":{"post":{"summary":"Cancel a broadcast","description":"Cancels a scheduled or in-flight broadcast. Recipients already handed to the email provider will still receive it; the rest are dropped, and the stats collected so far are kept.","operationId":"broadcastsCancel","x-speakeasy-name-override":"cancel","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The broadcast's prefixed id (e.g. `bcst_abc123`).","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"The canceled broadcast","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.cancel({ id: \"bcst_abc123\" });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/broadcasts/{id}/link-clicks":{"get":{"summary":"List broadcast link clicks","description":"Returns click performance for each link in a broadcast: `clicks` counts every click, `unique_clicks` counts distinct recipients. Not paginated — an email has a handful of links.","operationId":"broadcastsLinkClicksList","x-speakeasy-name-override":"listLinkClicks","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The broadcast's prefixed id (e.g. `bcst_abc123`).","schema":{"type":"string"}}],"responses":{"200":{"description":"Per-link click performance","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastLinkClick"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.listLinkClicks({ id: \"bcst_abc123\" });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/broadcasts/{id}/recipients":{"get":{"summary":"List broadcast recipients","description":"Lists the addresses in a broadcast's resolved audience with their individual delivery and engagement state. Filter by `status` to pull just the bounces, for example.","operationId":"broadcastsRecipientsList","x-speakeasy-name-override":"listRecipients","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The broadcast's prefixed id (e.g. `bcst_abc123`).","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"status","in":"query","required":false,"description":"Only return recipients in this delivery state.","schema":{"type":"string","enum":["queued","sent","delivered","bounced","complained","failed"]}}],"responses":{"200":{"description":"Broadcast recipients","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/BroadcastRecipient"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.listRecipients({ id: \"bcst_abc123\" });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/broadcasts/{id}/send":{"post":{"summary":"Send a broadcast","description":"Sends a draft or scheduled broadcast immediately, ignoring any `scheduled_at`. Resolves the audience, drops suppressed and unsubscribed addresses, and moves the broadcast to `sending`.","operationId":"broadcastsSend","x-speakeasy-name-override":"send","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The broadcast's prefixed id (e.g. `bcst_abc123`).","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"The broadcast, now sending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Broadcast"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"description":"The account's daily email limit for its plan has been reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"}}},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.send({ id: \"bcst_abc123\" });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/broadcasts/{id}/stats":{"get":{"summary":"Retrieve broadcast stats","description":"Returns delivery and engagement stats for a single broadcast. The same object is embedded as `stats` on the broadcast itself; this endpoint exists for callers that only want to poll progress.","operationId":"broadcastsStats","x-speakeasy-name-override":"stats","tags":["Broadcasts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The broadcast's prefixed id (e.g. `bcst_abc123`).","schema":{"type":"string"}}],"responses":{"200":{"description":"Broadcast stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BroadcastStats"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.broadcasts.stats({ id: \"bcst_abc123\" });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/calls":{"get":{"summary":"List calls","description":"Lists phone calls (inbound and outbound) for the account, most recent first.","operationId":"listCalls","x-speakeasy-name-override":"list","tags":["Calls"],"security":[{"ApiKey":[]}],"parameters":[{"name":"direction","in":"query","description":"Filter by direction: inbound or outbound.","schema":{"type":"string","enum":["inbound","outbound"]}},{"name":"status","in":"query","description":"Filter by status: queued, ringing, in_progress, ended, failed.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of calls","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Call"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.calls.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Place a call","description":"Places an autonomous outbound phone call. An AI voice agent dials the number and pursues the objective, acting on account data mid-call. Only call numbers that have consented to be contacted.","operationId":"createCall","x-speakeasy-name-override":"create","tags":["Calls"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallRequest"}}}},"responses":{"201":{"description":"Call placed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.calls.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/calls/{id}":{"get":{"summary":"Get a call","description":"Retrieves a call by id, including its status, transcript, recording, and outcome once it has ended.","operationId":"getCall","x-speakeasy-name-override":"get","tags":["Calls"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Call details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Call"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.calls.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/chapters/{chapter_id}/lessons":{"get":{"summary":"List lessons","description":"Returns the lessons in a chapter","operationId":"listLessons","x-speakeasy-name-override":"list","tags":["Lessons"],"security":[{"ApiKey":[]}],"parameters":[{"name":"chapter_id","in":"path","required":true,"description":"The chapter ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of lessons","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Lesson"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.lessons.list({\n    chapterId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create lesson","description":"Adds a lesson to a chapter","operationId":"createLesson","x-speakeasy-name-override":"create","tags":["Lessons"],"security":[{"ApiKey":[]}],"parameters":[{"name":"chapter_id","in":"path","required":true,"description":"The chapter ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonRequest"}}}},"responses":{"201":{"description":"Lesson created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lesson"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.lessons.create({\n    chapterId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/chapters/{id}":{"patch":{"summary":"Update chapter","description":"Updates a chapter's title or position","operationId":"updateChapter","x-speakeasy-name-override":"update","tags":["Chapters"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChapterRequest"}}}},"responses":{"200":{"description":"Chapter updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chapter"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.chapters.update({\n    id: \"<id>\",\n    chapterRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete chapter","description":"Deletes a chapter and its lessons","operationId":"deleteChapter","x-speakeasy-name-override":"delete","tags":["Chapters"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Chapter deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.chapters.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/checkout_configuration":{"get":{"summary":"Get checkout configuration","description":"Returns the account-wide checkout settings: country allow-list, tax collection, discount codes, the phone / shipping address / tax ID fields shown at checkout, quantity selection, and the post-purchase success URL. Read it before changing anything — omitted fields keep their current value on update.","operationId":"getCheckoutConfiguration","x-speakeasy-name-override":"get","tags":["CheckoutConfiguration"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Checkout configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutConfiguration"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"},"patch":{"summary":"Update checkout configuration","description":"Partially updates the account-wide checkout settings; only the fields sent change. `allowed_countries` is an allow-list of ISO 3166-1 alpha-2 codes (`[\"US\", \"CA\"]` lets only US and Canadian buyers through) — send `[]` to lift the restriction, never the full list of countries. `success_url` must be a full https:// URL; send `null` or `\"\"` to restore the default thank-you page. Saving expires every open checkout session and re-syncs the account's Stripe Tax settings.","operationId":"updateCheckoutConfiguration","x-speakeasy-name-override":"update","tags":["CheckoutConfiguration"],"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutConfigurationRequest"}}}},"responses":{"200":{"description":"Checkout configuration updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutConfiguration"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/checkout_links":{"get":{"summary":"List checkout links","description":"Returns a list of checkout links for the current account","operationId":"listCheckoutLinks","x-speakeasy-name-override":"list","tags":["CheckoutLinks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"expand","in":"query","description":"Comma-separated relations to expand: discount, price_variants","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"metadata","in":"query","required":false,"style":"deepObject","explode":true,"description":"Filter by caller-owned metadata key/value pairs, e.g. `metadata[campaign]=spring`. Repeatable (up to 10 keys); all pairs must match.","schema":{"type":"object","additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"List of checkout links","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_CheckoutLink"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.checkoutLinks.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create checkout link","description":"Creates a new shareable checkout link","operationId":"createCheckoutLink","x-speakeasy-name-override":"create","tags":["CheckoutLinks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"201":{"description":"Checkout link created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.checkoutLinks.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/checkout_links/{id}":{"get":{"summary":"Get checkout link","description":"Returns a specific checkout link","operationId":"getCheckoutLink","x-speakeasy-name-override":"get","tags":["CheckoutLinks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: discount, price_variants","schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout link details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.checkoutLinks.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update checkout link","description":"Updates an existing checkout link","operationId":"updateCheckoutLink","x-speakeasy-name-override":"update","tags":["CheckoutLinks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"200":{"description":"Checkout link updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLink"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.checkoutLinks.update({\n    id: \"<id>\",\n    checkoutLinkRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete checkout link","description":"Deletes a checkout link","operationId":"deleteCheckoutLink","x-speakeasy-name-override":"delete","tags":["CheckoutLinks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout link deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.checkoutLinks.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/checkouts":{"post":{"summary":"Create checkout session","description":"Creates a new checkout session for purchasing products","operationId":"createCheckout","x-speakeasy-name-override":"create","tags":["Checkouts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutCreateRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"201":{"description":"Checkout session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.checkouts.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/checkouts/{id}":{"get":{"summary":"Get checkout","description":"Returns a specific checkout session","operationId":"getCheckout","x-speakeasy-name-override":"get","tags":["Checkouts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Checkout"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.checkouts.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/connections":{"get":{"summary":"List integrations","operationId":"listConnections","x-speakeasy-name-override":"list","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"Searchable catalog of connectable integrations across every provider — connectable apps, suggested MCP servers, social/ads platforms — each flagged with whether this account has it connected (and the `connection_id` to act on if so). Forward-paginates over an opaque cursor.","parameters":[{"name":"search","in":"query","schema":{"type":"string"},"description":"Filter integrations by name or slug"},{"name":"limit","in":"query","schema":{"type":"integer"},"description":"Page size (max 100)"},{"name":"starting_after","in":"query","schema":{"type":"string"},"description":"Opaque pagination cursor"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_ConnectionApp"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.connections.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/connections/connect":{"post":{"summary":"Start a connection","operationId":"startConnection","x-speakeasy-name-override":"connect","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"Mint a hosted OAuth link to connect an app; send the user to `redirect_url`. Some apps need setup first (see `setup_fields`). On return the connection appears in GET /connections.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"toolkit":{"type":"string","description":"App slug from the catalog (e.g. gmail)"},"callback_url":{"type":"string","description":"Where to return the user after auth"},"scope":{"type":"string","enum":["account","user"],"default":"account","description":"Who owns the resulting connection. `account` (default) shares it with the whole workspace; `user` makes it personal to the authenticated user and invisible to teammates."}},"required":["toolkit"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionLink"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.connections.connect({\n    toolkit: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/connections/connected":{"get":{"summary":"List connected integrations","operationId":"listConnectedConnections","x-speakeasy-name-override":"connected","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"This account's connected integrations only, across all families — each with a unified id, status, and a `callable` flag indicating whether an agent can act on it.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Connection"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.connections.connected();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/connections/{id}":{"delete":{"summary":"Disconnect a connection","operationId":"disconnectConnection","x-speakeasy-name-override":"disconnect","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"Disconnect any connection family by its unified public id (best-effort upstream revoke + local prune). A team connection stops working for everyone, and only a new OAuth connect brings it back; when Crevio's agent calls this, the user approves it first. To change who can use a connection, call PUT /connections/{id}/access instead; never disconnect and reconnect. An account admin can disconnect a team connection; only its owner can disconnect a personal one.","parameters":[{"name":"id","in":"path","required":true,"description":"Unified public connection id, as returned by GET /connections/connected. Opaque — pass it back verbatim.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectedConnectionById"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.connections.disconnect({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true},"patch":{"summary":"Rename a connection","operationId":"updateConnection","x-speakeasy-name-override":"update","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"Set a nickname for a connection, so several accounts of the same app are tellable apart (\"work gmail\" vs \"support gmail\"). Send an empty string to clear it and fall back to the provider's own label. Only app connections can be renamed; every other family takes its name from a record the provider owns.","parameters":[{"name":"id","in":"path","required":true,"description":"Unified public connection id, as returned by GET /connections/connected. Opaque — pass it back verbatim.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"nickname":{"type":"string","maxLength":60,"description":"The name to show for this connection. Empty clears it."}},"required":["nickname"]}}}},"responses":{"200":{"description":"The renamed connection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-crevio-approval":"allow"}},"/connections/{id}/access":{"put":{"summary":"Change who can use a connection","operationId":"setConnectionAccess","x-speakeasy-name-override":"setAccess","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"Change who can use an app connection without disconnecting it: its credential, tool settings and history stay as they are. `everyone` shares it with the whole team, `only_me` limits it to the caller, and `members` limits it to the listed teammates (include yourself to keep using it). Only those people see its tools, in their chats and in the tasks they created. A personal connection always stays usable by its owner, and naming members shares it with them too. It cannot be opened to `everyone`, because its credential belongs to its owner; connect it again as a Team connection for that. An account admin changes a team connection; only its owner changes a personal one. Only app connections support this. When Crevio's agent calls this, the user approves it first.","parameters":[{"name":"id","in":"path","required":true,"description":"Unified public connection id, as returned by GET /connections/connected. Opaque — pass it back verbatim.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","enum":["everyone","only_me","members"],"description":"Who can use the connection: the whole team, only you, or the people in `members`."},"members":{"type":"array","items":{"type":"string","format":"email"},"maxItems":50,"description":"Emails of account members who can use it, for `members`. Replaces the current list."}},"required":["access"]}}}},"responses":{"200":{"description":"The connection with its new access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask","x-crevio-locked":true}},"/connections/{id}/execute":{"post":{"summary":"Execute a connection tool","operationId":"executeConnection","x-speakeasy-name-override":"execute","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"Run a tool on any connection by its unified id, with the account's approval policy enforced. always_allow runs now (200); always_ask freezes a pending approval (202); off / not-callable refused. Social/ads connections are operated via their native /v1 endpoints (409).","parameters":[{"name":"id","in":"path","required":true,"description":"Unified public connection id, as returned by GET /connections/connected. Opaque — pass it back verbatim.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tool":{"type":"string","description":"Tool name from GET /connections/{id}/tools"},"arguments":{"type":"object","description":"Tool-specific arguments","additionalProperties":true}},"required":["tool"]}}}},"responses":{"200":{"description":"Tool executed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionInvocation"}}}},"202":{"description":"Approval required - the action was frozen pending a human decision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.connections.execute({\n    id: \"<id>\",\n    requestBody: {\n      tool: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/connections/{id}/proxy":{"post":{"summary":"Call a connected app's API directly","operationId":"proxyConnection","x-speakeasy-name-override":"proxy","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"Make an authenticated HTTP request to a connected app's own API, for endpoints no tool covers. Credentials are injected server-side and never exposed - do not send an Authorization header. The app's own status code is returned in the body (`status`), so a 404 there is the app's answer, not a failure of this call. Governed by the same approval policy as /execute: reads run now (200), writes freeze a pending approval (202). Only app connections proxy; MCP servers (use /execute) and social/ads connections (use their native /v1 endpoints) are refused with 409.","parameters":[{"name":"id","in":"path","required":true,"description":"Unified public connection id, as returned by GET /connections/connected. Opaque — pass it back verbatim.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","description":"Path relative to the app's API base URL (e.g. /gmail/v1/users/me/messages), or an absolute URL on the app's own domain."},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"default":"GET"},"body":{"type":["object","array","string","null"],"description":"Request body, sent verbatim. Ignored for GET."},"headers":{"type":"object","description":"Extra headers forwarded to the app. Authorization and other transport headers are ignored.","additionalProperties":{"type":"string"}}},"required":["endpoint"]}}}},"responses":{"200":{"description":"The app's response, verbatim","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionProxyResponse"}}}},"202":{"description":"Approval required - the request was frozen pending a human decision","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Approval"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}},"x-crevio-approval":"allow"}},"/connections/{id}/tools":{"get":{"summary":"List a connection's tools","operationId":"listConnectionTools","x-speakeasy-name-override":"tools","tags":["Connections"],"security":[{"ApiKey":[]}],"description":"The gateable tools a connection exposes, each with its effective approval policy. Works for any family — the backend dispatches by transport. Social/ads connections return a pointer to their native /v1 endpoints.","parameters":[{"name":"id","in":"path","required":true,"description":"Unified public connection id, as returned by GET /connections/connected. Opaque — pass it back verbatim.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_ConnectionCapability"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.connections.tools({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/customers":{"get":{"summary":"List customers","description":"Returns a list of customers for the current account","operationId":"listCustomers","x-speakeasy-name-override":"list","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"customer_type","in":"query","description":"Filter by customer type","schema":{"type":"string","enum":["lead","free","paid"]}},{"name":"query","in":"query","description":"Search by email or name","schema":{"type":"string"}},{"name":"deleted","in":"query","description":"When true, lists deleted customers that have not been permanently erased yet. Each has `deleted_at` and `purge_at`.","schema":{"type":"boolean"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"metadata","in":"query","required":false,"style":"deepObject","explode":true,"description":"Filter by caller-owned metadata key/value pairs, e.g. `metadata[campaign]=spring`. Repeatable (up to 10 keys); all pairs must match.","schema":{"type":"object","additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"List of customers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Customer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create customer","description":"Creates a new customer record","operationId":"createCustomer","x-speakeasy-name-override":"create","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"201":{"description":"Customer created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/customers/{customer_id}/tags":{"post":{"summary":"Add tag to customer","description":"Adds a tag to a customer","operationId":"addCustomerTag","x-speakeasy-name-override":"addTag","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"description":"The customer ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerTagRequest"}}}},"responses":{"201":{"description":"Tag added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.addTag({\n    customerId: \"<id>\",\n    customerTagRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/customers/{customer_id}/tags/{id}":{"delete":{"summary":"Remove tag from customer","description":"Removes a tag from a customer","operationId":"removeCustomerTag","x-speakeasy-name-override":"removeTag","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"description":"The customer ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Tag removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.removeTag({\n    customerId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/customers/{id}":{"get":{"summary":"Get customer","description":"Returns a specific customer","operationId":"getCustomer","x-speakeasy-name-override":"get","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Customer details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update customer","description":"Updates an existing customer record","operationId":"updateCustomer","x-speakeasy-name-override":"update","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"200":{"description":"Customer updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.update({\n    id: \"<id>\",\n    customerRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete customer","description":"Deletes a customer. The customer disappears from lists and lookups right away and is permanently erased 30 days later, together with their notes, form submissions, bookings, calls, support chats and the emails they sent or received. Until then it can be brought back with `POST /v1/customers/{id}/restore` (list pending ones with `GET /v1/customers?deleted=true`). Customers with any orders cannot be deleted (422); anonymize them with `POST /v1/customers/{id}/anonymize` instead.","operationId":"deleteCustomer","x-speakeasy-name-override":"delete","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Customer deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/discounts":{"get":{"summary":"List discounts","description":"Returns a list of discounts for the current account","operationId":"listDiscounts","x-speakeasy-name-override":"list","tags":["Discounts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by discount status","schema":{"type":"string","enum":["active","expired","scheduled"]}},{"name":"query","in":"query","description":"Search by discount code","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of discounts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Discount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.discounts.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create discount","description":"Creates a new discount code","operationId":"createDiscount","x-speakeasy-name-override":"create","tags":["Discounts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountRequest"}}}},"responses":{"201":{"description":"Discount created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.discounts.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/discounts/{id}":{"get":{"summary":"Get discount","description":"Returns a specific discount","operationId":"getDiscount","x-speakeasy-name-override":"get","tags":["Discounts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Discount details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.discounts.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update discount","description":"Updates an existing discount","operationId":"updateDiscount","x-speakeasy-name-override":"update","tags":["Discounts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountRequest"}}}},"responses":{"200":{"description":"Discount updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.discounts.update({\n    id: \"<id>\",\n    discountRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete discount","description":"Deletes a discount","operationId":"deleteDiscount","x-speakeasy-name-override":"delete","tags":["Discounts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Discount deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.discounts.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/domains":{"get":{"summary":"List domains","description":"Returns a list of custom domains for the current account.","operationId":"listDomains","x-speakeasy-name-override":"list","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","description":"Search by domain","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Domain"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.domains.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Connect a domain","operationId":"createDomain","tags":["Domains"],"security":[{"ApiKey":[]}],"description":"Connect a hostname. web routing defaults on (attached to site_id or the storefront); email capabilities are explicit opt-ins. The response carries capabilities, records[] with per-record DNS status, and next_step.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"site_id":{"type":"string"},"capabilities":{"type":"object","properties":{"email_sending":{"type":"boolean"},"email_receiving":{"type":"boolean"}}}}}}}},"responses":{"201":{"description":"Domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Plan upgrade required — custom domains are available on the Pro and Business plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/domains/purchase":{"post":{"summary":"Buy a domain","description":"Registers a domain through the built-in registrar. If the account has a card on file the purchase is charged immediately (`charged: true`, no redirect); otherwise the response includes a Stripe Checkout URL (`checkout_url`) to complete payment. The domain is created in `pending_payment` and becomes active once payment completes and registration succeeds. Poll GET /domains/{id} for status.","operationId":"purchaseDomain","x-speakeasy-name-override":"purchase","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The domain to buy (check availability first)."}},"required":["domain"]}}}},"responses":{"201":{"description":"Checkout created","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string"},"checkout_url":{"type":"string"},"hint":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Plan upgrade required — custom domains are available on the Pro and Business plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.domains.purchase({\n    domain: \"frivolous-scrap.net\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/domains/search":{"get":{"summary":"Search for buyable domains","description":"Searches for available domains from a keyword or phrase, with pricing.","operationId":"searchDomains","x-speakeasy-name-override":"search","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","required":true,"description":"Keyword, phrase, or partial domain.","schema":{"type":"string"}}],"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string"},"domain":{"type":"string"},"available":{"type":"boolean"},"price":{"type":"integer","description":"Registration price in cents."},"currency":{"type":"string"}}}},"has_more":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.domains.search({\n    query: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/domains/{id}":{"get":{"summary":"Retrieve a domain","description":"Retrieves a single custom domain by id.","operationId":"getDomain","x-speakeasy-name-override":"get","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"The domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.domains.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete a domain","description":"Disconnects a custom domain: removes its hostname and edge routing record, then deletes the row.","operationId":"deleteDomain","x-speakeasy-name-override":"delete","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Domain deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.domains.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"},"patch":{"summary":"Update a domain","operationId":"updateDomain","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","description":"The domain's ID.","in":"path","required":true,"schema":{"type":"string"}}],"description":"Change the site assignment (site_id, null detaches) or toggle capabilities (email_sending on/off, email_receiving on).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"type":["string","null"]},"capabilities":{"type":"object","properties":{"email_sending":{"type":"boolean"},"email_receiving":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"Domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Plan upgrade required — custom domains are available on the Pro and Business plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/domains/{id}/verify":{"post":{"summary":"Verify a domain","description":"Idempotent verification across the domain's enabled capabilities. Scope with ?capability=web|email_sending|email_receiving to skip the other providers' checks.","operationId":"verifyDomain","x-speakeasy-name-override":"verify","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","description":"The domain's ID.","in":"path","required":true,"schema":{"type":"string"}},{"name":"capability","description":"Verify only this capability instead of every capability configured on the domain.","in":"query","required":false,"schema":{"type":"string","enum":["web","email_sending","email_receiving"]}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.domains.verify({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/drafts":{"get":{"summary":"List drafts","description":"Lists drafts across all inboxes.","operationId":"emailDraftsList","x-speakeasy-group":"email.drafts","x-speakeasy-name-override":"list","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Drafts","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailDraft"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.drafts.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/inboxes":{"get":{"summary":"List inboxes","description":"Lists active inboxes for the account.","operationId":"emailInboxesList","x-speakeasy-group":"email.inboxes","x-speakeasy-name-override":"list","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Inboxes","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailInbox"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create an inbox","description":"Creates a named inbox. With a verified email domain the address is `{local_part}@yourdomain.com`; without one it lands on the shared Crevio domain as `{slug}.{local_part}@ai.crevio.app`, which receives immediately and sends as the account's default outbound address. On the shared domain `local_part` must be one word of lowercase letters, numbers, hyphens or underscores, and an account can hold up to 20 such inboxes. Creating an address that already exists returns that inbox.","operationId":"emailInboxesCreate","x-speakeasy-group":"email.inboxes","x-speakeasy-name-override":"create","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"local_part":{"type":"string","description":"The name before the `@`, e.g. `invoices`. Prefixed with the account slug on the shared Crevio domain."},"display_name":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"client_id":{"type":"string"}},"required":["local_part"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInbox"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.create({\n    localPart: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/inboxes/{id}":{"get":{"summary":"Get an inbox","description":"Retrieves an inbox.","operationId":"emailInboxesGet","x-speakeasy-group":"email.inboxes","x-speakeasy-name-override":"get","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Inbox id","schema":{"type":"string"}}],"responses":{"200":{"description":"Inbox","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInbox"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update an inbox","description":"Updates an inbox's display name or metadata (merged).","operationId":"emailInboxesUpdate","x-speakeasy-group":"email.inboxes","x-speakeasy-name-override":"update","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Inbox id","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string"},"metadata":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInbox"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.update({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete an inbox","description":"Soft-deletes (deactivates) an inbox.","operationId":"emailInboxesDelete","x-speakeasy-group":"email.inboxes","x-speakeasy-name-override":"delete","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Inbox id","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["email_inbox"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/drafts":{"get":{"summary":"List inbox drafts","description":"Lists drafts in an inbox.","operationId":"emailInboxesDraftsList","x-speakeasy-group":"email.inboxes.drafts","x-speakeasy-name-override":"list","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Drafts","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailDraft"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.drafts.list({\n    inboxId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create a draft","description":"Prepares (optionally schedules) an unsent message.","operationId":"emailInboxesDraftsCreate","x-speakeasy-group":"email.inboxes.drafts","x-speakeasy-name-override":"create","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bcc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subject":{"type":"string"},"text":{"type":"string"},"html":{"type":"string"},"reply_to":{"type":"string"},"in_reply_to":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"send_at":{"type":"string","format":"date-time","description":"Schedule send time (ISO 8601)"},"attachments":{"type":"array","items":{"type":"object","description":"A media-library file by `file_id`, or inline bytes as base64 `content`. All attachments together may be at most 25 MB; link a larger file in the body instead.","properties":{"file_id":{"type":"string","description":"File ID (`file_...`) from the Files API. Preferred: nothing is re-uploaded."},"content":{"type":"string","description":"Base64-encoded file content"},"filename":{"type":"string"},"content_type":{"type":"string"}}}}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraft"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.drafts.create({\n    inboxId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/inboxes/{inbox_id}/drafts/{id}":{"get":{"summary":"Get a draft","description":"Retrieves a draft.","operationId":"emailInboxesDraftsGet","x-speakeasy-group":"email.inboxes.drafts","x-speakeasy-name-override":"get","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Draft id","schema":{"type":"string"}}],"responses":{"200":{"description":"Draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraft"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.drafts.get({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update a draft","description":"Updates a draft's fields.","operationId":"emailInboxesDraftsUpdate","x-speakeasy-group":"email.inboxes.drafts","x-speakeasy-name-override":"update","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Draft id","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bcc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subject":{"type":"string"},"text":{"type":"string"},"html":{"type":"string"},"reply_to":{"type":"string"},"in_reply_to":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"send_at":{"type":"string","format":"date-time","description":"Schedule send time (ISO 8601)"},"attachments":{"type":"array","items":{"type":"object","description":"A media-library file by `file_id`, or inline bytes as base64 `content`. All attachments together may be at most 25 MB; link a larger file in the body instead.","properties":{"file_id":{"type":"string","description":"File ID (`file_...`) from the Files API. Preferred: nothing is re-uploaded."},"content":{"type":"string","description":"Base64-encoded file content"},"filename":{"type":"string"},"content_type":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDraft"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.drafts.update({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete a draft","description":"Deletes a draft (cancels scheduled sends).","operationId":"emailInboxesDraftsDelete","x-speakeasy-group":"email.inboxes.drafts","x-speakeasy-name-override":"delete","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Draft id","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["email_draft"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.drafts.delete({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/drafts/{id}/send":{"post":{"summary":"Send a draft","description":"Sends a draft immediately; converts it to a message and deletes the draft.","operationId":"emailInboxesDraftsSend","x-speakeasy-group":"email.inboxes.drafts","x-speakeasy-name-override":"send","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Draft id","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"201":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.drafts.send({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/events":{"get":{"summary":"List inbox events","description":"Lists the inbox's audit feed of message lifecycle transitions (received, sent, delivered, bounced, complained, failed) and label changes, newest first. The pull-based complement to the email_message.* webhooks.","operationId":"emailInboxesEventsList","x-speakeasy-group":"email.inboxes.events","x-speakeasy-name-override":"list","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Events","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailInboxEvent"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.events.list({\n    inboxId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/inboxes/{inbox_id}/messages":{"get":{"summary":"List inbox messages","description":"Lists messages in an inbox.","operationId":"emailInboxesMessagesList","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"list","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"label","in":"query","description":"Filter by label","schema":{"type":"string"}},{"name":"direction","in":"query","description":"inbound or outbound","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Messages","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessage"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.list({\n    inboxId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Send a 1:1 email from an inbox","description":"Outbound email to anyone, including external recipients. Creates a tracked thread you can reply within — unlike the broadcast endpoint `POST /v1/broadcasts`.","operationId":"emailInboxesMessagesSend","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"send","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bcc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subject":{"type":"string"},"text":{"type":"string"},"html":{"type":"string"},"reply_to":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"attachments":{"type":"array","items":{"type":"object","description":"A media-library file by `file_id`, or inline bytes as base64 `content`. All attachments together may be at most 25 MB; link a larger file in the body instead.","properties":{"file_id":{"type":"string","description":"File ID (`file_...`) from the Files API. Preferred: nothing is re-uploaded."},"content":{"type":"string","description":"Base64-encoded file content"},"filename":{"type":"string"},"content_type":{"type":"string"}}}}},"required":["to","subject"]}}}},"responses":{"201":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.send({\n    inboxId: \"<id>\",\n    requestBody: {\n      to: [\n        \"<value 1>\",\n      ],\n      subject: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/messages/batch-get":{"post":{"summary":"Batch get messages","description":"Fetches up to 500 messages by id in one request. Missing or foreign ids are silently omitted; compare the returned count against the ids you sent to detect misses.","operationId":"emailInboxesMessagesBatchGet","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"batchGet","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message_ids":{"type":"array","items":{"type":"string"},"description":"Message ids (msg_…), up to 500"}},"required":["message_ids"]}}}},"responses":{"200":{"description":"Messages","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessage"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.batchGet({\n    inboxId: \"<id>\",\n    requestBody: {\n      messageIds: [],\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-read-only":true,"x-crevio-approval":"allow"}},"/email/inboxes/{inbox_id}/messages/search":{"get":{"summary":"Search inbox messages","description":"Full-text search within an inbox.","operationId":"emailInboxesMessagesSearch","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"search","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"query","in":"query","description":"Search query","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Messages","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessage"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.search({\n    inboxId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/inboxes/{inbox_id}/messages/{id}":{"get":{"summary":"Get a message","description":"Retrieves a message with its body.","operationId":"emailInboxesMessagesGet","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"get","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Message id","schema":{"type":"string"}}],"responses":{"200":{"description":"Message","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.get({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update message labels","description":"Adds/removes labels on a message.","operationId":"emailInboxesMessagesUpdate","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"update","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Message id","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"add_labels":{"type":"array","items":{"type":"string"}},"remove_labels":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.update({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete a message","description":"Deletes a message.","operationId":"emailInboxesMessagesDelete","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"delete","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Message id","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["email_message"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.delete({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/messages/{id}/attachments/{attachment_id}":{"get":{"summary":"Get a message attachment","description":"Downloads a raw attachment from the message.","operationId":"emailInboxesMessagesGetAttachment","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"getAttachment","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Message id","schema":{"type":"string"}},{"name":"attachment_id","in":"path","required":true,"description":"Attachment id","schema":{"type":"string"}}],"responses":{"200":{"description":"Raw file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.getAttachment({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n    attachmentId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/inboxes/{inbox_id}/messages/{id}/forward":{"post":{"summary":"Forward a message","description":"Forwards a message to new recipients.","operationId":"emailInboxesMessagesForward","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"forward","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Message id","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bcc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"subject":{"type":"string"},"text":{"type":"string"},"html":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"attachments":{"type":"array","items":{"type":"object","description":"A media-library file by `file_id`, or inline bytes as base64 `content`. All attachments together may be at most 25 MB; link a larger file in the body instead.","properties":{"file_id":{"type":"string","description":"File ID (`file_...`) from the Files API. Preferred: nothing is re-uploaded."},"content":{"type":"string","description":"Base64-encoded file content"},"filename":{"type":"string"},"content_type":{"type":"string"}}}}},"required":["to"]}}}},"responses":{"201":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.forward({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n    requestBody: {\n      to: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/messages/{id}/raw":{"get":{"summary":"Get raw message","description":"Returns a minimal RFC 5322 representation of the message.","operationId":"emailInboxesMessagesRaw","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"raw","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Message id","schema":{"type":"string"}}],"responses":{"200":{"description":"Raw message","content":{"message/rfc822":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.raw({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/inboxes/{inbox_id}/messages/{id}/reply":{"post":{"summary":"Reply to a message","description":"Replies to the sender within the same thread.","operationId":"emailInboxesMessagesReply","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"reply","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Message id","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"html":{"type":"string"},"subject":{"type":"string"},"to":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"labels":{"type":"array","items":{"type":"string"}},"attachments":{"type":"array","items":{"type":"object","description":"A media-library file by `file_id`, or inline bytes as base64 `content`. All attachments together may be at most 25 MB; link a larger file in the body instead.","properties":{"file_id":{"type":"string","description":"File ID (`file_...`) from the Files API. Preferred: nothing is re-uploaded."},"content":{"type":"string","description":"Base64-encoded file content"},"filename":{"type":"string"},"content_type":{"type":"string"}}}}}}}}},"responses":{"201":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.reply({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/messages/{id}/reply-all":{"post":{"summary":"Reply-all to a message","description":"Replies to the sender and all other recipients.","operationId":"emailInboxesMessagesReplyAll","x-speakeasy-group":"email.inboxes.messages","x-speakeasy-name-override":"replyAll","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Message id","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"html":{"type":"string"},"subject":{"type":"string"},"cc":{"description":"Email address, or array/comma-separated list of addresses","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"labels":{"type":"array","items":{"type":"string"}},"attachments":{"type":"array","items":{"type":"object","description":"A media-library file by `file_id`, or inline bytes as base64 `content`. All attachments together may be at most 25 MB; link a larger file in the body instead.","properties":{"file_id":{"type":"string","description":"File ID (`file_...`) from the Files API. Preferred: nothing is re-uploaded."},"content":{"type":"string","description":"Base64-encoded file content"},"filename":{"type":"string"},"content_type":{"type":"string"}}}}}}}}},"responses":{"201":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMessage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.messages.replyAll({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/threads":{"get":{"summary":"List inbox threads","description":"Lists conversations in an inbox.","operationId":"emailInboxesThreadsList","x-speakeasy-group":"email.inboxes.threads","x-speakeasy-name-override":"list","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"label","in":"query","description":"Filter by label","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Threads","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailThread"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.threads.list({\n    inboxId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/inboxes/{inbox_id}/threads/{id}":{"get":{"summary":"Get a thread","description":"Retrieves a thread with its messages.","operationId":"emailInboxesThreadsGet","x-speakeasy-group":"email.inboxes.threads","x-speakeasy-name-override":"get","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Thread id","schema":{"type":"string"}}],"responses":{"200":{"description":"Thread","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThread"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.threads.get({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update thread labels","description":"Adds/removes labels on a thread.","operationId":"emailInboxesThreadsUpdate","x-speakeasy-group":"email.inboxes.threads","x-speakeasy-name-override":"update","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Thread id","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"add_labels":{"type":"array","items":{"type":"string"}},"remove_labels":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailThread"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.threads.update({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete a thread","description":"Deletes a thread and its messages.","operationId":"emailInboxesThreadsDelete","x-speakeasy-group":"email.inboxes.threads","x-speakeasy-name-override":"delete","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Thread id","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["email_thread"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.threads.delete({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/email/inboxes/{inbox_id}/threads/{id}/attachments/{attachment_id}":{"get":{"summary":"Get a thread attachment","description":"Downloads a raw attachment from any message in the thread.","operationId":"emailInboxesThreadsGetAttachment","x-speakeasy-group":"email.inboxes.threads","x-speakeasy-name-override":"getAttachment","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"inbox_id","in":"path","required":true,"description":"Inbox id (inbox_…)","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Thread id","schema":{"type":"string"}},{"name":"attachment_id","in":"path","required":true,"description":"Attachment id","schema":{"type":"string"}}],"responses":{"200":{"description":"Raw file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.inboxes.threads.getAttachment({\n    inboxId: \"<id>\",\n    id: \"<id>\",\n    attachmentId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/messages":{"get":{"summary":"List messages","description":"Lists messages across all inboxes.","operationId":"emailMessagesList","x-speakeasy-group":"email.messages","x-speakeasy-name-override":"list","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"label","in":"query","description":"Filter by label","schema":{"type":"string"}},{"name":"direction","in":"query","description":"inbound or outbound","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Messages","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessage"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.messages.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/messages/search":{"get":{"summary":"Search messages","description":"Full-text search of messages by subject/body.","operationId":"emailMessagesSearch","x-speakeasy-group":"email.messages","x-speakeasy-name-override":"search","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","description":"Search query","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Messages","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailMessage"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.messages.search({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/metrics":{"get":{"summary":"Get email metrics","description":"Account-wide email performance over a date range, across both send paths: 1:1 messages and broadcasts. Per-broadcast numbers stay on `GET /broadcasts/{id}/stats`; this is the rollup.\n\nTwo metrics are source-specific, and blending them would misreport: `opened`, `clicked` and `unsubscribed` are broadcast-only (1:1 mail carries no open pixel or link rewriting by design), while `suppressed` is 1:1-only (a broadcast drops suppressed addresses before recipient rows exist). Group by `source` to see them apart.\n\nRates are computed over `sent`. Grouping by `broadcast` returns broadcast rows only; grouping by `inbox` returns message rows only.","operationId":"getEmailMetrics","x-speakeasy-name-override":"get","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"start_date","in":"query","required":false,"description":"Inclusive first day, `YYYY-MM-DD`. Defaults to 7 days before `end_date`.","schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","required":false,"description":"Inclusive last day, `YYYY-MM-DD`. Defaults to today.","schema":{"type":"string","format":"date"}},{"name":"group_by","in":"query","required":false,"description":"Dimension to break the range down by. Omit for totals only.","schema":{"type":"string","enum":["period","source","broadcast","inbox"]}},{"name":"granularity","in":"query","required":false,"description":"Bucket size when `group_by=period`.","schema":{"type":"string","enum":["hour","day","week","month"],"default":"day"}},{"name":"source","in":"query","required":false,"description":"Restrict to one send path.","schema":{"type":"string","enum":["all","broadcast","message"],"default":"all"}},{"name":"timezone","in":"query","required":false,"description":"IANA timezone the day and period boundaries are computed in. Defaults to UTC.","schema":{"type":"string"}}],"responses":{"200":{"description":"Email metrics for the range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMetrics"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.emailMetrics.get();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/suppressions":{"get":{"summary":"List suppressed addresses","description":"Returns the account's suppression list: addresses no send path will deliver to. Entries are added automatically by hard bounces, spam complaints and one-click unsubscribes, and manually through this API.\n\nScoped to your account — a bounce recorded for one Crevio account never suppresses that address for another.","operationId":"listEmailSuppressions","x-speakeasy-name-override":"list","tags":["Email Suppressions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"reason","in":"query","required":false,"description":"Filter by why the address was suppressed.","schema":{"type":"string","enum":["bounced","complained","unsubscribed","manual"]}},{"name":"address","in":"query","required":false,"description":"Check one specific address; returns an empty list when it is not suppressed.","schema":{"type":"string"}}],"responses":{"200":{"description":"List of suppressed addresses","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_EmailSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.emailSuppressions.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Suppress an address","description":"Adds an address to the suppression list so no future send reaches it. Adding an address that is already suppressed returns the existing entry unchanged, rather than rewriting why it was suppressed.\n\n`reason` accepts `manual` (default) and `unsubscribed`. `bounced` and `complained` are set only by the provider's delivery events, so the record of why an address bounced stays truthful.","operationId":"createEmailSuppression","x-speakeasy-name-override":"create","tags":["Email Suppressions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSuppressionRequest"}}}},"responses":{"201":{"description":"Address suppressed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.emailSuppressions.create({\\n    address: \"person@example.com\",\\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/suppressions/batch":{"post":{"summary":"Suppress addresses in bulk","description":"Adds up to 100 addresses in one call, for importing a suppression list carried over from another provider. An invalid address rejects the whole batch rather than applying part of it, so you never have to diff what landed.","operationId":"batchCreateEmailSuppressions","x-speakeasy-name-override":"batch","tags":["Email Suppressions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailSuppressionBatchRequest"}}}},"responses":{"201":{"description":"Addresses suppressed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_EmailSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.emailSuppressions.batch({\\n    addresses: [\"person@example.com\"],\\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/suppressions/{id}":{"delete":{"summary":"Remove a suppressed address","description":"Removes an address from the suppression list so it can be emailed again. Accepts either the suppression id or the address itself.\n\nDo this only when the owner of the address has asked to be re-subscribed. Re-sending to an address that hard bounced or reported spam damages your sending reputation for every other recipient.","operationId":"deleteEmailSuppression","x-speakeasy-name-override":"delete","tags":["Email Suppressions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The suppression id (`esup_...`) or the suppressed email address.","schema":{"type":"string"}}],"responses":{"200":{"description":"Entry removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.emailSuppressions.delete({\\n    id: \"person@example.com\",\\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/email/threads":{"get":{"summary":"List threads","description":"Lists conversations across all inboxes.","operationId":"emailThreadsList","x-speakeasy-group":"email.threads","x-speakeasy-name-override":"list","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"label","in":"query","description":"Filter by label","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Threads","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailThread"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.threads.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/email/threads/search":{"get":{"summary":"Search threads","description":"Full-text search of threads by subject/preview.","operationId":"emailThreadsSearch","x-speakeasy-group":"email.threads","x-speakeasy-name-override":"search","tags":["Email"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","description":"Search query","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Threads","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailThread"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.email.threads.search({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/event_sessions/{id}":{"get":{"summary":"Get event session","description":"Returns a specific event session","operationId":"getEventSession","x-speakeasy-name-override":"get","tags":["EventSessions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Event session details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSession"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSessions.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update event session","description":"Updates an event session","operationId":"updateEventSession","x-speakeasy-name-override":"update","tags":["EventSessions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSessionRequest"}}}},"responses":{"200":{"description":"Event session updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSession"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSessions.update({\n    id: \"<id>\",\n    eventSessionRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete event session","description":"Deletes an event session","operationId":"deleteEventSession","x-speakeasy-name-override":"delete","tags":["EventSessions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Event session deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSessions.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/event_sources":{"get":{"summary":"List event sources","description":"Returns external event source registrations for the current account. Each source represents a deployed third-party trigger (e.g. a Gmail \"new email\" subscription) and emits as `external.<event_name>` when fired.","operationId":"listEventSources","x-speakeasy-name-override":"list","tags":["EventSources"],"security":[{"ApiKey":[]}],"parameters":[{"name":"vendor","in":"query","description":"Filter by the underlying integration vendor identifier returned on the event source","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of event sources","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_EventSource"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSources.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create event source","description":"Creates an external event source. Two kinds:\n\n- **Connected-app trigger** (default): deploys a third-party trigger. The account must have previously connected the underlying app (Gmail, Slack, Calendar, etc.) at /integrations. Use `GET /event_sources/available?app=...` to discover the `vendor_component_id` values. `configured_props` carries only that trigger's own settings (label, sheet, channel, filters) — the connected account it runs as is resolved automatically from the linked app, and the deploy fails with a message naming the app if none is connected.\n- **Inbound webhook** (`vendor: \"webhook\"`): a Crevio-hosted URL any service (Typeform, Stripe, GitHub, Zapier, a custom script) can POST JSON to. `event_name` is a short name (e.g. `typeform_applications`); the source's `event_name` becomes `webhook.<name>`. The response's `inbound_url` carries an unguessable token and is the credential — treat it as a secret. Set `signature_required: true` to also require an HMAC-SHA256 signature (`X-Hub-Signature-256`, `Typeform-Signature`, `X-Signature`, or Standard Webhooks headers); the signing secret is shown only to the account's admins in the Crevio app, never over the API. Unknown or inactive URLs answer 404; bodies over 1 MB answer 413.\n\nOnce active, every delivery fires `external.<event_name>` and any AiTask with `trigger_type: \"event\"` + matching `event_conditions.event_type` runs with the delivered payload as `event.data`.","operationId":"createEventSource","x-speakeasy-name-override":"create","tags":["EventSources"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSourceRequest"}}}},"responses":{"201":{"description":"Event source created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSource"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSources.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/event_sources/available":{"get":{"summary":"List available event triggers for an app","description":"Lists trigger templates available for a given connected app. The returned `id` value is what you pass back as `vendor_component_id` when creating an event source via `POST /event_sources`.","operationId":"listAvailableEventSources","x-speakeasy-name-override":"listAvailable","tags":["EventSources"],"security":[{"ApiKey":[]}],"parameters":[{"name":"app","in":"query","required":true,"description":"App name slug (e.g. `gmail`, `google_calendar`, `slack`)","schema":{"type":"string"}},{"name":"q","in":"query","description":"Optional search query","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max results (default 60, max 100)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Available trigger templates","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Use as `vendor_component_id` when creating an event source"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"configurable_props":{"type":"array","items":{"type":"object"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"description":"Trigger provider not configured for this environment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSources.listAvailable({\n    app: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/event_sources/{id}":{"get":{"summary":"Get event source","description":"Returns a specific event source.","operationId":"getEventSource","x-speakeasy-name-override":"get","tags":["EventSources"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Event source details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSource"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSources.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete event source","description":"Revokes the event source on the vendor side and removes it locally. Vendor revocation failures (already-revoked, vendor 404) are tolerated — the local row is always removed.","operationId":"deleteEventSource","x-speakeasy-name-override":"delete","tags":["EventSources"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Event source deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSources.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/event_sources/{id}/rotate":{"post":{"summary":"Rotate event source credentials","description":"Issues a new `inbound_url` token and signing secret for an inbound webhook source. The old URL answers 404 immediately, so update the sending service with the new `inbound_url`. 422 for sources that are not inbound webhooks.","operationId":"rotateEventSource","x-speakeasy-name-override":"rotate","tags":["EventSources"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Rotated event source","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSource"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSources.rotate({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/event_sources/{id}/test":{"post":{"summary":"Test-fire event source","description":"Delivers a sample payload to every task subscribed to this source's `external.<event_name>` as a **test run**: real research and output, but every write-style tool refuses and every delivery is captured on the run instead of being sent. Called from an agent chat, the chat is signalled when each run ends, so it need not poll. Returns the started runs. 422 when no task listens to the event yet, or when every subscribed task is busy or the account is out of AI credits.","operationId":"testEventSource","x-speakeasy-name-override":"test","tags":["EventSources"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","additionalProperties":true,"description":"The body a real delivery would carry; the run receives it as `event.data`. Defaults to `{}`."}}}}}},"responses":{"202":{"description":"Accepted — the test runs execute in the background.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_AiTaskRun"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSources.test({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/event_types":{"get":{"summary":"List event types","description":"Returns the bookable services on the account — the templates customers book against, each carrying its duration, pricing, availability schedule and location. Paginated.","operationId":"listEventTypes","x-speakeasy-name-override":"list","tags":["EventTypes"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of event types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_EventType"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventTypes.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create an event type","description":"Creates a bookable event type (a service customers can book, e.g. a 30-minute call).\n\nIt is free to book unless a paid price variant is linked to the `experience_id` it returns, via `POST /price_variants/{price_variant_id}/experiences`.","operationId":"createEventType","x-speakeasy-name-override":"create","tags":["EventTypes"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"Strategy Call","description":"Required on create."},"duration_minutes":{"type":"integer","default":30},"buffer_before_minutes":{"type":"integer","default":0},"buffer_after_minutes":{"type":"integer","default":0},"min_notice_minutes":{"type":"integer","default":240,"description":"Earliest a slot can be booked, in minutes from now."},"booking_window_days":{"type":"integer","default":60,"description":"How far into the future slots are offered."},"max_per_day":{"type":["integer","null"]},"capacity":{"type":"integer","default":1,"description":"Attendees per slot."},"location_type":{"type":"string","enum":["google_meet","zoom","custom_link","physical","phone"],"default":"google_meet"},"location_details":{"type":["string","null"],"description":"Address, dial-in, or meeting link (ignored for google_meet, which auto-generates a Meet link)."},"schedule_id":{"type":"string","description":"The availability schedule to use (sched_…)."}}}}}},"responses":{"201":{"description":"The created event type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventType"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventTypes.create({\n    name: \"Strategy Call\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/event_types/{id}":{"get":{"summary":"Retrieve an event type","description":"Retrieves a single event type, including its duration, buffers, notice and booking-window limits, capacity, location and the availability schedule it references.","operationId":"getEventType","x-speakeasy-name-override":"get","tags":["EventTypes"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"The event type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventType"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventTypes.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update an event type","description":"Updates an event type. Only the fields you send are changed. Changes apply to new bookings only — bookings already on the calendar keep the duration, buffers and location they were made with.","operationId":"updateEventType","x-speakeasy-name-override":"update","tags":["EventTypes"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"Strategy Call","description":"Required on create."},"duration_minutes":{"type":"integer","default":30},"buffer_before_minutes":{"type":"integer","default":0},"buffer_after_minutes":{"type":"integer","default":0},"min_notice_minutes":{"type":"integer","default":240,"description":"Earliest a slot can be booked, in minutes from now."},"booking_window_days":{"type":"integer","default":60,"description":"How far into the future slots are offered."},"max_per_day":{"type":["integer","null"]},"capacity":{"type":"integer","default":1,"description":"Attendees per slot."},"location_type":{"type":"string","enum":["google_meet","zoom","custom_link","physical","phone"],"default":"google_meet"},"location_details":{"type":["string","null"],"description":"Address, dial-in, or meeting link (ignored for google_meet, which auto-generates a Meet link)."},"schedule_id":{"type":"string","description":"The availability schedule to use (sched_…)."}}}}}},"responses":{"200":{"description":"The updated event type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventType"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventTypes.update({\n    id: \"<id>\",\n    requestBody: {\n      name: \"Strategy Call\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete an event type","description":"Deletes an event type so it can no longer be booked. Bookings already made against it are retained; delete or cancel those separately if you also want them gone.","operationId":"deleteEventType","x-speakeasy-name-override":"delete","tags":["EventTypes"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["event_type"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventTypes.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/event_types/{id}/slots":{"get":{"summary":"List available slots","description":"Returns open booking slots for the event type over a date range, accounting for availability, buffers, minimum notice, existing bookings, and (if connected) the account's Google Calendar busy times.","operationId":"listEventTypeSlots","x-speakeasy-name-override":"slots","tags":["EventTypes"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"from","in":"query","description":"Start date (YYYY-MM-DD). Defaults to today.","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","description":"End date (YYYY-MM-DD). Defaults to 14 days out.","schema":{"type":"string","format":"date"}},{"name":"timezone","in":"query","description":"IANA timezone for `local_start_time` in the response.","schema":{"type":"string","example":"America/New_York"}}],"responses":{"200":{"description":"Available slots","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["slot"]},"start_time":{"type":"string","format":"date-time","description":"UTC"},"end_time":{"type":"string","format":"date-time"},"local_start_time":{"type":"string","format":"date-time","description":"start_time in the requested timezone"}},"required":["object","start_time","end_time"]}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventTypes.slots({\n    id: \"<id>\",\n    timezone: \"America/New_York\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/events":{"get":{"summary":"List subscribable events","description":"Returns every event that an AiTask can subscribe to via `trigger_type: \"event\"` + `event_conditions.event_type`. Splits results into `internal` (always-on Crevio-emitted events like form_submission.created, order.paid) and `external` (this account's deployed event sources, e.g. `external.gmail.new_email`). The two task events, `task_run.completed` and `task_run.failed`, list `required_conditions: [\"after_task_id\"]`: a task subscribes to them only by naming the task it runs after.","operationId":"listEvents","x-speakeasy-name-override":"list","tags":["Events"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Subscribable events","content":{"application/json":{"schema":{"type":"object","properties":{"internal":{"type":"array","items":{"type":"object","properties":{"event_type":{"type":"string"},"description":{"type":"string"},"source":{"type":"string","enum":["internal"]},"required_conditions":{"type":"array","items":{"type":"string"},"description":"Keys `event_conditions` must also carry to subscribe to this event. Absent when `event_type` alone is enough."}}}},"external":{"type":"array","items":{"type":"object","properties":{"event_type":{"type":"string"},"event_source_id":{"type":"string"},"vendor":{"type":"string"},"vendor_component_id":{"type":"string"},"configured_props":{"type":"object"},"source":{"type":"string","enum":["external"]}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.events.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences":{"get":{"summary":"List experiences","description":"Returns a list of experiences for the current account","operationId":"listExperiences","x-speakeasy-name-override":"list","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"type","in":"query","description":"Filter by experience type","schema":{"type":"string","enum":["digital_download","course","written_content","website_embed","link","forum","discord_server","telegram","event","event_type"]}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of experiences","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Experience"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create experience (course, digital download, forum, event, link, etc.)","description":"Creates an experience of the given `type` — the entry point for selling a course, community/forum, live event, digital download, bookable session, or link-in-bio. Each `type` builds its own type-specific item with its own nested content endpoints (e.g. a `course` gets chapters → lessons; a `forum` gets topics/posts; an `event` gets sessions). A new experience starts empty — add content via the nested endpoints, set type-specific fields with PATCH /experiences/{id} via `details`, and make it sellable by linking it to a price variant with POST /price_variants/{id}/experiences. See the `type` field for the full list and per-type content model.","operationId":"createExperience","x-speakeasy-name-override":"create","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperienceCreateRequest"}}}},"responses":{"201":{"description":"Experience created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experience"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.create({\n    type: \"digital_download\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences/{experience_id}/chapters":{"get":{"summary":"List chapters","description":"Returns the chapters of a course experience","operationId":"listChapters","x-speakeasy-name-override":"list","tags":["Chapters"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of chapters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Chapter"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.chapters.list({\n    experienceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create chapter","description":"Adds a chapter to a course experience","operationId":"createChapter","x-speakeasy-name-override":"create","tags":["Chapters"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChapterRequest"}}}},"responses":{"201":{"description":"Chapter created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chapter"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.chapters.create({\n    experienceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences/{experience_id}/event_sessions":{"get":{"summary":"List event sessions","description":"Returns the sessions of an event experience","operationId":"listEventSessions","x-speakeasy-name-override":"list","tags":["EventSessions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of event sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_EventSession"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSessions.list({\n    experienceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create event session","description":"Adds a session to an event experience","operationId":"createEventSession","x-speakeasy-name-override":"create","tags":["EventSessions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSessionRequest"}}}},"responses":{"201":{"description":"Event session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSession"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.eventSessions.create({\n    experienceId: \"<id>\",\n    eventSessionRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences/{experience_id}/files":{"get":{"summary":"List digital download files","description":"Returns the deliverable files attached to a digital download experience","operationId":"listDigitalDownloadFiles","x-speakeasy-group":"experiences.files","x-speakeasy-name-override":"list","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The digital download experience ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_DigitalDownloadFile"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.files.list({\n    experienceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Upload digital download files","description":"Attaches already-uploaded files to a digital download experience as deliverables. Upload the bytes first with `POST /files` (presigned upload), then reference the resulting ids here: `{ \"file_ids\": [\"file_...\"] }`. Appends to the existing set and de-duplicates, so re-sending an already-attached id is a safe no-op. Returns the full file list.","operationId":"createDigitalDownloadFile","x-speakeasy-group":"experiences.files","x-speakeasy-name-override":"create","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The digital download experience ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_ids":{"type":"array","items":{"type":"string"},"description":"Ids of files already uploaded via POST /files (e.g. \"file_abc123\") to attach as deliverables"}},"required":["file_ids"]}}}},"responses":{"201":{"description":"Files attached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_DigitalDownloadFile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.files.create({\n    experienceId: \"<id>\",\n    requestBody: {\n      fileIds: [\n        \"<value 1>\",\n        \"<value 2>\",\n      ],\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences/{experience_id}/files/{id}":{"delete":{"summary":"Delete digital download file","description":"Removes a deliverable file from a digital download experience","operationId":"deleteDigitalDownloadFile","x-speakeasy-group":"experiences.files","x-speakeasy-name-override":"delete","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The digital download experience ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"File removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.files.delete({\n    experienceId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/experiences/{experience_id}/grants":{"get":{"summary":"List experience grants","description":"Returns the manual access grants for an experience","operationId":"listExperienceGrants","x-speakeasy-group":"experiences.grants","x-speakeasy-name-override":"list","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by grant status (`active`/`granted` or `revoked`)","schema":{"type":"string","enum":["active","granted","revoked"]}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of experience grants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_ExperienceGrant"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.grants.list({\n    experienceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Grant experience access","description":"Grants a customer manual access to an experience","operationId":"createExperienceGrant","x-speakeasy-group":"experiences.grants","x-speakeasy-name-override":"create","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperienceGrantRequest"}}}},"responses":{"201":{"description":"Grant created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperienceGrant"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.grants.create({\n    experienceId: \"<id>\",\n    experienceGrantRequest: {\n      customerId: \"<id>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences/{experience_id}/grants/{id}":{"delete":{"summary":"Revoke experience access","description":"Revokes a customer's manual access to an experience","operationId":"deleteExperienceGrant","x-speakeasy-group":"experiences.grants","x-speakeasy-name-override":"delete","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Grant revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperienceGrant"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.grants.delete({\n    experienceId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences/{experience_id}/link_items":{"get":{"summary":"List link items","description":"Returns the links of a link experience","operationId":"listLinkItems","x-speakeasy-name-override":"list","tags":["LinkItems"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of link items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_LinkItem"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.linkItems.list({\n    experienceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create link item","description":"Adds a link to a link experience","operationId":"createLinkItem","x-speakeasy-name-override":"create","tags":["LinkItems"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkItemRequest"}}}},"responses":{"201":{"description":"Link item created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkItem"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.linkItems.create({\n    experienceId: \"<id>\",\n    linkItemRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences/{experience_id}/posts":{"get":{"summary":"List forum posts","description":"Returns the posts of a forum experience","operationId":"listForumPosts","x-speakeasy-name-override":"list","tags":["ForumPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of posts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Post"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forumPosts.list({\n    experienceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create forum post","description":"Creates a post in a forum experience","operationId":"createForumPost","x-speakeasy-name-override":"create","tags":["ForumPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"201":{"description":"Post created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forumPosts.create({\n    experienceId: \"<id>\",\n    postRequest: {\n      content: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/experiences/{experience_id}/topics":{"get":{"summary":"List topics","description":"Returns the topics of a forum experience","operationId":"listTopics","x-speakeasy-name-override":"list","tags":["Topics"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of topics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Topic"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.topics.list({\n    experienceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create topic","description":"Adds a topic to a forum experience","operationId":"createTopic","x-speakeasy-name-override":"create","tags":["Topics"],"security":[{"ApiKey":[]}],"parameters":[{"name":"experience_id","in":"path","required":true,"description":"The experience ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicRequest"}}}},"responses":{"201":{"description":"Topic created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topic"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.topics.create({\n    experienceId: \"<id>\",\n    topicRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/experiences/{id_or_slug}":{"get":{"summary":"Get experience","description":"Returns a specific experience","operationId":"getExperience","x-speakeasy-name-override":"get","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Experience details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experience"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.get({\n    idOrSlug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update experience","description":"Updates an experience's base fields and, via `details`, its type-specific item fields. Collection content (chapters, lessons, link items, posts, event sessions) has its own nested endpoints and is not touched here.","operationId":"updateExperience","x-speakeasy-name-override":"update","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperienceUpdateRequest"}}}},"responses":{"200":{"description":"Experience updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experience"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.update({\n    idOrSlug: \"<value>\",\n    experienceUpdateRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete experience","description":"Deletes an experience and its type-specific content","operationId":"deleteExperience","x-speakeasy-name-override":"delete","tags":["Experiences"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Experience deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.experiences.delete({\n    idOrSlug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/files":{"get":{"summary":"List files","description":"Returns a list of files for the current account. Supports filtering by kind.","operationId":"listFiles","x-speakeasy-name-override":"list","tags":["Files"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"kind","in":"query","description":"Filter by kind","schema":{"type":"string","enum":["file","external_video"]}},{"name":"source","in":"query","description":"Filter by provenance","schema":{"type":"string","enum":["upload","url_import","external_video","generation"]}}],"responses":{"200":{"description":"List of files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_File"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.files.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create file","description":"Create a file. The endpoint discriminates between three intents based on which fields you send:\n\n**1. Presigned upload — `{ \"filename\": \"photo.png\" }`**\nReturns an `upload_url` and `upload_headers`. PUT your bytes to that URL, then call `POST /v1/files/{id}/uploaded` to transition the file from `pending` to `ready`.\n\n**2. Server-side URL import — `{ \"url\": \"https://...\" }`**\nCrevio downloads the bytes for you. Returns immediately with `upload_status: \"processing\"`. The status flips to `ready` (or `failed`) once the background download completes; poll `GET /v1/files/{id}` to check.\n\n**3. External video embed — `{ \"kind\": \"external_video\", \"url\": \"https://youtube.com/...\" }`**\nPins a YouTube, Vimeo, or Wistia URL as an embeddable reference. No bytes are stored; status returns as `ready` immediately. Non-embed URLs are rejected with 422.","operationId":"createFile","x-speakeasy-name-override":"create","tags":["Files"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileRequest"}}}},"responses":{"201":{"description":"File created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileCreateResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.files.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/files/{id}":{"get":{"summary":"Get file","description":"Returns a single file by its ID","operationId":"getFile","x-speakeasy-name-override":"get","tags":["Files"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"File ID (e.g., \"file_abc123\")","schema":{"type":"string"}}],"responses":{"200":{"description":"File details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.files.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update file","description":"Updates a file's mutable metadata. The stored bytes are immutable — re-upload to change a file's contents.\n\nAll fields are optional and follow PATCH semantics: only the fields you send are changed. For files you can rename via `filename` and set a `description` or `tags`. For external-video embeds you can update the source `url`.","operationId":"updateFile","x-speakeasy-name-override":"update","tags":["Files"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"File ID (e.g., \"file_abc123\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileUpdateRequest"}}}},"responses":{"200":{"description":"Updated file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.files.update({\n    id: \"<id>\",\n    fileUpdateRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete file","description":"Deletes a file and its associated storage object","operationId":"deleteFile","x-speakeasy-name-override":"delete","tags":["Files"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"File ID (e.g., \"file_abc123\")","schema":{"type":"string"}}],"responses":{"200":{"description":"File deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.files.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/files/{id}/uploaded":{"post":{"summary":"Confirm file upload","description":"Confirms a file upload after it has been uploaded to storage","operationId":"confirmFileUpload","x-speakeasy-name-override":"confirmUpload","tags":["Files"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Upload confirmed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.files.confirmUpload({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/form_submissions":{"get":{"summary":"List form submissions","description":"Returns a list of form submissions for the current account","operationId":"listFormSubmissions","x-speakeasy-name-override":"list","tags":["FormSubmissions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"respondent_type","in":"query","description":"Filter by respondent type","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of form submissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_FormSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formSubmissions.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create form submission","description":"Submits a response to a lead magnet form; creates the customer if needed and triggers delivery.","operationId":"createFormSubmission","x-speakeasy-name-override":"create","tags":["FormSubmissions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionRequest"}}}},"responses":{"201":{"description":"Form submission created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formSubmissions.create({\n    formId: \"<id>\",\n    email: \"Fay_Krajcik@hotmail.com\",\n    answers: {\n      \"key\": \"<value>\",\n      \"key1\": \"<value>\",\n      \"key2\": \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/form_submissions/{id}":{"get":{"summary":"Get form submission","description":"Returns a specific form submission","operationId":"getFormSubmission","x-speakeasy-name-override":"get","tags":["FormSubmissions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Form submission details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formSubmissions.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete form submission","description":"Permanently deletes a form submission and its answers. This cannot be undone.","operationId":"deleteFormSubmission","x-speakeasy-name-override":"delete","tags":["FormSubmissions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Form submission deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formSubmissions.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/formations":{"get":{"summary":"List formations","description":"Returns all business formations for the account, newest first.","operationId":"listFormations","x-speakeasy-name-override":"list","tags":["Formations"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of formations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Formation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formations.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Submit formation","description":"Create a draft formation and start payment. Returns a Stripe checkout_url unless the account has a saved card, in which case the charge happens inline and charged_inline is true.","operationId":"submitFormation","x-speakeasy-name-override":"submit","tags":["Formations"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["entity_type","state","naics_code","description","name_options","members","responsible_party","mailing_address"],"properties":{"entity_type":{"type":"string","enum":["LLC"],"description":"Today doola only supports LLC"},"state":{"type":"string","description":"Two-letter US state code (e.g. WY)"},"naics_code":{"type":"string","description":"6-digit NAICS code (from GET /v1/formations/naics_codes)"},"description":{"type":"string","maxLength":250},"phone_number":{"type":"string"},"name_options":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"object","required":["name","entity_type_ending"],"properties":{"name":{"type":"string"},"entity_type_ending":{"type":"string","enum":["LLC","L.L.C","L.L.C.","Limited Liability Company"],"x-speakeasy-enums":["LLC","LLCDotted","LLCDottedSuffix","LimitedLiabilityCompany"]}}}},"members":{"type":"array","minItems":1,"description":"LLC members. Ownership percentages must sum to exactly 100.","items":{"type":"object","required":["legal_first_name","legal_last_name","contact_full_name","ownership_percent","address"],"properties":{"legal_first_name":{"type":"string"},"legal_last_name":{"type":"string"},"contact_full_name":{"type":"string"},"is_natural_person":{"type":"boolean","default":true},"ownership_percent":{"type":"number"},"address":{"type":"object","required":["line1","city","state","postal_code","country"],"properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 Alpha-3"},"phone":{"type":"string"}}},"ssn":{"type":"string","description":"Optional. Format XXX-XX-XXXX. Not stored locally."}}}},"responsible_party":{"type":"object","required":["legal_first_name","legal_last_name","address"],"properties":{"legal_first_name":{"type":"string"},"legal_last_name":{"type":"string"},"email":{"type":"string"},"address":{"type":"object","required":["line1","city","state","postal_code","country"],"properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 Alpha-3"},"phone":{"type":"string"}}},"ssn":{"type":"string","description":"Optional. Not stored locally."}}},"mailing_address":{"type":"object","required":["line1","city","state","postal_code","country"],"properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string","description":"ISO 3166-1 Alpha-3"},"phone":{"type":"string"}}},"verification_id":{"type":"string","description":"KYC verification id from the active KYC provider. Optional — omitted means auto-resolve via the configured provider."}}}}}},"responses":{"201":{"description":"Formation created","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Formation"},{"type":"object","properties":{"checkout_url":{"type":["string","null"],"description":"Present when hosted checkout is needed"},"charged_inline":{"type":"boolean","description":"True when card-on-file charged inline without redirect"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"duplicate_record — a non-terminal formation already exists for this verification_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formations.submit({\n    entityType: \"LLC\",\n    state: \"Oklahoma\",\n    naicsCode: \"<value>\",\n    description: \"hippodrome emphasize ferociously eulogise through gadzooks phew reschedule beyond\",\n    nameOptions: [\n      {\n        name: \"<value>\",\n        entityTypeEnding: \"Limited Liability Company\",\n      },\n    ],\n    members: [\n      {\n        legalFirstName: \"<value>\",\n        legalLastName: \"<value>\",\n        contactFullName: \"<value>\",\n        ownershipPercent: 1306.42,\n        address: {\n          line1: \"<value>\",\n          city: \"Lindsaychester\",\n          state: \"Ohio\",\n          postalCode: \"26472\",\n          country: \"China\",\n        },\n      },\n    ],\n    responsibleParty: {\n      legalFirstName: \"<value>\",\n      legalLastName: \"<value>\",\n      address: {\n        line1: \"<value>\",\n        city: \"Elmoreworth\",\n        state: \"Delaware\",\n        postalCode: \"30968-7847\",\n        country: \"Liechtenstein\",\n      },\n    },\n    mailingAddress: {\n      line1: \"<value>\",\n      city: \"Flatleystad\",\n      state: \"Vermont\",\n      postalCode: \"95160\",\n      country: \"Russian Federation\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/formations/naics_codes":{"get":{"summary":"List NAICS codes","description":"Reference data: all NAICS industry codes accepted by doola for formation. Cached for 24h.","operationId":"listFormationNaicsCodes","x-speakeasy-name-override":"naicsCodes","tags":["Formations"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"NAICS codes","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"naics_code_id":{"type":"string"},"naics_code":{"type":"string"},"industry":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formations.naicsCodes();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/formations/{formation_id}/documents":{"get":{"summary":"List formation documents","description":"Documents become available after formation completes. Returned metadata does not include download URLs — fetch a single document to get one.","operationId":"listFormationDocuments","x-speakeasy-name-override":"list","tags":["FormationDocuments"],"security":[{"ApiKey":[]}],"parameters":[{"name":"formation_id","description":"The formation's ID.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"List of documents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_FormationDocument"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formationDocuments.list({\n    formationId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/formations/{formation_id}/documents/{id}":{"get":{"summary":"Download formation document","description":"Returns document metadata plus a fresh signed S3 URL valid for ~1 hour. Do not cache the URL.","operationId":"getFormationDocument","x-speakeasy-name-override":"download","tags":["FormationDocuments"],"security":[{"ApiKey":[]}],"parameters":[{"name":"formation_id","description":"The formation's ID.","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Document with download URL","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormationDocument"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formationDocuments.download({\n    formationId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/formations/{id}":{"get":{"summary":"Get formation","description":"Returns the current state of a formation, including status, documents, and the most recent doola error if any.","operationId":"getFormation","x-speakeasy-name-override":"get","tags":["Formations"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Formation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Formation"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formations.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/formations/{id}/retry_payment":{"post":{"summary":"Retry formation payment","description":"Regenerate the Stripe Checkout session for a formation whose previous payment attempt expired or failed. Resets the formation to draft and clears any prior doola_error. Refuses if the formation has already been paid for.","operationId":"retryFormationPayment","x-speakeasy-name-override":"retryPayment","tags":["Formations"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Formation with new checkout_url","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Formation"},{"type":"object","properties":{"checkout_url":{"type":["string","null"],"description":"Present when hosted checkout is needed"},"charged_inline":{"type":"boolean","description":"True when card-on-file charged inline without redirect"}}}]}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formations.retryPayment({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/formations/{id}/submit":{"post":{"summary":"Execute formation","description":"Submit a paid formation to doola. Idempotent — re-calling after submission returns current state. Also acts as a manual retry surface when SubmitFormationJob has exhausted its automatic retries: resets status from failed to pending and re-enqueues.","operationId":"executeFormation","x-speakeasy-name-override":"execute","tags":["Formations"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Formation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Formation"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.formations.execute({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/forms":{"get":{"summary":"List forms","description":"Returns all forms for the current account.","operationId":"listForms","x-speakeasy-name-override":"list","tags":["Forms"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of forms","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Form"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forms.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create form","description":"Creates a new Form, optionally with fields nested via form_fields_attributes. Set `delivery_type` (with `delivery_file_id`, `delivery_url` or `experience_id`) to email a file, link or experience to everyone who submits, and `tag_ids` to tag them. With `confirmation_required` (double opt-in), tags and delivery wait until the person confirms. Submissions come in through `POST /forms/{form_id}/submissions`.","operationId":"createForm","x-speakeasy-name-override":"create","tags":["Forms"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRequest"}}}},"responses":{"201":{"description":"Form created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forms.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/forms/{form_id}/submissions":{"parameters":[{"name":"form_id","description":"The form's ID.","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Create form submission","description":"Submits an answer set to a specific Form. Customer is upserted by email; lead-magnet purpose forms also trigger delivery.","operationId":"createFormSubmissionForForm","x-speakeasy-name-override":"submit","tags":["Forms"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":["string","null"]},"answers":{"type":"object","additionalProperties":true,"description":"Map of form_field id → answer value. A `consent` field takes `true` when the person agreed."},"ip_address":{"type":["string","null"],"description":"The submitter's IP address, kept with the submission as a record of consent."}},"required":["email","answers"]}}}},"responses":{"201":{"description":"Submission created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmission"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forms.submit({\n    formId: \"<id>\",\n    requestBody: {\n      email: \"Hadley.Kassulke49@yahoo.com\",\n      answers: {\n\n      },\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/forms/{id}":{"parameters":[{"name":"id","description":"The form's ID.","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get form","description":"Retrieves a single form with its fields, in the order they are presented, along with the settings that govern how submissions are collected.","operationId":"getForm","x-speakeasy-name-override":"get","tags":["Forms"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forms.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update form","description":"Update a Form's name, settings, confirmation behavior, or auto-tag list.","operationId":"updateForm","x-speakeasy-name-override":"update","tags":["Forms"],"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormRequest"}}}},"responses":{"200":{"description":"Updated form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forms.update({\n    id: \"<id>\",\n    formRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete form","description":"Permanently deletes a Form. Refuses with a 422 if the form has submissions — archive it instead via PATCH /forms/{id}/archive to preserve them.","operationId":"deleteForm","x-speakeasy-name-override":"delete","tags":["Forms"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Deleted form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forms.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/forms/{id}/archive":{"parameters":[{"name":"id","description":"The form's ID.","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Archive form","description":"Soft-deletes a Form by setting archived_at. The form stops appearing in the active list but its fields and submissions are preserved. Idempotent.","operationId":"archiveForm","x-speakeasy-name-override":"archive","tags":["Forms"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Archived form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forms.archive({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/forms/{id}/restore":{"parameters":[{"name":"id","description":"The form's ID.","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Restore form","description":"Unarchives a previously archived Form so it appears in the active list again. Idempotent.","operationId":"restoreForm","x-speakeasy-name-override":"restore","tags":["Forms"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Restored form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forms.restore({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/images/edit":{"post":{"summary":"Edit an image","description":"Submits an asynchronous image-to-image (editing) job to the fal.ai queue and returns the queued job immediately. Transforms one or more source images according to a text prompt — restyle a product photo, change a background, combine references. Poll `GET /v1/jobs/{id}` for status and results. Credits are charged only when the job completes successfully.","operationId":"editImage","x-speakeasy-name-override":"edit","tags":["Images"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageEditRequest"}}}},"responses":{"202":{"description":"Edit job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.images.edit({\n    input: {\n      prompt: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/images/generate":{"post":{"summary":"Generate an image","description":"Submits an asynchronous image generation job to the fal.ai queue and returns the queued job immediately. Poll `GET /v1/jobs/{id}` for status and results. Credits are charged only when the job completes successfully.","operationId":"generateImage","x-speakeasy-name-override":"generate","tags":["Images"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageGenerateRequest"}}}},"responses":{"202":{"description":"Generation job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.images.generate({\n    input: {\n      prompt: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/images/models":{"get":{"summary":"List image models","description":"Lists the image generation models available to `POST /v1/images/generate`, enriched with live fal.ai pricing.","operationId":"listImageModels","x-speakeasy-name-override":"listModels","tags":["Images"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"List of image models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_GenerationModel"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.images.listModels();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/images/stock":{"get":{"summary":"Search stock photos","description":"Searches free Pexels stock photography by keyword and returns ready-to-use, resolvable image URLs. No credits are charged (`credits_used` is always 0).","operationId":"searchStockImages","x-speakeasy-name-override":"stock","tags":["Images"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","required":true,"description":"The search term used to find photos.","schema":{"type":"string"}},{"name":"count","in":"query","description":"Number of photos to return (1–80).","schema":{"type":"integer","minimum":1,"maximum":80,"default":10}},{"name":"orientation","in":"query","description":"Filter by photo orientation.","schema":{"type":"string","enum":["landscape","portrait","square"]}},{"name":"color","in":"query","description":"Filter by dominant color.","schema":{"type":"string","enum":["red","orange","yellow","green","turquoise","blue","violet","pink","brown","black","gray","white"]}},{"name":"size","in":"query","description":"Filter by minimum photo size.","schema":{"type":"string","enum":["large","medium","small"]}}],"responses":{"200":{"description":"Matching stock photos","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["stock_photo_search_result"]},"query":{"type":"string"},"total":{"type":"integer","description":"Total number of matching photos available upstream."},"credits_used":{"type":"integer","enum":[0]},"photos":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string","description":"Link to the photo's page on Pexels."},"photographer":{"type":"string"},"photographer_url":{"type":"string"},"alt":{"type":["string","null"]},"width":{"type":"integer"},"height":{"type":"integer"},"avg_color":{"type":"string"},"src":{"type":"object","properties":{"original":{"type":"string"},"large":{"type":"string"},"medium":{"type":"string"},"small":{"type":"string"}}}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.images.stock({\n    query: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/images/upscale":{"post":{"summary":"Upscale an image","description":"Submits an asynchronous image super-resolution job to the fal.ai queue and returns the queued job immediately. Poll `GET /v1/jobs/{id}` for status and results. Credits are charged only when the job completes successfully.","operationId":"upscaleImage","x-speakeasy-name-override":"upscale","tags":["Images"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUpscaleRequest"}}}},"responses":{"202":{"description":"Upscale job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.images.upscale({\n    input: {\n      imageUrl: \"https://difficult-contrail.biz/\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/invoices":{"get":{"summary":"List invoices","description":"Returns a list of invoices for the current account","operationId":"listInvoices","x-speakeasy-name-override":"list","tags":["Invoices"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by invoice status","schema":{"type":"string","enum":["open","paid","past_due","void"]}},{"name":"customer","in":"query","description":"Filter by customer ID","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: customer, price_variant, order","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of invoices","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.invoices.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create invoice","description":"Creates a new invoice and sends it to the customer via email","operationId":"createInvoice","x-speakeasy-name-override":"create","tags":["Invoices"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}},"responses":{"201":{"description":"Invoice created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.invoices.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/invoices/{id}":{"get":{"summary":"Get invoice","description":"Returns a specific invoice","operationId":"getInvoice","x-speakeasy-name-override":"get","tags":["Invoices"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: customer, price_variant, order","schema":{"type":"string"}}],"responses":{"200":{"description":"Invoice details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.invoices.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/invoices/{id}/void":{"post":{"summary":"Void invoice","description":"Voids an open invoice. Cannot void paid invoices.","operationId":"voidInvoice","x-speakeasy-name-override":"void","tags":["Invoices"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Invoice voided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"description":"Invoice cannot be voided (already void or paid)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.invoices.void({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/jobs":{"get":{"summary":"List jobs","description":"Returns a list of generation jobs for the current account, most recent first. Filter by status and type.","operationId":"listJobs","x-speakeasy-name-override":"list","tags":["Jobs"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by job status","schema":{"type":"string","enum":["queued","processing","completed","failed","cancelled"]}},{"name":"type","in":"query","description":"Filter by job type","schema":{"type":"string","enum":["image_generation","image_edit","image_upscale","video_generation","audio_generation"]}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of jobs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.jobs.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/jobs/{id}":{"get":{"summary":"Get job","description":"Returns a specific generation job, including its status, progress, and result.","operationId":"getJob","x-speakeasy-name-override":"get","tags":["Jobs"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Job details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.jobs.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Cancel job","description":"Cancels a queued or processing job. No credits are charged for cancelled jobs, so credits_refunded is always 0. Returns 409 if the job is already in a terminal state.","operationId":"cancelJob","x-speakeasy-name-override":"cancel","tags":["Jobs"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Job cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCancelResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Job is not cancellable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.jobs.cancel({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/jobs/{id}/stream":{"get":{"summary":"Stream a job","description":"Follow an async generation job (images, video, audio, web) over Server-Sent Events instead of polling GET /jobs/{id}. Closes when the job reaches `completed`, `failed`, or `cancelled`.","operationId":"streamJob","x-speakeasy-name-override":"stream","tags":["Jobs"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Job id (job_...)","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/EventStream"},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/leads/company-enrich":{"get":{"summary":"Enrich a company by domain","description":"Returns firmographic details for a company from its domain — name, description, industry, size, location and social profiles. Backed by Hunter.io. Costs 7 credits per call.","operationId":"enrichLeadCompany","x-speakeasy-name-override":"companyEnrich","tags":["Leads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"domain","in":"query","description":"Company domain to enrich (e.g. stripe.com).","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Enriched company data","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["lead_company_enrichment"]},"found":{"type":["boolean","null"],"description":"False when Hunter has no match for the domain."},"domain":{"type":["string","null"]},"name":{"type":["string","null"]},"legal_name":{"type":["string","null"]},"description":{"type":["string","null"]},"industry":{"type":["string","null"]},"sector":{"type":["string","null"]},"employees":{"type":["string","integer","null"],"description":"Employee count or range (e.g. \"10K-50K\")."},"founded_year":{"type":["integer","null"]},"country":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"social":{"type":"object","properties":{"linkedin":{"type":["string","null"]},"twitter":{"type":["string","null"]},"facebook":{"type":["string","null"]}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-crevio-approval":"allow"}},"/leads/discover":{"post":{"summary":"Discover companies","description":"Finds companies (and their contacts) matching search filters such as a natural-language query, headcount, industry, technology or location. Backed by Hunter.io. Costs 2 credits per call.","operationId":"discoverLeads","x-speakeasy-name-override":"discover","x-crevio-read-only":true,"tags":["Leads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":["string","null"],"description":"Natural-language description of the companies to find."},"domain":{"type":["string","null"],"description":"Restrict to a specific domain."},"headcount":{"type":["string","null"],"description":"Employee count range (e.g. 1-10, 11-50, 51-200)."},"company_type":{"type":["string","null"]},"department":{"type":["string","null"]},"seniority":{"type":["string","null"]},"limit":{"type":["integer","null"],"description":"Max companies to return.","minimum":1,"maximum":100},"technology":{"type":"array","items":{"type":"string"}},"industry":{"type":"array","items":{"type":"string"}},"location":{"type":"array","items":{"type":"string"}}},"required":["query"]}}}},"responses":{"200":{"description":"Matching companies","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["lead_discovery_result"]},"total":{"type":["integer","null"]},"companies":{"type":"array","items":{"type":"object","properties":{"organization":{"type":["string","null"]},"domain":{"type":["string","null"]},"emails_count":{"type":["integer","null"],"description":"Total emails Hunter has for the company."}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-crevio-approval":"allow"}},"/leads/domain-search":{"get":{"summary":"Search a domain for emails","description":"Finds professional email addresses associated with a domain (or company name), each with a confidence score and the contact's name, role and department where known. Backed by Hunter.io. Costs 7 credits per 10 emails requested (`limit`), charged upfront.","operationId":"searchLeadDomains","x-speakeasy-name-override":"domainSearch","tags":["Leads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"domain","in":"query","description":"Domain to search (e.g. stripe.com). Required unless `company` is given.","schema":{"type":"string"},"required":true},{"name":"company","in":"query","description":"Company name to search when the domain is unknown.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max emails to return (1–100).","schema":{"type":"integer","minimum":1,"maximum":100,"default":10}},{"name":"type","in":"query","description":"Filter by email type.","schema":{"type":"string","enum":["personal","generic"]}},{"name":"seniority","in":"query","description":"Filter by seniority.","schema":{"type":"string","enum":["junior","senior","executive"]}},{"name":"department","in":"query","description":"Filter by department (e.g. executive, sales, marketing).","schema":{"type":"string"}}],"responses":{"200":{"description":"Emails found for the domain","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["lead_domain_search_result"]},"domain":{"type":["string","null"]},"organization":{"type":["string","null"]},"total":{"type":["integer","null"],"description":"Number of emails returned."},"emails":{"type":"array","items":{"type":"object","properties":{"value":{"type":["string","null"]},"type":{"type":["string","null"],"description":"Email type: personal or generic."},"confidence":{"type":["integer","null"],"description":"Hunter confidence score (0–100)."},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"position":{"type":["string","null"]},"seniority":{"type":["string","null"]},"department":{"type":["string","null"]},"linkedin":{"type":["string","null"]},"phone_number":{"type":["string","null"]},"verification_status":{"type":["string","null"],"description":"Deliverability status if Hunter has verified it."}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-crevio-approval":"allow"}},"/leads/email-finder":{"get":{"summary":"Find a person's email","description":"Finds the most likely professional email address for a named person at a domain or company, with a confidence score. Provide `domain` (or `company`) plus either `full_name`, or both `first_name` and `last_name`. Backed by Hunter.io. Costs 7 credits per call.","operationId":"findLeadEmail","x-speakeasy-name-override":"emailFinder","tags":["Leads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"domain","in":"query","description":"Domain of the person's employer (e.g. stripe.com). Required unless `company` is given.","schema":{"type":"string"},"required":true},{"name":"company","in":"query","description":"Company name when the domain is unknown.","schema":{"type":"string"}},{"name":"first_name","in":"query","description":"First name (required with `last_name` unless `full_name` is given).","schema":{"type":"string"}},{"name":"last_name","in":"query","description":"Last name (required with `first_name` unless `full_name` is given).","schema":{"type":"string"}},{"name":"full_name","in":"query","description":"Full name, as an alternative to first + last name.","schema":{"type":"string"}}],"responses":{"200":{"description":"The most likely email for the person","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["lead_email_result"]},"email":{"type":["string","null"]},"score":{"type":["integer","null"],"description":"Confidence score (0–100)."},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"position":{"type":["string","null"]},"company":{"type":["string","null"]},"domain":{"type":["string","null"]},"linkedin":{"type":["string","null"]},"phone_number":{"type":["string","null"]},"sources_count":{"type":["integer","null"]},"verification_status":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-crevio-approval":"allow"}},"/leads/email-verifier":{"get":{"summary":"Verify an email address","description":"Checks whether an email address is deliverable, returning a status and detailed deliverability signals (MX records, SMTP check, disposable/webmail flags). Backed by Hunter.io. Costs 2 credits per call.","operationId":"verifyLeadEmail","x-speakeasy-name-override":"emailVerifier","tags":["Leads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"email","in":"query","description":"Email address to verify.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Verification result","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["lead_email_verification"]},"email":{"type":["string","null"]},"status":{"type":["string","null"],"description":"valid, invalid, accept_all, webmail, disposable, unknown."},"result":{"type":["string","null"],"description":"deliverable, undeliverable, or risky."},"score":{"type":["integer","null"]},"regexp":{"type":["boolean","null"]},"gibberish":{"type":["boolean","null"]},"disposable":{"type":["boolean","null"]},"webmail":{"type":["boolean","null"]},"mx_records":{"type":["boolean","null"]},"smtp_server":{"type":["boolean","null"]},"smtp_check":{"type":["boolean","null"]},"accept_all":{"type":["boolean","null"]},"block":{"type":["boolean","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-crevio-approval":"allow"}},"/leads/enrich":{"get":{"summary":"Enrich a person by email","description":"Returns known professional details for a person from their email address — name, location, employment and social profiles. Backed by Hunter.io. Costs 2 credits per call.","operationId":"enrichLeadPerson","x-speakeasy-name-override":"enrichPerson","tags":["Leads"],"security":[{"ApiKey":[]}],"parameters":[{"name":"email","in":"query","description":"Email address to enrich.","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Enriched person data","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["lead_person_enrichment"]},"found":{"type":["boolean","null"],"description":"False when Hunter has no match for the email."},"email":{"type":["string","null"]},"name":{"type":"object","properties":{"full":{"type":["string","null"]},"first":{"type":["string","null"]},"last":{"type":["string","null"]}}},"location":{"type":["string","null"]},"employment":{"type":"object","properties":{"domain":{"type":["string","null"]},"name":{"type":["string","null"]},"title":{"type":["string","null"]},"role":{"type":["string","null"]},"seniority":{"type":["string","null"]}}},"social":{"type":"object","properties":{"linkedin":{"type":["string","null"]},"twitter":{"type":["string","null"]},"github":{"type":["string","null"]}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-crevio-approval":"allow"}},"/legal_pages":{"get":{"summary":"List legal pages","description":"Returns a list of legal pages (Terms of Service, Privacy Policy, Refund Policy)","operationId":"listLegalPages","x-speakeasy-name-override":"list","tags":["LegalPages"],"security":[{"ApiKey":[]}],"parameters":[{"name":"policy_type","in":"query","description":"Filter by policy type: terms_of_service, privacy_policy, refund_policy","schema":{"type":"string","enum":["terms_of_service","privacy_policy","refund_policy"]}},{"name":"query","in":"query","description":"Search by title","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of legal pages","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_LegalPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.legalPages.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/legal_pages/{id_or_slug}":{"get":{"summary":"Get legal page","description":"Returns a specific legal page by ID or slug","operationId":"getLegalPage","x-speakeasy-name-override":"get","tags":["LegalPages"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Legal page details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalPage"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.legalPages.get({\n    idOrSlug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update legal page","description":"Updates a legal page's body. Clearing the Terms of Service body also disables the require_terms_acceptance setting on the account.","operationId":"updateLegalPage","x-speakeasy-name-override":"update","tags":["LegalPages"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalPageRequest"}}}},"responses":{"200":{"description":"Legal page updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalPage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.legalPages.update({\n    idOrSlug: \"<value>\",\n    legalPageRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/lessons/{id}":{"get":{"summary":"Get lesson","description":"Returns a specific lesson","operationId":"getLesson","x-speakeasy-name-override":"get","tags":["Lessons"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Lesson details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lesson"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.lessons.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update lesson","description":"Updates a lesson's fields","operationId":"updateLesson","x-speakeasy-name-override":"update","tags":["Lessons"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonRequest"}}}},"responses":{"200":{"description":"Lesson updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lesson"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.lessons.update({\n    id: \"<id>\",\n    lessonRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete lesson","description":"Deletes a lesson","operationId":"deleteLesson","x-speakeasy-name-override":"delete","tags":["Lessons"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Lesson deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.lessons.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/lessons/{lesson_id}/files":{"get":{"summary":"List lesson files","description":"Returns the files attached to a lesson","operationId":"listLessonFiles","x-speakeasy-group":"lessons.files","x-speakeasy-name-override":"list","tags":["Lessons"],"security":[{"ApiKey":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"description":"The lesson ID","schema":{"type":"string"}}],"responses":{"200":{"description":"List of lesson files","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_LessonFile"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.lessons.files.list({\n    lessonId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Upload lesson files","description":"Attaches already-uploaded files to a lesson. Upload the bytes first with `POST /files` (presigned upload), then reference the resulting ids here: `{ \"file_ids\": [\"file_...\"] }`. Appends to the existing set and de-duplicates, so re-sending an already-attached id is a safe no-op. Returns the full file list.","operationId":"createLessonFile","x-speakeasy-group":"lessons.files","x-speakeasy-name-override":"create","tags":["Lessons"],"security":[{"ApiKey":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"description":"The lesson ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_ids":{"type":"array","items":{"type":"string"},"description":"Ids of files already uploaded via POST /files (e.g. \"file_abc123\") to attach to the lesson"}},"required":["file_ids"]}}}},"responses":{"201":{"description":"Files attached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_LessonFile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.lessons.files.create({\n    lessonId: \"<id>\",\n    requestBody: {\n      fileIds: [],\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/lessons/{lesson_id}/files/{id}":{"delete":{"summary":"Delete lesson file","description":"Removes a file attachment from a lesson","operationId":"deleteLessonFile","x-speakeasy-group":"lessons.files","x-speakeasy-name-override":"delete","tags":["Lessons"],"security":[{"ApiKey":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"description":"The lesson ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"File removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.lessons.files.delete({\n    lessonId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/link_items/{id}":{"patch":{"summary":"Update link item","description":"Updates a link item","operationId":"updateLinkItem","x-speakeasy-name-override":"update","tags":["LinkItems"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkItemRequest"}}}},"responses":{"200":{"description":"Link item updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkItem"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.linkItems.update({\n    id: \"<id>\",\n    linkItemRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete link item","description":"Deletes a link item","operationId":"deleteLinkItem","x-speakeasy-name-override":"delete","tags":["LinkItems"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Link item deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.linkItems.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/logs":{"get":{"summary":"List activity log events","description":"Returns the account's append-only activity log — agent/API actions on the account's primitives (gated connection runs, approval decisions), most recent first.","operationId":"listLogs","x-speakeasy-name-override":"list","tags":["Logs"],"security":[{"ApiKey":[]}],"parameters":[{"name":"action","in":"query","description":"Filter by exact action, e.g. `connection.execute`.","schema":{"type":"string"}},{"name":"actor_type","in":"query","description":"Filter by who acted.","schema":{"type":"string","enum":["agent","user","api","system"]}},{"name":"entity_type","in":"query","description":"Filter by affected primitive, e.g. `integration_approval`.","schema":{"type":"string"}},{"name":"entity_id","in":"query","description":"Filter by the affected primitive's id.","schema":{"type":"string"}},{"name":"after","in":"query","description":"Only events at or after this ISO-8601 timestamp.","schema":{"type":"string","format":"date-time"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of activity log events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Log"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.logs.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/me":{"get":{"summary":"Get current user profile","description":"Returns the authenticated user's profile data including their roles in the current account","operationId":"getMe","x-speakeasy-name-override":"get","tags":["Me"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"User profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.me.get();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/order_items/{id}":{"get":{"summary":"Get order item","description":"Returns details of a specific order item","operationId":"getOrderItem","x-speakeasy-name-override":"get","tags":["OrderItems"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: order, price_variant, product","schema":{"type":"string"}}],"responses":{"200":{"description":"Order item details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderItem"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.orderItems.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/orders":{"get":{"summary":"List orders","description":"Returns a list of orders for the current account","operationId":"listOrders","x-speakeasy-name-override":"list","tags":["Orders"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by order status","schema":{"type":"string","enum":["succeeded","pending","failed","refunded","partially_refunded"]}},{"name":"customer","in":"query","description":"Filter by customer ID","schema":{"type":"string"}},{"name":"processor","in":"query","description":"Filter by payment processor","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: customer, line_items","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"metadata","in":"query","required":false,"style":"deepObject","explode":true,"description":"Filter by caller-owned metadata key/value pairs, e.g. `metadata[campaign]=spring`. Repeatable (up to 10 keys); all pairs must match.","schema":{"type":"object","additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"List of orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Order"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.orders.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/orders/{id}":{"get":{"summary":"Get order","description":"Returns a specific order","operationId":"getOrder","x-speakeasy-name-override":"get","tags":["Orders"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: customer, line_items","schema":{"type":"string"}}],"responses":{"200":{"description":"Order details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.orders.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/orders/{order_id}/order_items":{"get":{"summary":"List order items","description":"Returns order items for a specific order","operationId":"listOrderItems","x-speakeasy-name-override":"list","tags":["OrderItems"],"security":[{"ApiKey":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"description":"The order ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of order items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_OrderItem"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.orderItems.list({\n    orderId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/phone-consents":{"get":{"summary":"List call consents","description":"Returns the consent records on the account — who agreed to be called or messaged, for which purpose, and when. This is the audit trail behind outbound calling, so keep it rather than deriving consent from elsewhere.","operationId":"listPhoneConsents","x-speakeasy-name-override":"list","tags":["Phone Consents"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"List of consents","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_PhoneConsent"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneConsents.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Record call consent","description":"Records consent to call a number for a purpose (marketing or transactional). Required before an outbound call can be placed.","operationId":"createPhoneConsent","x-speakeasy-name-override":"create","tags":["Phone Consents"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneConsentRequest"}}}},"responses":{"201":{"description":"Consent recorded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneConsent"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneConsents.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/phone-consents/{id}":{"delete":{"summary":"Revoke call consent","description":"Revokes a previously recorded consent. The number can no longer be called for that purpose.","operationId":"deletePhoneConsent","x-speakeasy-name-override":"revoke","tags":["Phone Consents"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Consent revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneConsents.revoke({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/phone-numbers":{"get":{"summary":"List phone numbers","description":"Lists the phone numbers the account owns. A number is required to receive inbound calls and serves as caller ID for outbound calls.","operationId":"listPhoneNumbers","x-speakeasy-name-override":"list","tags":["Phone Numbers"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"List of phone numbers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_PhoneNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneNumbers.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Provision a phone number","description":"Provisions a new phone number for the account and routes its inbound calls to an AI voice agent. Pass `country` (ISO 3166-1 alpha-2, default `US`) for a number in any country Crevio sells; prices differ by country. Most countries provision instantly (201). Regulated countries first need the business verified: the response is 202 with `status: awaiting_verification` and a `verification_url` to send the business owner to (pass `verification_return_url` to bring them back). The number then moves to `in_review`, and becomes `active` (or `declined`, with a `review_note`) once the carrier decides, usually within 1-3 days. The first month is charged in credits when the number becomes active, and each month it is kept after that; a number the balance cannot renew is released.","operationId":"createPhoneNumber","x-speakeasy-name-override":"create","tags":["Phone Numbers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberRequest"}}}},"responses":{"201":{"description":"Phone number provisioned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"202":{"description":"Verification needed before the number is issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"The balance cannot pay for the number's first month","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneNumbers.create();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/phone-numbers/{id}":{"get":{"summary":"Get a phone number","description":"Retrieves a provisioned phone number by id.","operationId":"getPhoneNumber","x-speakeasy-name-override":"get","tags":["Phone Numbers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Phone number details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneNumbers.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Release a phone number","description":"Releases a provisioned phone number. Inbound calls to it stop routing; outbound falls back to the shared caller ID.","operationId":"deletePhoneNumber","x-speakeasy-name-override":"delete","tags":["Phone Numbers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Phone number released","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneNumbers.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"},"patch":{"summary":"Update a phone number","description":"Update what the AI does on inbound calls (inbound_objective), pause/resume the number (status), or set where calls reach a person, without releasing the number. `forward_to` is a phone number in the same country as this one (E.164). With `call_routing: agent` (default) the AI answers and transfers callers who ask for a person to `forward_to`; with `call_routing: forward` every call rings `forward_to` directly, and the caller can leave a voicemail if it does not connect. Forwarded minutes use credits.","operationId":"updatePhoneNumber","x-speakeasy-name-override":"update","tags":["Phone Numbers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberRequest"}}}},"responses":{"200":{"description":"Phone number updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneNumbers.update({\n    id: \"<id>\",\n    phoneNumberRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/phone-suppressions":{"get":{"summary":"List do-not-call entries","description":"Returns the do-not-call list: numbers that must not be contacted regardless of any consent on record. Suppressions always win over consent.","operationId":"listPhoneSuppressions","x-speakeasy-name-override":"list","tags":["Phone Suppressions"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"List of suppressed numbers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_PhoneSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneSuppressions.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Add a do-not-call entry","description":"Adds a number to the account's internal do-not-call list. A suppressed number is never called, overriding any consent.","operationId":"createPhoneSuppression","x-speakeasy-name-override":"create","tags":["Phone Suppressions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneSuppressionRequest"}}}},"responses":{"201":{"description":"Number suppressed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneSuppression"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneSuppressions.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/phone-suppressions/{id}":{"delete":{"summary":"Remove a do-not-call entry","description":"Removes a number from the do-not-call list, allowing it to be contacted again where consent exists. Only do this when the owner of the number has asked to be re-subscribed.","operationId":"deletePhoneSuppression","x-speakeasy-name-override":"delete","tags":["Phone Suppressions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Entry removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.phoneSuppressions.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/posts/{id}":{"get":{"summary":"Get forum post","description":"Returns a specific forum post","operationId":"getForumPost","x-speakeasy-name-override":"get","tags":["ForumPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Post details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forumPosts.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update forum post","description":"Updates a forum post","operationId":"updateForumPost","x-speakeasy-name-override":"update","tags":["ForumPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostRequest"}}}},"responses":{"200":{"description":"Post updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forumPosts.update({\n    id: \"<id>\",\n    postRequest: {\n      content: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"},"delete":{"summary":"Delete forum post","description":"Deletes a forum post","operationId":"deleteForumPost","x-speakeasy-name-override":"delete","tags":["ForumPosts"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Post deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.forumPosts.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/price_variants":{"get":{"summary":"List price variants","description":"Returns all price variants for the current account. Optionally filter by product.","operationId":"listPriceVariants","x-speakeasy-name-override":"list","tags":["PriceVariants"],"security":[{"ApiKey":[]}],"parameters":[{"name":"product","in":"query","description":"Filter by product ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of price variants","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_PriceVariant"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.priceVariants.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create price variant","description":"Creates a new price variant for a product","operationId":"createPriceVariant","x-speakeasy-name-override":"create","tags":["PriceVariants"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceVariantRequest"}}}},"responses":{"201":{"description":"Price variant created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceVariant"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.priceVariants.create({\n    product: \"Tasty Soft Chicken\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/price_variants/{id}":{"get":{"summary":"Get price variant","description":"Returns a specific price variant","operationId":"getPriceVariant","x-speakeasy-name-override":"get","tags":["PriceVariants"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Price variant details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceVariant"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.priceVariants.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update price variant","description":"Updates an existing price variant. Set archived to true to archive it.","operationId":"updatePriceVariant","x-speakeasy-name-override":"update","tags":["PriceVariants"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceVariantUpdateRequest"}}}},"responses":{"200":{"description":"Price variant updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceVariant"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.priceVariants.update({\n    id: \"<id>\",\n    priceVariantUpdateRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete price variant","description":"Deletes a price variant.","operationId":"deletePriceVariant","x-speakeasy-name-override":"delete","tags":["PriceVariants"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Price variant deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.priceVariants.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/price_variants/{price_variant_id}/experiences":{"post":{"summary":"Link experience to price variant","description":"Links an experience to a price variant so buying that variant grants the experience. Back-grants access to everyone who already bought.","operationId":"linkPriceVariantExperience","x-speakeasy-name-override":"linkExperience","tags":["PriceVariants"],"security":[{"ApiKey":[]}],"parameters":[{"name":"price_variant_id","in":"path","required":true,"description":"The price variant ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceVariantExperienceRequest"}}}},"responses":{"201":{"description":"Experience linked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Experience"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.priceVariants.linkExperience({\n    priceVariantId: \"<id>\",\n    priceVariantExperienceRequest: {\n      experienceId: \"<id>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/price_variants/{price_variant_id}/experiences/{id}":{"delete":{"summary":"Unlink experience from price variant","description":"Unlinks an experience from a price variant and revokes the access it granted","operationId":"unlinkPriceVariantExperience","x-speakeasy-name-override":"unlinkExperience","tags":["PriceVariants"],"security":[{"ApiKey":[]}],"parameters":[{"name":"price_variant_id","in":"path","required":true,"description":"The price variant ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Experience unlinked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExperienceLinkDeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.priceVariants.unlinkExperience({\n    priceVariantId: \"<id>\",\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/products":{"get":{"summary":"List products","description":"Returns a list of products for the current account. Supports filtering by status and searching by name.","operationId":"listProducts","x-speakeasy-name-override":"list","tags":["Products"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by product status","schema":{"type":"string","enum":["draft","active","archived"]}},{"name":"query","in":"query","description":"Search by product name","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: reviews","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"metadata","in":"query","required":false,"style":"deepObject","explode":true,"description":"Filter by caller-owned metadata key/value pairs, e.g. `metadata[campaign]=spring`. Repeatable (up to 10 keys); all pairs must match.","schema":{"type":"object","additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"List of products","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Product"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.products.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create product","description":"Creates a new product. A product can't be set to `active` until it has at least one price variant — create it as `draft` (the default), add a price variant via POST /price_variants, then PATCH the product to `active`.","operationId":"createProduct","x-speakeasy-name-override":"create","tags":["Products"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"201":{"description":"Product created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.products.create({\n    images: [\n      \"file_abc123\",\n    ],\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/products/{id_or_slug}":{"get":{"summary":"Get product details","description":"Returns detailed information about a specific product","operationId":"getProduct","x-speakeasy-name-override":"get","tags":["Products"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: reviews","schema":{"type":"string"}}],"responses":{"200":{"description":"Product details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.products.get({\n    idOrSlug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update product","description":"Updates an existing product","operationId":"updateProduct","x-speakeasy-name-override":"update","tags":["Products"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"200":{"description":"Product updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.products.update({\n    idOrSlug: \"<value>\",\n    productRequest: {\n      images: [\n        \"file_abc123\",\n      ],\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete product","description":"Deletes a product. Only products with no orders and no Stripe product ID can be deleted.","operationId":"deleteProduct","x-speakeasy-name-override":"delete","tags":["Products"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Product deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.products.delete({\n    idOrSlug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/refunds":{"get":{"summary":"List refunds","description":"Returns a list of refunds for the current account","operationId":"listRefunds","x-speakeasy-name-override":"list","tags":["Refunds"],"security":[{"ApiKey":[]}],"parameters":[{"name":"order","in":"query","description":"Filter by order ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of refunds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Refund"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.refunds.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create refund","description":"Creates a new refund for an order","operationId":"createRefund","x-speakeasy-name-override":"create","tags":["Refunds"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"201":{"description":"Refund created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.refunds.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/refunds/{id}":{"get":{"summary":"Get refund","description":"Returns a specific refund","operationId":"getRefund","x-speakeasy-name-override":"get","tags":["Refunds"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Refund details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.refunds.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/reviews":{"get":{"summary":"List reviews","description":"Returns reviews for products in the current account","operationId":"listReviews","x-speakeasy-name-override":"list","tags":["Reviews"],"security":[{"ApiKey":[]}],"parameters":[{"name":"product","in":"query","description":"Filter by product ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of reviews","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Review"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.reviews.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create review","description":"Creates a new review for a product","operationId":"createReview","x-speakeasy-name-override":"create","tags":["Reviews"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCreateRequest"}}}},"responses":{"201":{"description":"Review created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.reviews.create({\n    product: \"Oriental Fresh Hat\",\n    rating: 34216,\n    content: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/reviews/{id}":{"get":{"summary":"Get review","description":"Returns a specific review","operationId":"getReview","x-speakeasy-name-override":"get","tags":["Reviews"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Review details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.reviews.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update review","description":"Updates an existing review","operationId":"updateReview","x-speakeasy-name-override":"update","tags":["Reviews"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}}},"responses":{"200":{"description":"Review updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.reviews.update({\n    id: \"<id>\",\n    reviewRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"},"delete":{"summary":"Delete review","description":"Deletes a review","operationId":"deleteReview","x-speakeasy-name-override":"delete","tags":["Reviews"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Review deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.reviews.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/reviews/{id}/position":{"post":{"summary":"Reorder review","description":"Updates the position of a review within its product's review list. Other reviews are reindexed accordingly.","operationId":"positionReview","x-speakeasy-name-override":"position","tags":["Reviews"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewPositionRequest"}}}},"responses":{"200":{"description":"Review reordered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Review"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.reviews.position({\n    id: \"<id>\",\n    reviewPositionRequest: {\n      position: 881463,\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/schedules":{"get":{"summary":"List schedules","description":"Returns the reusable availability schedules on the account. Event types reference a schedule to decide which slots to offer, so several services can share one set of working hours. Paginated.","operationId":"listSchedules","x-speakeasy-name-override":"list","tags":["Schedules"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of schedules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Schedule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.schedules.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create a schedule","description":"Creates a reusable availability schedule. Event types reference a schedule to determine their open slots.","operationId":"createSchedule","x-speakeasy-name-override":"create","tags":["Schedules"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"Working hours"},"time_zone":{"type":"string","example":"America/New_York","description":"IANA timezone the availability is expressed in"},"availability":{"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"integer","minimum":0,"maximum":6,"description":"0 = Sunday … 6 = Saturday"},"start_time":{"type":"string","example":"09:00","description":"24h local time HH:MM"},"end_time":{"type":"string","example":"17:00"}},"required":["day_of_week","start_time","end_time"]},"description":"Weekly recurring availability windows. Replaces the existing set."},"overrides":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-12-25"},"unavailable":{"type":"boolean","default":true},"start_time":{"type":["string","null"],"example":"12:00"},"end_time":{"type":["string","null"],"example":"14:00"}},"required":["date"]},"description":"Per-date exceptions (days off or custom hours)."}}}}}},"responses":{"201":{"description":"The created schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\nimport { RFCDate } from \"@crevio/sdk/types\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.schedules.create({\n    name: \"Working hours\",\n    timeZone: \"America/New_York\",\n    availability: [\n      {\n        dayOfWeek: 380660,\n        startTime: \"09:00\",\n        endTime: \"17:00\",\n      },\n    ],\n    overrides: [\n      {\n        date: new RFCDate(\"2026-12-25\"),\n        startTime: \"12:00\",\n        endTime: \"14:00\",\n      },\n    ],\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/schedules/{id}":{"get":{"summary":"Retrieve a schedule","description":"Retrieves a single availability schedule, including its weekly working hours, its time zone, and any date-specific overrides such as holidays.","operationId":"getSchedule","x-speakeasy-name-override":"get","tags":["Schedules"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"The schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.schedules.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update a schedule","description":"Updates a schedule. Passing `availability` or `overrides` replaces that set wholesale.","operationId":"updateSchedule","x-speakeasy-name-override":"update","tags":["Schedules"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"Working hours"},"time_zone":{"type":"string","example":"America/New_York","description":"IANA timezone the availability is expressed in"},"availability":{"type":"array","items":{"type":"object","properties":{"day_of_week":{"type":"integer","minimum":0,"maximum":6,"description":"0 = Sunday … 6 = Saturday"},"start_time":{"type":"string","example":"09:00","description":"24h local time HH:MM"},"end_time":{"type":"string","example":"17:00"}},"required":["day_of_week","start_time","end_time"]},"description":"Weekly recurring availability windows. Replaces the existing set."},"overrides":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","example":"2026-12-25"},"unavailable":{"type":"boolean","default":true},"start_time":{"type":["string","null"],"example":"12:00"},"end_time":{"type":["string","null"],"example":"14:00"}},"required":["date"]},"description":"Per-date exceptions (days off or custom hours)."}}}}}},"responses":{"200":{"description":"The updated schedule","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\nimport { RFCDate } from \"@crevio/sdk/types\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.schedules.update({\n    id: \"<id>\",\n    requestBody: {\n      name: \"Working hours\",\n      timeZone: \"America/New_York\",\n      availability: [\n        {\n          dayOfWeek: 998369,\n          startTime: \"09:00\",\n          endTime: \"17:00\",\n        },\n      ],\n      overrides: [\n        {\n          date: new RFCDate(\"2026-12-25\"),\n          startTime: \"12:00\",\n          endTime: \"14:00\",\n        },\n      ],\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete a schedule","description":"Deletes a schedule. Event types using it keep working but lose their availability until reassigned.","operationId":"deleteSchedule","x-speakeasy-name-override":"delete","tags":["Schedules"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Deletion confirmation.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["schedule"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.schedules.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/secrets":{"get":{"summary":"List secrets","operationId":"listSecrets","x-speakeasy-name-override":"list","tags":["Secrets"],"security":[{"ApiKey":[]}],"description":"Lists the account's environment variables: shared secrets, reusable across its sites, plus a roll-up of every site-owned one. Values are masked here — each entry exposes only `last4`. Read one with the reveal endpoint.","parameters":[{"name":"target","in":"query","description":"Filter by deployment target.","schema":{"type":"string","enum":["preview","production"]}},{"name":"scope","in":"query","description":"`shared` for account-level secrets, `site` for secrets a single site owns.","schema":{"type":"string","enum":["shared","site"]}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of secrets (values masked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Secret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"},"post":{"summary":"Create a secret","operationId":"createSecret","x-speakeasy-name-override":"create","tags":["Secrets"],"security":[{"ApiKey":[]}],"description":"Encrypts and stores a secret. Pass `site_id` to make one site own it, or omit it for a shared secret and list the sites it applies to in `site_ids`. The decrypted `value` comes back in this response only — later reads expose just `last4`.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string","description":"Environment-variable name (e.g. STRIPE_SECRET_KEY). Uppercase letters, digits and underscores; cannot start with a digit or use the reserved CREVIO_ prefix."},"value":{"type":"string","description":"The secret value to encrypt."},"site_id":{"type":"string","description":"Site that owns the secret. Omit for a shared, account-level secret."},"target":{"type":"string","enum":["preview","production"],"description":"Deployment target the secret applies to. Defaults to `production`."},"description":{"type":"string","description":"Human-readable note about what this secret is for."},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites a shared secret applies to. Empty leaves it dormant — stored, but injected nowhere."},"egress_host":{"type":"string","description":"Host the in-chat agent may call with this secret injected server-side. The value itself is never exposed to the model."},"egress_header":{"type":"string","description":"Header the secret rides in when calling `egress_host` (e.g. Authorization)."}}}}}},"responses":{"201":{"description":"The secret, including its decrypted value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask","x-crevio-locked":true}},"/secrets/{secret_id}":{"patch":{"summary":"Update a secret","operationId":"updateSecret","x-speakeasy-name-override":"update","tags":["Secrets"],"security":[{"ApiKey":[]}],"description":"Rotates the value or edits the metadata of an existing secret. A secret's name and owning site are fixed at creation; `site_ids` applies to shared secrets only.","parameters":[{"name":"secret_id","in":"path","required":true,"description":"The secret's ID (e.g., \"secret_3f9a1c0b7d2e4a6f8b1c3d5e\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","description":"Replacement value. Omit to leave it untouched."},"description":{"type":"string","description":"Human-readable note about what this secret is for."},"site_ids":{"type":"array","items":{"type":"string"},"description":"Sites a shared secret applies to. Empty leaves it dormant — stored, but injected nowhere."},"egress_host":{"type":"string","description":"Host the in-chat agent may call with this secret injected server-side. The value itself is never exposed to the model."},"egress_header":{"type":"string","description":"Header the secret rides in when calling `egress_host` (e.g. Authorization)."}}}}}},"responses":{"200":{"description":"The updated secret (value masked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask","x-crevio-locked":true},"delete":{"summary":"Delete a secret","operationId":"deleteSecret","x-speakeasy-name-override":"delete","tags":["Secrets"],"security":[{"ApiKey":[]}],"description":"Deletes the secret and removes it from the environment of every site it applied to. Permanent — the encrypted value cannot be recovered.","parameters":[{"name":"secret_id","in":"path","required":true,"description":"The secret's ID (e.g., \"secret_3f9a1c0b7d2e4a6f8b1c3d5e\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Secret deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask","x-crevio-locked":true}},"/secrets/{secret_id}/reveal":{"post":{"summary":"Reveal a secret","operationId":"revealSecret","x-speakeasy-name-override":"reveal","tags":["Secrets"],"security":[{"ApiKey":[]}],"description":"Returns the decrypted `value` of a single secret. A POST rather than a GET so the secret never lands in a URL, a request log, or browser history.","parameters":[{"name":"secret_id","in":"path","required":true,"description":"The secret's ID (e.g., \"secret_3f9a1c0b7d2e4a6f8b1c3d5e\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"The secret, including its decrypted value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask","x-crevio-locked":true}},"/sites":{"get":{"summary":"List sites","description":"Returns a list of AI sites for the current account","operationId":"listSites","x-speakeasy-name-override":"list","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"default","in":"query","description":"Filter by default flag","schema":{"type":"boolean"}},{"name":"query","in":"query","description":"Search by name, subdomain, or domain","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"metadata","in":"query","required":false,"style":"deepObject","explode":true,"description":"Filter by caller-owned metadata key/value pairs, e.g. `metadata[campaign]=spring`. Repeatable (up to 10 keys); all pairs must match.","schema":{"type":"object","additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"List of AI sites","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_AiSite"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create site","description":"Creates an additional AI site under the current account. Refuses if the proposed subdomain is taken.","operationId":"createSite","x-speakeasy-name-override":"create","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSiteCreateRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"201":{"description":"AI site created. When created with a `prompt`, an engineering build is started automatically — `build_task_id` references it; track progress via `GET /tasks/{id}`. Do not start another build for the site.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSite"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Plan upgrade required — the account has reached its plan's site limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/sites/{id}":{"get":{"summary":"Get site","description":"Returns a specific AI site","operationId":"getSite","x-speakeasy-name-override":"get","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"AI site details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSite"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update site","description":"Updates an existing AI site. Domain changes trigger the full custom-hostname lifecycle.","operationId":"updateSite","x-speakeasy-name-override":"update","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSiteRequest","properties":{"metadata":{"type":"object","additionalProperties":{"type":["string","number","boolean","null"],"description":"Stored as a string; null (or \"\") deletes the key on update."},"description":"Set of key-value pairs you can attach to the object — store your own system's IDs or grouping labels. Keys max 40 chars (up to 50 keys), values stored as strings max 500 chars. On update, keys merge individually; set a key to null or \"\" to remove it. Echoed back on reads and in webhook payloads."}}}}}},"responses":{"200":{"description":"AI site updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSite"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Plan upgrade required — setting show_referral_badge to false requires the Business plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.update({\n    id: \"<id>\",\n    aiSiteRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete site","description":"Tears down the AI site (unpublishes it, purges its database and file storage, deletes the row). Refuses the default AI site — the account must always own at least one.","operationId":"deleteSite","x-speakeasy-name-override":"delete","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"AI site deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/sites/{id}/analytics":{"get":{"summary":"Get site analytics","description":"Returns traffic analytics for a site over a date range: pageview/visitor totals, new vs. returning visitors, a default conversion funnel, a per-day time series, and top pages, referrers, and dimensional breakdowns (device, browser, OS, geography, and UTM parameters). Defaults to the last 30 days; the range cannot exceed 366 days.","operationId":"getSiteAnalytics","x-speakeasy-name-override":"analytics","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"start_date","in":"query","description":"Start of the date range (inclusive), as an ISO-8601 date (YYYY-MM-DD). Defaults to 30 days before end_date.","schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","description":"End of the date range (inclusive), as an ISO-8601 date (YYYY-MM-DD). Defaults to today.","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Site analytics for the requested period","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["site_analytics"]},"site_id":{"type":"string","description":"Prefix id of the site (e.g. site_abc123)."},"period":{"type":"object","description":"The resolved date range the metrics cover.","properties":{"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"}},"required":["start_date","end_date"]},"totals":{"type":"object","description":"Aggregate pageviews and unique visitors over the period.","properties":{"pageviews":{"type":"integer"},"visitors":{"type":"integer"}}},"new_vs_returning":{"type":"object","description":"Visitors active in the period split by whether their first-ever visit was before the period started.","properties":{"new_visitors":{"type":"integer"},"returning_visitors":{"type":"integer"}}},"funnel":{"type":"array","description":"Ordered conversion funnel; each stage counts visitors who reached it within 24h of the first stage.","items":{"type":"object","properties":{"label":{"type":"string"},"visitors":{"type":"integer"}}}},"by_day":{"type":"array","description":"Per-day pageviews and visitors time series.","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"pageviews":{"type":"integer"},"visitors":{"type":"integer"}}}},"top_pages":{"type":"array","description":"Top 20 pages by pageviews.","items":{"type":"object","properties":{"path":{"type":"string"},"pageviews":{"type":"integer"},"visitors":{"type":"integer"}}}},"top_referrers":{"type":"array","description":"Top 20 referrer hosts by visitors.","items":{"type":"object","properties":{"source":{"type":"string"},"pageviews":{"type":"integer"},"visitors":{"type":"integer"}}}},"custom_events":{"type":"array","description":"Top 20 custom events by hit count, with unique visitors and any associated revenue.","items":{"type":"object","properties":{"event_name":{"type":"string"},"hits":{"type":"integer"},"visitors":{"type":"integer"},"revenue":{"type":"number"}}}},"by_device":{"$ref":"#/components/schemas/SiteAnalyticsDimension"},"by_browser":{"$ref":"#/components/schemas/SiteAnalyticsDimension"},"by_os":{"$ref":"#/components/schemas/SiteAnalyticsDimension"},"by_country":{"$ref":"#/components/schemas/SiteAnalyticsDimension"},"by_region":{"$ref":"#/components/schemas/SiteAnalyticsDimension"},"by_city":{"$ref":"#/components/schemas/SiteAnalyticsDimension"},"by_utm_source":{"$ref":"#/components/schemas/SiteAnalyticsDimension"},"by_utm_medium":{"$ref":"#/components/schemas/SiteAnalyticsDimension"},"by_utm_campaign":{"$ref":"#/components/schemas/SiteAnalyticsDimension"}},"required":["object","site_id","period","totals"],"example":{"object":"site_analytics","site_id":"site_ExD8Y6PWw0xJrfD9QKVgvnRZ","period":{"start_date":"2026-05-05","end_date":"2026-06-04"},"totals":{"pageviews":1820,"visitors":642},"new_vs_returning":{"new_visitors":511,"returning_visitors":131},"funnel":[{"label":"Landing","visitors":642},{"label":"Product view","visitors":188},{"label":"Checkout","visitors":54},{"label":"Purchase","visitors":21}],"by_day":[{"date":"2026-06-04","pageviews":96,"visitors":38}],"top_pages":[{"path":"/","pageviews":820,"visitors":410}],"top_referrers":[{"source":"google.com","pageviews":240,"visitors":180}],"custom_events":[{"event_name":"purchase","hits":21,"visitors":21,"revenue":1049.79}],"by_device":[{"value":"mobile","pageviews":1100,"visitors":402}],"by_country":[{"value":"US","pageviews":900,"visitors":360}]}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.analytics({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/sites/{id}/db/migrate":{"post":{"summary":"Change a database directly","description":"**Structural changes belong on the development database.** Pass `environment: \"development\"` and reshape it as freely as you like — it holds no customer data, so there is no gate and nothing to approve. Deploying compares the two databases and applies the difference to production as one change; nobody names or numbers it.\n\nStructural SQL aimed at production is refused (`structural_change_needs_schema`): production's shape moves only by deploying. What production accepts here is **data** — seeding rows, correcting a value, a backfill — recorded under the filename you choose, checksummed so an edited migration can't silently fail to land.\n\nA Time Travel restore point is captured before anything runs and returned as `bookmark`. Statements that destroy data are refused unless `allow_destructive` is true, and only when the target actually holds rows.","operationId":"migrateSiteDatabase","x-speakeasy-name-override":"migrateDatabase","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Unique migration name, e.g. `0003_add_ratings`. Used as the idempotency key in the ledger."},"sql":{"type":"string","description":"The migration SQL. Multiple statements may be separated by `;`. Runs in one batch with the ledger insert, so a failed migration is never recorded as applied."},"allow_destructive":{"type":"boolean","description":"Set to `true` to permit data-destroying statements (DROP/TRUNCATE/unqualified DELETE|UPDATE) against tables that hold rows. Defaults to `false`.","default":false},"environment":{"type":"string","enum":["development","production"],"default":"production","description":"Which database to change. `development` is the one you build against — created on first use, and where every structural change belongs. `production` is the live site's, and accepts data changes only. Defaults to `production`."}},"required":["name","sql"]}}}},"responses":{"200":{"description":"Migration result","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"name":{"type":"string"},"applied":{"type":"boolean"},"already_applied":{"type":"boolean"},"destructive":{"type":"boolean"},"bookmark":{"type":["string","null"]},"destructive_statements":{"type":"array","description":"The statements that were classified as destructive, each with the `table` it targets and that table's `row_count`.","items":{"type":"object"}},"risks":{"type":"array","description":"Statements that keep every row but can still fail against existing data or break the currently live version of the site (column renames, NOT NULL without DEFAULT, UNIQUE indexes). Reported, never blocked.","items":{"type":"object"}},"checksum":{"type":["string","null"],"description":"SHA-256 of the migration SQL, recorded in the ledger to detect later edits to the file."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/sites/{id}/db/migrations":{"get":{"summary":"List applied database migrations","description":"Every change applied to this database, oldest first. Each carries `restore_to` — the state the database was in *before* that change ran — so any of them can be undone with `db/restore` without anyone having captured a restore point in advance.","operationId":"listSiteDatabaseMigrations","x-speakeasy-name-override":"listDatabaseMigrations","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"environment","in":"query","required":false,"schema":{"type":"string","enum":["development","production"],"default":"production"},"description":"Which database to use. A site normally has exactly one, `production`, and that is the default — the live database the site reads. `development` is only valid if a separate development database has been provisioned for this site; asking for one that doesn't exist is an error rather than a silent fall back to production. The response echoes the environment that was used."}],"responses":{"200":{"description":"Applied migrations","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"migrations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"applied_at":{"type":"string"}}}},"migration_count":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/sites/{id}/db/query":{"post":{"summary":"Query a site's database","description":"Run SQL against a site's database.\n\n**Against production this reads only** — `SELECT`, `WITH`, `PRAGMA`, `EXPLAIN`. A write here would leave no record of what ran, no restore point and nobody asked, so data changes go through `db/migrate` and shape changes go through the development database and a deploy.\n\nThe development database accepts anything: it holds no customer data, and experimenting on it is what it is for.","operationId":"querySiteDatabase","x-speakeasy-name-override":"queryDatabase","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sql":{"type":"string","description":"The SQL to execute. Multiple statements may be separated by `;` — the last statement that returns rows is surfaced."},"environment":{"type":"string","enum":["development","production"],"default":"production","description":"Which database to use. A site normally has exactly one, `production`, and that is the default — the live database the site reads. `development` is only valid if a separate development database has been provisioned for this site; asking for one that doesn't exist is an error rather than a silent fall back to production. The response echoes the environment that was used."}},"required":["sql"]}}}},"responses":{"200":{"description":"Query result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseQueryResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.queryDatabase({\n    id: \"<id>\",\n    requestBody: {\n      sql: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/sites/{id}/db/restore":{"post":{"summary":"Restore a site's database to a point in time","description":"Rewinds the site's database to a restore point or an ISO 8601 `timestamp` — the undo for data you didn't mean to lose. One of the two is required. Restore points come from `db/migrations`, where every applied change carries the `restore_to` it began from; nothing has to capture one in advance.\n\nThe restore overwrites current state, but earlier points are retained, so an overshoot can itself be undone via `previous_bookmark`. Points are kept for 30 days.\n\n**This is not how a schema change is removed.** A restore rewinds this database's shape too, but the development database still has the newer one — so the next deploy compares them and puts it back. To drop a table for good, remove it from the development database and deploy.","operationId":"restoreSiteDatabase","x-speakeasy-name-override":"restoreDatabase","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bookmark":{"type":"string","description":"A restore point, as returned by `db/migrations` (`restore_to`) or by a migration's own response."},"timestamp":{"type":"string","description":"An ISO 8601 timestamp to rewind to (nearest point at or before)."},"environment":{"type":"string","enum":["development","production"],"default":"production","description":"Which database to use. A site normally has exactly one, `production`, and that is the default — the live database the site reads. `development` is only valid if a separate development database has been provisioned for this site; asking for one that doesn't exist is an error rather than a silent fall back to production. The response echoes the environment that was used."}}}}}},"responses":{"200":{"description":"Restore result","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"bookmark":{"type":"string"},"previous_bookmark":{"type":"string"},"message":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"ask"}},"/sites/{id}/db/schema":{"get":{"summary":"Read the database's current schema","description":"The schema a database actually has, as the SQL that would recreate it. Pass `environment` to read the development database (what you are building against) or production (what the site is serving). Production's shape is changed only by deploying — it is a diff of development against it — so this is for understanding, not authoring.","operationId":"getSiteDatabaseSchema","x-speakeasy-name-override":"getSchema","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Current schema","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"environment":{"type":"string"},"schema":{"type":"string","description":"CREATE statements for every table, index and trigger."},"object_count":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/sites/{id}/db/schema/plan":{"get":{"summary":"Preview what deploying would change about the schema","description":"The difference between the development database and the live one, described before it is applied — the statements, what they mean in plain language, and whether anything would be lost. Nothing runs. Show this to the user before deploying: a schema change that only becomes visible once it has happened is one nobody gets to object to.","operationId":"previewSiteSchemaChange","x-speakeasy-name-override":"previewSchemaChange","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Planned schema change","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string"},"up_to_date":{"type":"boolean","description":"The live database already matches; deploying would change nothing."},"summary":{"type":"array","items":{"type":"string"},"description":"What the change means, in language a non-technical merchant can act on."},"statements":{"type":"array","items":{"type":"string"},"description":"The DDL that would run."},"notes":{"type":"array","items":{"type":"string"},"description":"Anything that would be removed or rebuilt."},"destructive":{"type":"boolean"},"sql":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/sites/{id}/deploy":{"post":{"summary":"Deploy a site","description":"Builds and publishes the site's current `main` branch to production. Asynchronous: responds `202` with a `pending` deployment; poll `GET /sites/{id}/deployments` for the outcome (`live` or `failed`).\n\nIf a deploy is already in flight, that one is returned instead of starting a second build — still `202`. A build this call started is `pending` with a null `started_at`; one already running is `building`.","operationId":"deploySite","x-speakeasy-name-override":"deploy","tags":["Deployments"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"202":{"description":"The queued deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.deployments.deploy({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/sites/{id}/deployments":{"get":{"summary":"List deployments","description":"Deployment history for a site, newest first. Append-only — each push to production, rollback or unpublish records a deployment; `is_live` marks the one serving production traffic.\n\n`stages` lists the pipeline stages the deploy entered, oldest first, each with `name` (`provisioning`, `fetching`, `attaching`, `installing`, `building`, `checking`, `migrating`, `deploying`, `verifying`, `restoring`), `status` (`active`, `succeeded`, `failed`, `canceled`), `details`, `started_at`, `finished_at` and `duration_seconds`. `current_stage` is the open one, null once the deploy ends. `elapsed_seconds` counts up while it runs; `duration_seconds` is null until it ends. `log` is null here — use the logs endpoint.\n\nReading this endpoint terminalizes deploys whose build worker died without reporting a result.","operationId":"listSiteDeployments","x-speakeasy-name-override":"list","tags":["Deployments"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of deployments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Deployment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.deployments.list({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/sites/{id}/deployments/{deployment_id}/logs":{"get":{"summary":"Get deployment build logs","description":"Build output for a deployment, one entry per pipeline stage, oldest first.\n\nEach stage's `log` is capped at 64KB of bytes, keeping the tail. Values matching common credential shapes are replaced with `[redacted]` before the log is stored.","operationId":"getDeploymentLogs","x-speakeasy-name-override":"logs","tags":["Deployments"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"deployment_id","in":"path","required":true,"description":"The deployment to read logs for, e.g. `dpl_04LNm3QYe3kZS1deabkVJxGn`.","schema":{"type":"string"}}],"responses":{"200":{"description":"The deployment's stages, each with the output its commands produced","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["deployment_stage"]},"name":{"type":"string","enum":["provisioning","fetching","attaching","installing","building","checking","migrating","deploying","verifying","restoring"]},"status":{"type":"string","enum":["active","succeeded","failed","canceled"],"description":"How the stage ended. `active` while it is still running."},"details":{"type":["string","null"],"description":"What this run of the stage is doing when the name alone is too coarse."},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time","description":"Null while the stage is still running."},"duration_seconds":{"type":"number"},"log":{"type":["string","null"],"description":"Combined stdout/stderr of the stage's commands, capped at 64KB (tail kept)."}}}},"has_more":{"type":"boolean"},"url":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/sites/{id}/deployments/{deployment_id}/stream":{"get":{"summary":"Stream a deployment","description":"Follow a build over Server-Sent Events instead of polling the deployments list — each event carries the deployment with its stages. Closes when the deployment reaches `live`, `failed`, `superseded`, or `unpublished`.","operationId":"streamDeployment","x-speakeasy-name-override":"stream","tags":["Deployments"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Site id (site_...)","schema":{"type":"string"}},{"name":"deployment_id","in":"path","required":true,"description":"Deployment id (dpl_...)","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/EventStream"},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/sites/{id}/rollback":{"post":{"summary":"Roll back a site","description":"Re-ships an earlier deployment's commit to production. Defaults to the previous shipped deployment (the \"undo the bad deploy\" case); pass `deployment_id` to target a specific historical deployment instead. Asynchronous: responds `202` with a new `pending` deployment whose status moves to `live`/`failed`. Poll `GET /sites/{id}/deployments` to track it.","operationId":"rollbackSite","x-speakeasy-name-override":"rollback","tags":["Deployments"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deployment_id":{"type":"string","description":"Id of a specific deployment to roll back to (e.g. \"dpl_abc123\"), from the deploy history. Omit to roll back to the previous shipped deployment."},"restore_database":{"type":"boolean","description":"Also rewind the site's database to the schema that deployment was serving, using the restore point captured before the deploy that followed it. Off by default: rolling code back is cheap, but a database restore discards every row written since the target shipped. Returns `no_restore_point` when no restore point was recorded after the target.","default":false}}}}}},"responses":{"202":{"description":"The queued rollback deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.deployments.rollback({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/sites/{id}/secrets":{"get":{"summary":"List a site's secrets","description":"Returns the encrypted runtime secrets injected into this site as environment variables, newest first. The decrypted value is never included here — each entry exposes only its last four characters (`last4`). Use the reveal endpoint to read a value.","operationId":"listSiteSecrets","x-speakeasy-name-override":"listSecrets","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of the site's secrets (values masked)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Secret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.listSecrets({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Add a secret to a site","description":"Encrypts and stores a new secret on this site, then injects it into the live site as an environment variable (asynchronously, if the site is deployed). The decrypted `value` is returned only in this response — store it if you need it, as later list responses expose just `last4`. Names must be valid environment-variable identifiers and may not use the reserved `CREVIO_` prefix.","operationId":"createSiteSecret","x-speakeasy-name-override":"createSecret","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Environment-variable name (e.g. STRIPE_SECRET_KEY). Uppercase letters, digits, and underscores; cannot start with a digit or use the reserved CREVIO_ prefix."},"value":{"type":"string","description":"The secret value to encrypt and inject."},"description":{"type":"string","description":"Optional human-readable note about what this secret is for."}},"required":["name","value"]}}}},"responses":{"201":{"description":"Secret created (includes the decrypted value)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.createSecret({\n    id: \"<id>\",\n    requestBody: {\n      name: \"<value>\",\n      value: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/sites/{id}/secrets/{secret_id}":{"delete":{"summary":"Remove a secret from a site","description":"Deletes the secret and removes it from the live site's environment. This is permanent — the encrypted value cannot be recovered afterward.","operationId":"deleteSiteSecret","x-speakeasy-name-override":"removeSecret","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"secret_id","in":"path","required":true,"description":"The secret's ID (e.g., \"secret_3f9a1c0b7d2e4a6f8b1c3d5e\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Secret removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.removeSecret({\n    id: \"<id>\",\n    secretId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/sites/{id}/secrets/{secret_id}/reveal":{"post":{"summary":"Reveal a site's secret","description":"Returns the decrypted `value` for a single secret. This is a POST (not GET) so the secret never lands in a URL, request log, or browser history.","operationId":"revealSiteSecret","x-speakeasy-name-override":"revealSecret","tags":["Sites"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"secret_id","in":"path","required":true,"description":"The secret's ID (e.g., \"secret_3f9a1c0b7d2e4a6f8b1c3d5e\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"The secret, including its decrypted value","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Secret"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.sites.revealSecret({\n    id: \"<id>\",\n    secretId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/skills":{"get":{"summary":"Search skills","description":"Searches the AI skills catalog, plus the skills your account uploaded (`visibility: \"private\"`, never in the public catalog). Filter by free-text `search` (matches name and description) and `category`, or pass `installed=true` for only the skills installed on your account. Each result includes `install_status`, `installed_version` and `update_available` for your account.","operationId":"listSkills","x-speakeasy-name-override":"list","tags":["Skills"],"security":[{"ApiKey":[]}],"parameters":[{"name":"search","in":"query","description":"Free-text query matched against skill name and description.","schema":{"type":"string"}},{"name":"category","in":"query","description":"Filter by exact category.","schema":{"type":"string"}},{"name":"installed","in":"query","description":"`true` returns only the skills installed on your account, to check what is installed or which have an update available.","schema":{"type":"boolean"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of skills","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_AiSkill"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.skills.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/skills/upload":{"post":{"summary":"Upload a skill","operationId":"uploadSkill","x-speakeasy-name-override":"upload","tags":["Skills"],"security":[{"ApiKey":[]}],"description":"Creates a private skill from an upload and installs it for your account. Send one `file` (a `.zip` bundle or a lone `SKILL.md`), or a folder as repeated `files` with `paths` in the same order to preserve subdirectories. As JSON, send the manifest's text as `skill_md`, and any other files as `resources`. The skill is stored exactly as sent. Private skills are visible to your account only; they never enter the public catalog.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"A `.zip` bundle, or a single markdown manifest (any filename — a lone `.md` is read as SKILL.md)."},"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"Folder contents, one part per file. Use instead of `file`."},"paths":{"type":"array","items":{"type":"string"},"description":"Path of each entry in `files`, same order, so subdirectories survive the upload. Defaults to each file's basename."}}}},"application/json":{"schema":{"type":"object","required":["skill_md"],"properties":{"skill_md":{"type":"string","description":"The full SKILL.md text, frontmatter included, exactly as the skill's author wrote it."},"resources":{"type":"object","additionalProperties":{"type":"string"},"description":"Other files of the skill as text, keyed by path relative to the skill's folder (e.g. `references/checklist.md`)."}}}}}},"responses":{"201":{"description":"The skill, installed for your account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSkill"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/skills/{slug}":{"get":{"summary":"Get a skill","description":"Retrieves a single published skill by its slug, including its `install_status` for your account.","operationId":"getSkill","x-speakeasy-name-override":"get","tags":["Skills"],"security":[{"ApiKey":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"The skill slug (e.g., \"og-image-design\").","schema":{"type":"string"}}],"responses":{"200":{"description":"Skill details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSkill"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.skills.get({\n    slug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/skills/{slug}/install":{"post":{"summary":"Install a skill","description":"Installs the skill into your account's agent skill library, making it available to the AI agent. Returns the skill with its updated `install_status`. Installing an already-installed skill returns an error.","operationId":"installSkill","x-speakeasy-name-override":"install","tags":["Skills"],"security":[{"ApiKey":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"The skill slug (e.g., \"og-image-design\").","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Skill installed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSkill"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.skills.install({\n    slug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/skills/{slug}/uninstall":{"post":{"summary":"Uninstall a skill","description":"Removes the skill from your account's agent skill library. Returns the skill with its updated `install_status`. Uninstalling a skill that isn't installed returns an error.","operationId":"uninstallSkill","x-speakeasy-name-override":"uninstall","tags":["Skills"],"security":[{"ApiKey":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"The skill slug (e.g., \"og-image-design\").","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Skill uninstalled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSkill"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.skills.uninstall({\n    slug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/skills/{slug}/update":{"post":{"summary":"Update a skill","description":"Updates an installed skill to the catalog's current `version`. Check `update_available` first: on a skill that is already current this changes nothing. Updating a skill that isn't installed returns an error.","operationId":"updateSkill","x-speakeasy-name-override":"update","tags":["Skills"],"security":[{"ApiKey":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"The skill slug (e.g., \"og-image-design\").","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Skill updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiSkill"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.skills.update({\n    slug: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/accounts":{"get":{"summary":"List connected accounts","description":"Lists all connected social accounts.","operationId":"listSocialAccounts","x-speakeasy-name-override":"listAccounts","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of connected accounts","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SocialAccount"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.listAccounts({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/accounts/{id}":{"delete":{"summary":"Disconnect an account","description":"Disconnects a social account.","operationId":"disconnectSocialAccount","x-speakeasy-name-override":"disconnect","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Account disconnected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.disconnect({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/socials/accounts/{id}/analytics":{"get":{"summary":"Get account analytics","description":"Returns analytics for a connected account.","operationId":"getSocialAccountAnalytics","x-speakeasy-name-override":"accountAnalytics","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Account analytics","content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string"},"platform":{"type":"string"},"analytics":{"type":["object","null"],"description":"Normalized analytics, or null when unavailable. Fields are omitted when a platform does not expose them.","properties":{"followers":{"type":"integer","description":"Current follower count."},"following":{"type":"integer","description":"Number of accounts this account follows."},"total_posts":{"type":"integer","description":"Lifetime post count on the platform."},"impressions_30d":{"type":"integer","description":"Total impressions over the last 30 days."},"engagements_30d":{"type":"integer","description":"Likes + comments + shares + saves over the last 30 days."},"engagement_rate":{"type":"number","description":"engagements_30d / impressions_30d, as a percentage."}}}},"required":["account_id","platform"],"example":{"account_id":"sacct_abc123","platform":"twitter","analytics":{"followers":12450,"following":843,"total_posts":156,"impressions_30d":84200,"engagements_30d":5320,"engagement_rate":6.32}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.accountAnalytics({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/accounts/{id}/boards":{"get":{"summary":"List Pinterest boards","description":"Lists the boards a connected Pinterest account can pin to. Pass a board's `id` as `platform_data.pinterest.board_id` when creating a post. Returns `422` for an account on any other platform.","operationId":"listSocialAccountBoards","x-speakeasy-name-override":"accountBoards","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}}],"responses":{"200":{"description":"The account's boards","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Board ID, as accepted by `platform_data.pinterest.board_id`."},"name":{"type":"string"},"description":{"type":["string","null"]},"privacy":{"type":["string","null"]},"url":{"type":["string","null"],"description":"The board's page on Pinterest."}},"required":["id","name"]}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"],"example":{"object":"list","data":[{"id":"696721073543856366","name":"Toddler","description":null,"privacy":"PUBLIC","url":"https://www.pinterest.com/acme/toddler/"}],"has_more":false,"url":"/v1/socials/accounts/sacct_abc123/boards"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/socials/accounts/{id}/label":{"post":{"summary":"Label an account","description":"Assigns a custom label to a connected account and returns it.","operationId":"labelSocialAccount","x-speakeasy-name-override":"label","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}},"required":["label"]}}}},"responses":{"200":{"description":"Updated account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.label({\n    id: \"<id>\",\n    requestBody: {\n      label: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/activate":{"post":{"summary":"Activate social posting","description":"Enables social posting for the current account. Idempotent. Requires an active subscription.","operationId":"activateSocials","x-speakeasy-name-override":"activate","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Activated","content":{"application/json":{"schema":{"type":"object","properties":{"activated":{"type":"boolean"},"account_count":{"type":"integer"}},"required":["activated","account_count"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"An active subscription is required to use social posting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.activate();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/comments":{"get":{"summary":"List comment activity","description":"Cross-account feed of posts with comment counts across all connected channels, for triaging where to engage. Paginates by opaque cursor (next_cursor).","operationId":"listSocialComments","x-speakeasy-name-override":"commentsFeed","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"platform","in":"query","required":false,"description":"Filter by platform (e.g. twitter, instagram).","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Filter by connected account (sacct_ prefix id).","schema":{"type":"string"}},{"name":"min_comments","in":"query","required":false,"description":"Only include posts with at least this many comments.","schema":{"type":"integer"}},{"name":"since","in":"query","required":false,"description":"Only include posts created after this time (ISO 8601).","schema":{"type":"string"}},{"name":"sort_by","description":"Field to sort by. Defaults to the comment's creation time.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort_order","description":"Sort direction, `asc` or `desc`. Defaults to `desc`.","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","description":"Maximum number of comments to return.","in":"query","required":false,"schema":{"type":"integer"}},{"name":"cursor","in":"query","required":false,"description":"Opaque pagination cursor from a previous response's next_cursor.","schema":{"type":"string"}}],"responses":{"200":{"description":"Comment-activity feed","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.commentsFeed();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/connect":{"post":{"summary":"Get an OAuth connect URL","description":"Returns an OAuth URL to connect a social account on the given platform. Activates the account on first connect; requires an active subscription.","operationId":"connectSocialAccount","x-speakeasy-name-override":"connect","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["twitter","linkedin","instagram","facebook","youtube","tiktok","pinterest","threads","reddit","bluesky"]},"redirect_url":{"type":"string","description":"URL to redirect to after connection"},"login_method":{"type":"string","enum":["instagram_login","facebook_login"],"description":"Instagram only; ignored on every other platform. `instagram_login` (the default) authorizes the Instagram professional account directly. `facebook_login` authorizes the Facebook Page linked to that account instead, and every call then runs through the Page. Use it when Instagram's own dialog will not render a consent screen for the account, or when the seller manages Instagram through a Page."}},"required":["platform","redirect_url"]}}}},"responses":{"200":{"description":"Connect URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"An active subscription is required to use social posting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.connect({\n    platform: \"pinterest\",\n    redirectUrl: \"https://pitiful-strategy.name\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/portal":{"post":{"summary":"Create a hosted connect portal","description":"Returns the URL of Crevio's hosted integrations page, where the user can connect, reconnect, and disconnect every social platform in one place. For a direct per-platform OAuth URL, use POST /socials/connect.","operationId":"createSocialsPortal","x-speakeasy-name-override":"portal","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["twitter","linkedin","instagram","facebook","youtube","tiktok","pinterest","threads","reddit","bluesky"]}}},"required":["redirect_url"]}}}},"responses":{"200":{"description":"Hosted portal URL","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"URL of the hosted connect page"},"note":{"type":"string"}},"required":["url"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  await crevio.socials.portal({\n    redirectUrl: \"https://willing-pendant.net\",\n  });\n\n\n}\n\nrun();"}],"x-crevio-read-only":true,"x-crevio-approval":"allow"}},"/socials/posts":{"get":{"summary":"List posts","description":"Lists social posts with optional status/date filtering and pagination.","operationId":"listSocialPosts","x-speakeasy-name-override":"listPosts","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","description":"Return only posts in this state.","in":"query","schema":{"type":"string","enum":["draft","publishing","scheduled","posted","failed"]}},{"name":"from","in":"query","description":"Created-at lower bound (ISO 8601)","schema":{"type":"string"}},{"name":"to","in":"query","description":"Created-at upper bound (ISO 8601)","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of posts","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SocialPost"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.listPosts({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create a post","description":"Creates a draft post, or publishes/schedules it immediately when publish_now or scheduled_at is set.","operationId":"createSocialPost","x-speakeasy-name-override":"create","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"title":{"type":["string","null"]},"platforms":{"type":"array","items":{"type":"string","enum":["twitter","linkedin","instagram","facebook","youtube","tiktok","pinterest","threads","reddit","bluesky"]}},"platform_data":{"type":"object","additionalProperties":true,"description":"Per-platform overrides keyed by platform name. For Pinterest, `pinterest.board_id` names the target board (list them with `GET /socials/accounts/{id}/boards`)."},"media_urls":{"type":"array","items":{"type":"string"},"description":"Public media URLs uploaded on publish"},"upload_ids":{"type":"array","items":{"type":"string"},"description":"Previously uploaded media IDs"},"youtube_type":{"type":"string","enum":["SHORT","VIDEO"]},"publish_now":{"type":"boolean","description":"Publish immediately instead of saving a draft"},"scheduled_at":{"type":"string","format":"date-time"},"account_ids":{"type":"array","items":{"type":"string"},"description":"Target account IDs (defaults to all matching platforms)"}},"required":["content","platforms"]}}}},"responses":{"201":{"description":"Post created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.create({\n    content: \"<value>\",\n    platforms: [],\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/socials/posts/{id}":{"get":{"summary":"Get a post","description":"Retrieves a single social post.","operationId":"getSocialPost","x-speakeasy-name-override":"get","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Edit a draft post","description":"Edits a draft post. Only posts in the draft status are editable.","operationId":"updateSocialPost","x-speakeasy-name-override":"update","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"platforms":{"type":"array","items":{"type":"string","enum":["twitter","linkedin","instagram","facebook","youtube","tiktok","pinterest","threads","reddit","bluesky"]}},"platform_data":{"type":"object","additionalProperties":true}}}}}},"responses":{"200":{"description":"Post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.update({\n    id: \"<id>\",\n    requestBody: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"},"delete":{"summary":"Delete a post","description":"Deletes a post; published posts are unpublished from their platforms first.","operationId":"deleteSocialPost","x-speakeasy-name-override":"delete","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Post deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/socials/posts/{id}/analytics":{"get":{"summary":"Get post analytics","description":"Returns per-post analytics. Null until the post is published.","operationId":"getSocialPostAnalytics","x-speakeasy-name-override":"postAnalytics","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Post analytics","content":{"application/json":{"schema":{"type":"object","properties":{"post_id":{"type":"string"},"analytics":{"type":["object","null"],"additionalProperties":true},"hint":{"type":"string"}},"required":["post_id"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.postAnalytics({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/posts/{id}/publish":{"post":{"summary":"Publish a draft post","description":"Publishes a draft post immediately.","operationId":"publishSocialPost","x-speakeasy-name-override":"publish","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Post","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialPost"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.publish({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/socials/posts/{post_id}/comments":{"get":{"summary":"Get post comments","description":"Returns comments on a published post.","operationId":"getSocialPostComments","x-speakeasy-name-override":"comments","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"description":"Resource ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Post comments","content":{"application/json":{"schema":{"type":"object","properties":{"post_id":{"type":"string"},"comments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string"},"author":{"type":["string","null"]},"content":{"type":["string","null"]},"created_at":{"type":["string","null"]}}}},"hint":{"type":"string"}},"required":["post_id","comments"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.comments({\n    postId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Reply to a post or comment","description":"Posts a public reply to the post, or to a specific comment when comment_id is given. Published as the chosen connected account. Requires the post to be published.","operationId":"replyToSocialPost","x-speakeasy-name-override":"reply","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"description":"Post ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected account to reply as (sacct_ prefix id)."},"message":{"type":"string"},"comment_id":{"type":"string","description":"Reply to this comment instead of the post."},"parent_cid":{"type":"string","description":"Bluesky only: parent content id."},"root_uri":{"type":"string","description":"Bluesky only: root post URI."},"root_cid":{"type":"string","description":"Bluesky only: root post CID."}},"required":["account_id","message"]}}}},"responses":{"201":{"description":"Reply created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.reply({\n    postId: \"<id>\",\n    requestBody: {\n      accountId: \"<id>\",\n      message: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/socials/posts/{post_id}/comments/{id}":{"delete":{"summary":"Delete a comment","description":"Deletes a comment on the post. Supported on Facebook, Instagram, Bluesky, Reddit, YouTube, and LinkedIn.","operationId":"deleteSocialComment","x-speakeasy-name-override":"deleteComment","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"description":"Post ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Upstream comment ID","schema":{"type":"string"}},{"name":"account_id","in":"query","required":true,"description":"Connected account that owns the comment (sacct_ prefix id).","schema":{"type":"string"}}],"responses":{"200":{"description":"Comment deleted","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["social_comment"]},"deleted":{"type":"boolean"}},"required":["id","object","deleted"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.deleteComment({\n    postId: \"<id>\",\n    id: \"<id>\",\n    accountId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/socials/posts/{post_id}/comments/{id}/hide":{"post":{"summary":"Hide a comment","description":"Hides a comment (visible only to its author and page admins). Supported on Facebook, Instagram, Threads, and X/Twitter.","operationId":"hideSocialComment","x-speakeasy-name-override":"hideComment","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"description":"Post ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Upstream comment ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected account to act as (sacct_ prefix id)."}},"required":["account_id"]}}}},"responses":{"200":{"description":"Comment hidden","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"status":{"type":"string"},"comment_id":{"type":"string"},"hidden":{"type":"boolean"},"platform":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.hideComment({\n    postId: \"<id>\",\n    id: \"<id>\",\n    requestBody: {\n      accountId: \"<id>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/posts/{post_id}/comments/{id}/like":{"post":{"summary":"Like a comment","description":"Likes or upvotes a comment. Supported on Facebook, Twitter/X, Bluesky, and Reddit. Bluesky requires the comment cid.","operationId":"likeSocialComment","x-speakeasy-name-override":"likeComment","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"description":"Post ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Upstream comment ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected account to act as (sacct_ prefix id)."},"cid":{"type":"string","description":"Bluesky only: comment content id."}},"required":["account_id"]}}}},"responses":{"200":{"description":"Comment liked","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"status":{"type":"string"},"comment_id":{"type":"string"},"liked":{"type":"boolean"},"platform":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.likeComment({\n    postId: \"<id>\",\n    id: \"<id>\",\n    requestBody: {\n      accountId: \"<id>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/socials/posts/{post_id}/comments/{id}/private_reply":{"post":{"summary":"Send a private reply","description":"Sends a private message to the author of a comment. Instagram and Facebook only; one reply per comment, within 7 days, text only.","operationId":"privateReplySocialComment","x-speakeasy-name-override":"privateReply","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"description":"Post ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Upstream comment ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected account to send from (sacct_ prefix id)."},"message":{"type":"string"}},"required":["account_id","message"]}}}},"responses":{"200":{"description":"Private reply sent","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"status":{"type":"string"},"message_id":{"type":"string"},"comment_id":{"type":"string"},"platform":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.privateReply({\n    postId: \"<id>\",\n    id: \"<id>\",\n    requestBody: {\n      accountId: \"<id>\",\n      message: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/socials/posts/{post_id}/comments/{id}/unhide":{"post":{"summary":"Unhide a comment","description":"Unhides a previously hidden comment. Supported on Facebook, Instagram, Threads, and X/Twitter.","operationId":"unhideSocialComment","x-speakeasy-name-override":"unhideComment","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"description":"Post ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Upstream comment ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected account to act as (sacct_ prefix id)."}},"required":["account_id"]}}}},"responses":{"200":{"description":"Comment unhidden","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.unhideComment({\n    postId: \"<id>\",\n    id: \"<id>\",\n    requestBody: {\n      accountId: \"<id>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/posts/{post_id}/comments/{id}/unlike":{"post":{"summary":"Unlike a comment","description":"Removes a like from a comment. Supported on Facebook, Twitter/X, Bluesky, and Reddit. Bluesky requires the like_uri returned when liking.","operationId":"unlikeSocialComment","x-speakeasy-name-override":"unlikeComment","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"post_id","in":"path","required":true,"description":"Post ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Upstream comment ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected account to act as (sacct_ prefix id)."},"like_uri":{"type":"string","description":"Bluesky only: the like URI returned when liking."}},"required":["account_id"]}}}},"responses":{"200":{"description":"Like removed","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.unlikeComment({\n    postId: \"<id>\",\n    id: \"<id>\",\n    requestBody: {\n      accountId: \"<id>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/status":{"get":{"summary":"Get social status","description":"Returns whether social posting is activated and lists the connected accounts.","operationId":"getSocialsStatus","x-speakeasy-name-override":"status","tags":["Socials"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object","properties":{"activated":{"type":"boolean"},"account_count":{"type":"integer"},"account_limit":{"type":["integer","null"],"description":"Connected posting channels allowed on the account's plan. Null means unlimited."},"accounts_remaining":{"type":["integer","null"],"description":"Channels that can still be connected before the plan limit is reached. Null means unlimited."},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/SocialAccount"}}},"required":["activated","account_count","accounts"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.status();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/sync":{"post":{"summary":"Sync connected accounts","description":"Refreshes the list of connected social accounts.","operationId":"syncSocials","x-speakeasy-name-override":"sync","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Synced","content":{"application/json":{"schema":{"type":"object","properties":{"synced":{"type":"integer"},"account_count":{"type":"integer"}},"required":["synced","account_count"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.sync();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/twitter/bookmarks":{"post":{"summary":"Bookmark an X post","description":"Shelves a post on the connected X account for a later pass, without engaging publicly. Rate limit: 50 requests per 15-minute window.","operationId":"bookmarkTweet","x-speakeasy-name-override":"bookmark","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically."},"tweet_id":{"type":"string","description":"Numeric id of the X post to bookmark."}},"required":["tweet_id"]}}}},"responses":{"200":{"description":"Bookmark confirmation","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"tweet_id":{"type":"string"},"bookmarked":{"type":"boolean"},"platform":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/socials/twitter/bookmarks/{tweet_id}":{"delete":{"summary":"Remove an X bookmark","description":"Drops a bookmark from the connected X account.","operationId":"removeTweetBookmark","x-speakeasy-name-override":"removeBookmark","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"tweet_id","in":"path","required":true,"description":"Numeric id of the bookmarked X post.","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically.","schema":{"type":"string"}}],"responses":{"200":{"description":"Bookmark removed","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"tweet_id":{"type":"string"},"bookmarked":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/socials/twitter/follows":{"post":{"summary":"Follow an X user","description":"Follows as the connected X account. A protected account yields pending_follow: true rather than a completed follow.","operationId":"followXUser","x-speakeasy-name-override":"followUser","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically."},"target_user_id":{"type":"string","description":"Numeric X user id to follow."}},"required":["target_user_id"]}}}},"responses":{"200":{"description":"Follow confirmation","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"target_user_id":{"type":"string"},"following":{"type":"boolean"},"pending_follow":{"type":"boolean"},"platform":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask"}},"/socials/twitter/follows/{target_user_id}":{"delete":{"summary":"Unfollow an X user","description":"Unfollows as the connected X account.","operationId":"unfollowXUser","x-speakeasy-name-override":"unfollowUser","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"target_user_id","in":"path","required":true,"description":"Numeric X user id to unfollow.","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically.","schema":{"type":"string"}}],"responses":{"200":{"description":"Unfollow confirmation","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"target_user_id":{"type":"string"},"following":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask"}},"/socials/twitter/retweets":{"post":{"summary":"Repost an X post","description":"Reposts as the connected X account. Shares X's 300-per-3-hours creation budget with publishing.","operationId":"retweetPost","x-speakeasy-name-override":"retweet","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account_id":{"type":"string","description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically."},"tweet_id":{"type":"string","description":"Numeric id of the X post to repost."}},"required":["tweet_id"]}}}},"responses":{"200":{"description":"Repost confirmation","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"tweet_id":{"type":"string"},"retweeted":{"type":"boolean"},"platform":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask"}},"/socials/twitter/retweets/{tweet_id}":{"delete":{"summary":"Undo a repost","description":"Removes the connected X account's repost of a post.","operationId":"undoRetweetPost","x-speakeasy-name-override":"undoRetweet","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"tweet_id","in":"path","required":true,"description":"Numeric id of the originally reposted X post.","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically.","schema":{"type":"string"}}],"responses":{"200":{"description":"Repost removed","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"tweet_id":{"type":"string"},"retweeted":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask"}},"/socials/twitter/search":{"get":{"summary":"Search X posts","description":"Search public X posts from the last 7 days. The query is passed to X unchanged, so its operators work (`from:user`, `to:user`, `-is:retweet`, `conversation_id:123`, `\"exact phrase\"`, boolean `OR`). Standalone operators like `is:`/`has:`/`lang:` must be combined with a keyword or `from:` clause. Use this to find mentions to answer; reply by creating a post with `platform_data.twitter.replyToTweetId` set to the id you found. Rate limit: 300 requests per 15-minute window per connected account.","operationId":"searchTweets","x-speakeasy-name-override":"searchTweets","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","required":true,"description":"X search query, max 512 characters.","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Results per page, 10-100. X rejects anything below 10.","schema":{"type":"integer","minimum":10,"maximum":100}},{"name":"since_id","in":"query","required":false,"description":"Only posts newer than this numeric post id — the cursor for a polling loop.","schema":{"type":"string"}},{"name":"until_id","in":"query","required":false,"description":"Only posts older than this numeric post id.","schema":{"type":"string"}},{"name":"start_time","in":"query","required":false,"description":"Oldest UTC timestamp, inclusive (ISO 8601). Within the last 7 days.","schema":{"type":"string"}},{"name":"end_time","in":"query","required":false,"description":"Newest UTC timestamp, exclusive (ISO 8601). Within the last 7 days.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"Opaque pagination cursor from a previous response's next_cursor.","schema":{"type":"string"}},{"name":"sort_order","in":"query","required":false,"description":"`recency` (default) or `relevancy`.","schema":{"type":"string","enum":["recency","relevancy"]}}],"responses":{"200":{"description":"Matching X posts","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","description":"X post id."},"text":{"type":"string"},"created":{"type":"string","description":"Publication time (ISO 8601)."},"conversation_id":{"type":"string","description":"Root post of the thread this belongs to."},"in_reply_to_tweet_id":{"type":["string","null"],"description":"The post this replies to, if any."},"lang":{"type":"string"},"author":{"type":"object","additionalProperties":true},"like_count":{"type":"integer"},"reply_count":{"type":"integer"},"retweet_count":{"type":"integer"},"quote_count":{"type":"integer"},"platform":{"type":"string"}}}},"has_more":{"type":"boolean"},"next_cursor":{"type":"string"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/socials/twitter/tweets/lookup":{"get":{"summary":"Look up an X post by id or URL","description":"Resolve one X post into its text, author and public metrics. Unlike search this is not limited to the last 7 days, which is what makes it the way to read the parent of a thread before replying to it. Takes the identifier as a query parameter so a full post URL, which contains slashes, can be passed.","operationId":"lookupTweet","x-speakeasy-name-override":"lookupTweet","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"query","required":true,"description":"Numeric post id or a post URL (e.g. https://x.com/user/status/123).","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically.","schema":{"type":"string"}}],"responses":{"200":{"description":"The X post","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","description":"X post id."},"text":{"type":"string"},"created":{"type":"string","description":"Publication time (ISO 8601)."},"conversation_id":{"type":"string","description":"Root post of the thread this belongs to."},"in_reply_to_tweet_id":{"type":["string","null"],"description":"The post this replies to, if any."},"lang":{"type":"string"},"author":{"type":"object","additionalProperties":true},"like_count":{"type":"integer"},"reply_count":{"type":"integer"},"retweet_count":{"type":"integer"},"quote_count":{"type":"integer"},"platform":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/socials/twitter/tweets/{id}":{"get":{"summary":"Get an X post","description":"Resolve one X post into its text, author and public metrics. Unlike search this is not limited to the last 7 days, which is what makes it the way to read the parent of a thread before replying to it. Pass a post URL to /socials/twitter/tweets/lookup instead.","operationId":"getTweet","x-speakeasy-name-override":"getTweet","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Numeric X post id.","schema":{"type":"string"}},{"name":"account_id","in":"query","required":false,"description":"Connected X account to act as (sacct_ prefix id). Optional: a platform connects once per account, so the X account is resolved automatically.","schema":{"type":"string"}}],"responses":{"200":{"description":"The X post","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"string","description":"X post id."},"text":{"type":"string"},"created":{"type":"string","description":"Publication time (ISO 8601)."},"conversation_id":{"type":"string","description":"Root post of the thread this belongs to."},"in_reply_to_tweet_id":{"type":["string","null"],"description":"The post this replies to, if any."},"lang":{"type":"string"},"author":{"type":"object","additionalProperties":true},"like_count":{"type":"integer"},"reply_count":{"type":"integer"},"retweet_count":{"type":"integer"},"quote_count":{"type":"integer"},"platform":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/socials/upload":{"post":{"summary":"Upload media","description":"Uploads media from a public URL for use in posts.","operationId":"uploadSocialMedia","x-speakeasy-name-override":"upload","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}}}},"responses":{"201":{"description":"Uploaded media","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialUpload"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.upload({\n    url: \"https://bare-sailor.org\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/socials/uploads":{"get":{"summary":"List uploads","description":"Lists previously uploaded media.","operationId":"listSocialUploads","x-speakeasy-name-override":"listUploads","tags":["Socials"],"security":[{"ApiKey":[]}],"parameters":[{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of uploads","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SocialUpload"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.socials.listUploads({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/status":{"get":{"summary":"Get API status","description":"Authenticated self-check. A single call confirms the API is operational, your credentials are valid, and which account they resolve to (whoami). For credit balance and plan detail, use Get account usage.","operationId":"getStatus","x-speakeasy-name-override":"get","tags":["Status"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"API status and authenticated account context","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Status"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.status.get();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/subscriptions":{"get":{"summary":"List subscriptions","description":"Returns a list of customer subscriptions for the current account","operationId":"listSubscriptions","x-speakeasy-name-override":"list","tags":["Subscriptions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by subscription status","schema":{"type":"string","enum":["active","canceled","paused","past_due","unpaid","incomplete","trialing"]}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: discount","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of subscriptions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Subscription"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.subscriptions.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/subscriptions/{id}":{"get":{"summary":"Get subscription","description":"Returns a specific subscription","operationId":"getSubscription","x-speakeasy-name-override":"get","tags":["Subscriptions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: discount","schema":{"type":"string"}}],"responses":{"200":{"description":"Subscription details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.subscriptions.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/subscriptions/{id}/cancel":{"post":{"summary":"Cancel subscription","description":"Cancels a subscription. Metered and past-due subscriptions are canceled immediately. Others cancel at the end of the current billing period.","operationId":"cancelSubscription","x-speakeasy-name-override":"cancel","tags":["Subscriptions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Subscription canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.subscriptions.cancel({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/subscriptions/{id}/pause":{"post":{"summary":"Pause subscription","description":"Pauses a subscription","operationId":"pauseSubscription","x-speakeasy-name-override":"pause","tags":["Subscriptions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Subscription paused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"Subscription cannot be paused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.subscriptions.pause({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/subscriptions/{id}/resume":{"post":{"summary":"Resume subscription","description":"Resumes a paused or canceled subscription","operationId":"resumeSubscription","x-speakeasy-name-override":"resume","tags":["Subscriptions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Subscription resumed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"Subscription cannot be resumed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.subscriptions.resume({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/subscriptions/{id}/discount":{"put":{"summary":"Apply discount to subscription","description":"Applies one of the account's discounts to an existing subscription, replacing any discount already on it. Nothing is charged or refunded now: the discount takes effect from the next invoice and lasts as long as the discount's `duration` says. Applying the discount the subscription already has is a no-op. Payment plans and ended subscriptions can't be discounted, and a discount restricted to specific price variants only applies to subscriptions for those variants.","operationId":"applySubscriptionDiscount","x-speakeasy-name-override":"applyDiscount","tags":["Subscriptions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: discount","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["discount"],"properties":{"discount":{"type":"string","description":"ID of the discount to apply","example":"disc_O7Y256nbwxmDh6gMKZvD8pRB"}}}}}},"responses":{"200":{"description":"Discount applied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"Discount cannot be applied to this subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask","x-crevio-locked":true},"delete":{"summary":"Remove discount from subscription","description":"Removes the discount from a subscription. The next invoice is billed at the full price. Invoices already paid are not changed.","operationId":"removeSubscriptionDiscount","x-speakeasy-name-override":"removeDiscount","tags":["Subscriptions"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"expand","in":"query","description":"Comma-separated relations to expand: discount","schema":{"type":"string"}}],"responses":{"200":{"description":"Discount removed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}},"400":{"description":"Discount cannot be removed from this subscription","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask","x-crevio-locked":true}},"/tags":{"get":{"summary":"List tags","description":"Returns a list of tags for the current account","operationId":"listTags","x-speakeasy-name-override":"list","tags":["Tags"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","description":"Search by tag name","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of tags","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Tag"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tags.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create tag","description":"Creates a new tag","operationId":"createTag","x-speakeasy-name-override":"create","tags":["Tags"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagRequest"}}}},"responses":{"201":{"description":"Tag created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tags.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/tags/{id}":{"get":{"summary":"Get tag","description":"Returns a specific tag","operationId":"getTag","x-speakeasy-name-override":"get","tags":["Tags"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Tag details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tags.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update tag","description":"Updates an existing tag","operationId":"updateTag","x-speakeasy-name-override":"update","tags":["Tags"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagRequest"}}}},"responses":{"200":{"description":"Tag updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tags.update({\n    id: \"<id>\",\n    tagRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete tag","description":"Deletes a tag","operationId":"deleteTag","x-speakeasy-name-override":"delete","tags":["Tags"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Tag deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tags.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/task_runs":{"get":{"summary":"List task runs","description":"Returns a list of task run records for the current account, ordered by most recent first. Supports filtering by status, task_id and created_after. To find runs that went wrong across every task, make one call without task_id, e.g. status=failed,timed_out&created_after=<last check>, rather than one call per task. The same one call with only created_after (e.g. the start of today in the user's timezone) answers what ran today: each run names its task in task_name.","operationId":"listTaskRuns","x-speakeasy-name-override":"list","tags":["TaskRuns"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by run status: one of pending, running, completed, failed, needs_input, timed_out, unknown, skipped, or a comma-separated list of them (e.g. failed,timed_out)","schema":{"type":"string"}},{"name":"trigger_source","in":"query","description":"Filter by what started the run: scheduled, event or manual, or a comma-separated list. `event` lists the events a task received; each run carries its `trigger_event`.","schema":{"type":"string"}},{"name":"created_after","in":"query","description":"Only runs created at or after this ISO 8601 timestamp","schema":{"type":"string","format":"date-time"}},{"name":"task_id","in":"query","description":"Filter by the parent task's prefixed ID","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of task runs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_AiTaskRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.taskRuns.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/task_runs/{id}":{"get":{"summary":"Get task run","description":"Returns a specific task run record.","operationId":"getTaskRun","x-speakeasy-name-override":"get","tags":["TaskRuns"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Task run details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRun"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.taskRuns.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update task run","description":"Reports the outcome of a running task. Primarily used by the in-sandbox agent server to finalize a run (completed, failed, needs_input) with token usage and credit consumption. Idempotent: re-posting the same status is a safe no-op.","operationId":"updateTaskRun","x-speakeasy-name-override":"update","tags":["TaskRuns"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRunRequest"}}}},"responses":{"200":{"description":"Task run updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.taskRuns.update({\n    id: \"<id>\",\n    aiTaskRunRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/task_runs/{id}/resolve":{"post":{"summary":"Resolve a waiting task run","description":"Typed resolution for a run paused in `needs_input`. `type: \"approvals\"` answers the run's pending integration approvals — the submitted set must exactly match `pending_approval_ids` on the run, or the request returns 409 `stale_resolution` (re-read the run and retry). `type: \"input\"` sends follow-up instructions into the run's chat and starts a new turn. `type: \"complete\"` closes the run as completed without resuming it. Returns 202 when the run resumes in the background (`approvals`, `input`) and 200 when resolved inline (`complete`). 409 `run_not_waiting` if the run is not in `needs_input`.","operationId":"resolveTaskRun","x-speakeasy-name-override":"resolve","tags":["TaskRuns"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Task run id (trun_...)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["approvals","input","complete"],"description":"Which resolution flow to run."},"approvals":{"type":"array","description":"Required for `type: \"approvals\"`. One decision per pending approval; must cover the exact pending set.","items":{"type":"object","required":["id","approved"],"properties":{"id":{"type":"string","description":"Approval id (apr_...)"},"approved":{"type":"boolean","description":"true approves and replays the frozen action; false denies it."},"reason":{"type":"string","description":"Optional denial reason."}}}},"message":{"type":"string","description":"Required for `type: \"input\"`. Follow-up instructions for the agent."}}}}}},"responses":{"200":{"description":"Resolved inline (type `complete`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRun"}}}},"202":{"description":"Accepted — the run resumes in the background; poll GET /task_runs/{id} or open its stream.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict — the run is not waiting for input (`run_not_waiting`), the submitted approvals are stale (`stale_resolution`), or approvals must be resolved first (`approvals_pending`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/task_runs/{id}/resume":{"post":{"summary":"Resume a stopped task run","description":"Pick a stopped run back up in its own conversation instead of repeating it: the transcript is already the agent's context, so it continues from what it saved rather than redoing the work. Starts a new run that adopts the original's chat. Pass `message` to steer the continuation; without it the agent is told to read back over what it did and carry on. 422 `run_not_resumable` if the run already completed or has no conversation (send it a follow-up instead), 409 `run_busy` if it or another run of the task is still in progress.","operationId":"resumeTaskRun","x-speakeasy-name-override":"resume","tags":["TaskRuns"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Task run id (trun_...)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Optional instructions for the continuation. Defaults to asking the agent to resume from its last saved step."}}}}}},"responses":{"202":{"description":"Accepted — the resumed turn runs in the background on a new run; poll GET /task_runs/{id} or open its stream.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict — the run, or another run of the same task, is still in progress (`run_busy`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The run cannot be resumed (`run_not_resumable`): it already completed or has no conversation to continue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-crevio-approval":"allow"}},"/task_runs/{id}/replay":{"post":{"summary":"Replay a task run's event","description":"Run the task again on the exact event an earlier run received (its `trigger_event`), not on whatever is newest now. Use it when an event-triggered run failed, was skipped, or did the wrong thing. Starts a new run with `replay_of` set to this run; it skips the task's condition, as Run now does. A real replay does everything the task normally does, sends included, so check what the original run already did first. Pass `test_run: true` to replay it as a test run: writes refused, deliveries captured. 422 `no_trigger_event` if no event started this run, 402 `insufficient_credits` if the account is out of AI credits, 409 if the task already has a run in flight or the account is at its run limit.","operationId":"replayTaskRun","x-speakeasy-name-override":"replay","tags":["TaskRuns"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Task run id (trun_...) whose event to replay","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"test_run":{"type":"boolean","description":"Replay as a test run: real research, but writes are refused and deliveries are captured on the run. Defaults to false."}}}}}},"responses":{"202":{"description":"Accepted — the replay runs in the background on a new run; poll GET /task_runs/{id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRun"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Payment required — the account is out of AI credits (`insufficient_credits`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Conflict — the task already has a run in flight (`task_busy`), the account is at its concurrent run limit (`account_at_capacity`), or the task expired (`expired`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"No event started this run (`no_trigger_event`), so there is nothing to replay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/task_runs/{id}/stream":{"get":{"summary":"Stream a task run","description":"Follow a task run over Server-Sent Events instead of polling. Closes on `completed`, `failed`, and `needs_input` (resolve via POST /task_runs/{id}/resolve, then re-open the stream).","operationId":"streamTaskRun","x-speakeasy-name-override":"stream","tags":["TaskRuns"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Task run id (trun_...)","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/EventStream"},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/tasks":{"get":{"summary":"List tasks","description":"Returns the current account's AI tasks, each with its most recent runs (`recent_runs`), so one call with limit=100 shows every task's state and whether its last runs failed. Supports filtering by trigger_type and active status, and searching by name or description.","operationId":"listTasks","x-speakeasy-name-override":"list","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"trigger_type","in":"query","description":"Filter by trigger type","schema":{"type":"string","enum":["immediate","cron","interval","once","event"]}},{"name":"active","in":"query","description":"Filter by active flag","schema":{"type":"boolean"}},{"name":"query","in":"query","description":"Search by task name or description","schema":{"type":"string"}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of tasks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_AiTask"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tasks.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create task","description":"Creates a new AI task. Use trigger_type to schedule it: `immediate` runs once right away, `cron` runs on a cron expression, `interval` runs every N seconds, `once` runs at a specific scheduled_at, `event` runs in response to account events, including another task finishing: `event_conditions: {event_type: \"task_run.completed\", after_task_id: \"task_...\"}` runs it after each real run of that task completes, so a step that depends on another never needs a polling schedule. For recurring tasks (`cron`/`interval`), add an optional `condition_script` — a cheap JavaScript gate that runs before each fire (no LLM, no credits) and skips the run unless its last expression is truthy, so the agent only wakes when there's work to do.","operationId":"createTask","x-speakeasy-name-override":"create","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRequest"}}}},"responses":{"201":{"description":"Task created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTask"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tasks.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/tasks/health":{"get":{"summary":"Check the health of your automations","description":"One verdict per active scheduled or event task you can see, from its real runs in the window: `delete` (its last 5 runs all failed or went undelivered), `consolidate` (same instructions and trigger as an earlier task, named in `duplicate_of`), `add_condition` (runs more than 6 times a day and at least 70% of runs find nothing), `run_less_often` (runs more than daily and at least half find nothing), `switch_model` (a quality-tier task that mostly finds nothing), or `keep`. Each carries the monthly credits it is projected to spend, what the verdict would save, and how many of its latest runs failed in a row with the last error, plus the integrations that need reconnecting and their reconnect links. Read-only: nothing is changed. Report the verdicts and let the owner decide.","operationId":"getTaskHealth","x-speakeasy-name-override":"health","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"window_days","in":"query","description":"How many days of runs to judge from, 7 to 90. Defaults to 30.","schema":{"type":"integer","minimum":7,"maximum":90}}],"responses":{"200":{"description":"The checkup report.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["task_health"]},"window_days":{"type":"integer"},"generated_at":{"type":"string","format":"date-time"},"tasks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Task id (task_...)"},"name":{"type":"string"},"trigger_type":{"type":"string"},"cron_expression":{"type":["string","null"]},"event_type":{"type":["string","null"]},"model_id":{"type":["string","null"]},"runs":{"type":"object","description":"Real runs in the window: executed (not skipped), completed, silent (completed and delivered nothing on a task that delivers), and skipped occurrences.","properties":{"executed":{"type":"integer"},"completed":{"type":"integer"},"silent":{"type":"integer"},"skipped":{"type":"integer"}},"required":["executed","completed","silent","skipped"]},"credits_in_window":{"type":"integer","description":"Credits the task's runs consumed in the window."},"runs_per_day":{"type":"number","description":"Executed runs a day at the current schedule and skip rate (observed rate for event tasks)."},"projected_monthly_credits":{"type":["integer","null"],"description":"Credits the task will spend in 30 days at its observed cost per run. Null when no run in the account has a cost to project from."},"estimated":{"type":"boolean","description":"True when the task had no runs in the window and its projection uses the account's average cost per run."},"verdict":{"type":"string","enum":["delete","consolidate","add_condition","run_less_often","switch_model","keep"]},"reason":{"type":"string","description":"One sentence explaining the verdict from the observed runs."},"saving_low":{"type":["integer","null"],"description":"Conservative monthly credit saving if the verdict is applied. Null when it cannot be estimated (switch_model)."},"saving_high":{"type":["integer","null"],"description":"Optimistic monthly credit saving if the verdict is applied. Null when it cannot be estimated (switch_model)."},"duplicate_of":{"type":["string","null"],"description":"For `consolidate`: the earlier task (task_...) with the same instructions and trigger."},"consecutive_failures":{"type":"integer","description":"How many of its latest runs failed in a row; 0 once a run succeeds."},"last_error":{"type":["string","null"],"description":"The error of its latest failed run, while it is still failing (`consecutive_failures` above 0). Null otherwise."}},"required":["id","name","trigger_type","cron_expression","event_type","model_id","runs","credits_in_window","runs_per_day","projected_monthly_credits","estimated","verdict","reason","saving_low","saving_high","duplicate_of","consecutive_failures","last_error"]}},"totals":{"type":"object","properties":{"projected_monthly_credits":{"type":"integer"},"saving_low":{"type":"integer"},"saving_high":{"type":"integer"}},"required":["projected_monthly_credits","saving_low","saving_high"]},"broken_integrations":{"type":"array","description":"Connections that stopped working; every task using them fails until they are reconnected.","items":{"type":"object","properties":{"app":{"type":"string"},"label":{"type":"string"},"status":{"type":"string","enum":["error","reconnect_required"]},"reconnect_url":{"type":"string","format":"uri","description":"Opens the reconnect flow for this connection in one click."}},"required":["app","label","status","reconnect_url"]}}},"required":["object","window_days","generated_at","tasks","totals","broken_integrations"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/tasks/cost_estimate":{"get":{"summary":"Estimate a task's credit cost","description":"Estimate what a scheduled task costs before you create or change it, and whether the credit balance still lasts until the next refill with it running. Pass `task_id` to price an existing task (any schedule field you also pass overrides the task's), or describe a new one with `trigger_type` and its schedule. `credits_per_run` is the median of the task's own recent completed runs, else of the account's tasks on the same model, else a typical agent run (`basis` says which). Runs per day come from the cron expression or interval; for an event trigger pass `runs_per_day`, or `task_id` to use the task's observed rate. `burn_rate_per_day`, `runs_out_at` and `runs_out_before_refill` describe the account with the task running at that rate (an active `task_id` replaces its own recent spend rather than adding to it). A condition script that skips runs makes the real cost lower.","operationId":"estimateTaskCost","x-speakeasy-name-override":"costEstimate","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"task_id","in":"query","required":false,"description":"An existing task to price (task_...).","schema":{"type":"string"}},{"name":"trigger_type","in":"query","required":false,"description":"How the task fires.","schema":{"type":"string","enum":["cron","interval","once","immediate","event"]}},{"name":"cron_expression","in":"query","required":false,"description":"Five-field cron schedule, for `trigger_type: cron`.","schema":{"type":"string"}},{"name":"timezone","in":"query","required":false,"description":"IANA time zone the cron expression is read in.","schema":{"type":"string"}},{"name":"interval_seconds","in":"query","required":false,"description":"Seconds between runs, for `trigger_type: interval`.","schema":{"type":"integer"}},{"name":"runs_per_day","in":"query","required":false,"description":"Expected runs per day; overrides the schedule. Use it for event triggers.","schema":{"type":"number"}},{"name":"model_id","in":"query","required":false,"description":"Model tier (`fast`, `balanced`, `quality`) or model id the task runs on.","schema":{"type":"string"}},{"name":"kind","in":"query","required":false,"description":"`agent` (a model turn per run, the default) or `script` (no model).","schema":{"type":"string","enum":["agent","script"]}}],"responses":{"200":{"description":"Cost estimate","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCostEstimate"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/tasks/{id}":{"get":{"summary":"Get task","description":"Returns a specific AI task.","operationId":"getTask","x-speakeasy-name-override":"get","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Task details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTask"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tasks.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update task","description":"Updates an existing AI task.","operationId":"updateTask","x-speakeasy-name-override":"update","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRequest"}}}},"responses":{"200":{"description":"Task updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTask"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tasks.update({\n    id: \"<id>\",\n    aiTaskRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete task","description":"Deletes an AI task.","operationId":"deleteTask","x-speakeasy-name-override":"delete","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Task deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.tasks.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/tasks/{id}/run":{"post":{"summary":"Run a task now","description":"Start a real run of an existing task right away, outside its schedule. It does everything a scheduled run does: writes go through, deliveries are sent, and it appears in the run history. Use it for \"run my weekly report now\" instead of creating a copy of the task.\n\nPass `instructions` to add something for this run only (\"this time also break out refunds\"). The run reads them as extra instructions on top of the task's prompt; the saved task, its prompt and its schedule do not change, and later runs do not see them.\n\nAn inactive task can be run this way; the run does not switch it on. Called from an agent chat, the chat is signalled when the run ends, so it need not poll. 400 if `instructions` is not a string of at most 4000 characters; 422 if the task has expired or already has a run in flight, the account is already running its maximum number of task runs, or it is out of AI credits.","operationId":"runTask","x-speakeasy-name-override":"run","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Task id (task_...)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"instructions":{"type":"string","maxLength":4000,"description":"Extra instructions for this run only, e.g. \"This time also break out refunds by product.\" Not saved on the task."}}}}}},"responses":{"202":{"description":"Accepted — the run executes in the background; poll GET /task_runs/{id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/tasks/{id}/run_test":{"post":{"summary":"Test-run a task","description":"Fire the task once as a test. The run does real research and produces real output, but every write-style tool refuses and every configured delivery is captured on the run instead of being sent. Poll the returned run, then read `captured_deliveries` for the exact message each channel would have received. Called from an agent chat, the chat is signalled when the run ends, so it need not poll.\n\nTo test an event-triggered task against a sample record (a fake order, lead or form answer), pass `event`: the run receives it as its trigger event exactly as it would a real one, with `type` set to the task's `event_conditions.event_type`. Test the real task this way; there is no need to copy it onto a temporary webhook source. Without `event`, an event task runs with no trigger event. The task's `condition_script` is not applied to a test run.\n\nA test run never counts as a run of the task: it does not advance `next_run_at`, does not reset or trip the failure breaker, does not count toward autonomy graduation or `max_runs_per_day`, and does not appear in the run history a later run reads. It does consume credits. 400 if `event` is malformed or the task is not event-triggered; 422 if the task already has a run in flight or the account is out of AI credits.","operationId":"runTaskTest","x-speakeasy-name-override":"runTest","tags":["Tasks"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Task id (task_...)","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"object","description":"Event tasks only: the sample event the test run receives as its trigger event, shaped as a real one. `data` is what the run reads as `event.data`: for an app event, `{\"object\": <the record as its GET endpoint returns it>}`, e.g. `{\"data\": {\"object\": {\"id\": \"ord_test\", \"amount\": 25000, \"status\": \"succeeded\", \"customer\": {\"email\": \"jane@example.com\", \"first_name\": \"Jane\"}}}}` for `order.paid`; for a webhook source, the delivery's JSON body.","properties":{"type":{"type":"string","description":"Optional. Must equal the task's `event_conditions.event_type` when given."},"data":{"type":"object","additionalProperties":true}},"required":["data"]}}}}}},"responses":{"202":{"description":"Accepted — the test run executes in the background; poll GET /task_runs/{id}.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AiTaskRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/tool_policies":{"patch":{"summary":"Set a tool's approval policy","description":"Sets the approval policy for one tool, addressed by its role (e.g. `crevioApi.createProduct`, `pdGmail.sendEmail`): `off` refuses it, `always_ask` freezes each call as an approval, `always_allow` runs it. Covers Crevio API endpoints, platform tools, connected apps and MCP servers. A choice is kept even when it equals the default. A tool that moves money or changes access (`x-crevio-locked` on a Crevio API operation, this endpoint included) is never set to `always_allow`: the call answers 422 `policy_locked`.","operationId":"updateToolPolicy","x-speakeasy-name-override":"setToolPolicy","tags":["Approvals"],"security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role","policy"],"properties":{"role":{"type":"string","description":"The tool's role, as the agent calls it (namespace.function)."},"policy":{"type":"string","enum":["off","always_ask","always_allow"]}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["object","role","policy"],"properties":{"object":{"type":"string","enum":["tool_policy"]},"role":{"type":"string"},"policy":{"type":"string","enum":["off","always_ask","always_allow"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask","x-crevio-locked":true}},"/topics/{id}":{"patch":{"summary":"Update topic","description":"Updates a topic","operationId":"updateTopic","x-speakeasy-name-override":"update","tags":["Topics"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicRequest"}}}},"responses":{"200":{"description":"Topic updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topic"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.topics.update({\n    id: \"<id>\",\n    topicRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"delete":{"summary":"Delete topic","description":"Deletes a topic","operationId":"deleteTopic","x-speakeasy-name-override":"delete","tags":["Topics"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Topic deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.topics.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/plans":{"get":{"summary":"List plans","description":"Returns the plans Crevio sells, as on the pricing page: each plan's credit tiers with their price (the tier this account is on is marked `current`), the features it unlocks, and its limits (`null` means unlimited).","operationId":"listPlans","x-speakeasy-name-override":"list","tags":["Plans"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"List of plans","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_Plan"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.plans.list();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/usage":{"get":{"summary":"Get account usage","description":"Returns the authenticated account's credit balance (and how much of it comes from the plan, top-ups and bonuses), plan status and price, a forecast of whether the balance lasts until the billing cycle ends at the current spend rate, and credit spend for a window (the current billing cycle unless `start_time`/`end_time` say otherwise) broken down by operation, by day, and by the chats and scheduled tasks that spent the most.","operationId":"getUsage","x-speakeasy-name-override":"get","tags":["Usage"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"Account usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.usage.get();\n\n  console.log(result);\n}\n\nrun();"}],"parameters":[{"name":"start_time","in":"query","required":false,"description":"Start of the spend window, inclusive, as an ISO 8601 timestamp. Defaults to the start of the current billing cycle (the calendar month without a subscription).","schema":{"type":"string","format":"date-time"}},{"name":"end_time","in":"query","required":false,"description":"End of the spend window, exclusive, as an ISO 8601 timestamp. Defaults to the end of the current billing cycle. The window cannot exceed 366 days. `credits`, `plan` and `forecast` always describe the current billing cycle.","schema":{"type":"string","format":"date-time"}}],"x-crevio-approval":"allow"}},"/usage/transactions":{"get":{"summary":"List usage transactions","description":"Returns the account's raw credit ledger (newest first), cursor-paginated. Spends are negative; grants are positive. Each entry may carry a `reference` to the resource that triggered the charge (currently generation jobs).","operationId":"listUsageTransactions","x-speakeasy-name-override":"transactions","tags":["Usage"],"security":[{"ApiKey":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Number of transactions to return (1-100, default 15).","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"starting_after","in":"query","required":false,"description":"Transaction id (cred_…) to paginate forward from.","schema":{"type":"string"}},{"name":"ending_before","in":"query","required":false,"description":"Transaction id (cred_…) to paginate backward from.","schema":{"type":"string"}},{"name":"days","in":"query","required":false,"description":"Limit results to the last N days. Omit for full history.","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"List of usage transactions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_UsageTransaction"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.usage.transactions();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/users/{id}":{"get":{"summary":"Get user","description":"Returns the profile (first/last name, email) of a buyer signed in on a deployed site, resolved from their user_… id or username. Scoped to the account; pair with getUser/verifyUserToken on the site.","operationId":"getUser","x-speakeasy-name-override":"get","tags":["Users"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"User profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.users.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/users/{id}/access/{resource_id}":{"get":{"summary":"Check access","description":"Returns whether a buyer (user_… or cus_… id) has access to a resource (the account acct_…, a prod_…, or an exp_…) and at what level (no_access, customer, admin). Powers entitlement gating on deployed sites.","operationId":"checkAccess","x-speakeasy-name-override":"check","tags":["Access"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"resource_id","in":"path","required":true,"description":"The resource to check access to: the account id (acct_…), a product (prod_…) or an experience (exp_…).","schema":{"type":"string"}}],"responses":{"200":{"description":"Access check result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessCheck"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.access.check({\n    id: \"<id>\",\n    resourceId: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/videos/generate":{"post":{"summary":"Generate a video","description":"Submits an asynchronous video generation job to the fal.ai queue and returns the queued job immediately. Poll `GET /v1/jobs/{id}` or `GET /v1/videos/{id}` for status and results. Credits are charged only when the job completes successfully.","operationId":"generateVideo","x-speakeasy-name-override":"generate","tags":["Video"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoGenerateRequest"}}}},"responses":{"202":{"description":"Generation job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.video.generate({\n    model: \"fal-ai/kling-video/v1.6/standard/text-to-video\",\n    input: {\n      prompt: \"<value>\",\n    },\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/videos/models":{"get":{"summary":"List video models","description":"Lists the video generation models available to `POST /v1/videos/generate`, enriched with live fal.ai pricing.","operationId":"listVideoModels","x-speakeasy-name-override":"listModels","tags":["Video"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"List of video models","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_GenerationModel"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.video.listModels();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/videos/{id}":{"get":{"summary":"Get video job","description":"Convenience alias for `GET /v1/jobs/{id}` that asserts the job is a video generation job (404 otherwise).","operationId":"getVideoJob","x-speakeasy-name-override":"get","tags":["Video"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Job details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.video.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/web/crawl":{"post":{"summary":"Crawl a site","description":"Crawls a site to markdown across multiple pages. Asynchronous — returns a queued job; poll `GET /v1/jobs/{id}` for the pages. Charges credits on completion.","operationId":"webCrawl","x-speakeasy-name-override":"crawl","tags":["Web"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Starting URL."},"max_pages":{"type":"integer","description":"Maximum pages to crawl (default 10, capped at 100)."},"max_depth":{"type":"integer","description":"Maximum link depth (default 2)."}}}}}},"responses":{"202":{"description":"Job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.web.crawl({\n    url: \"https://muffled-clavicle.info\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/web/extract":{"post":{"summary":"Extract structured data","description":"Extracts structured data across one or more URLs, guided by a prompt and optional JSON schema. Asynchronous — returns a queued job; poll `GET /v1/jobs/{id}` for the data. Charges credits on completion.","operationId":"webExtract","x-speakeasy-name-override":"extract","tags":["Web"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["urls","prompt"],"properties":{"urls":{"type":"array","items":{"type":"string"},"description":"URLs to extract from."},"prompt":{"type":"string","description":"What to extract."},"schema":{"type":"object","description":"Optional JSON schema for the output shape."}}}}}},"responses":{"202":{"description":"Job queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.web.extract({\n    urls: [\n      \"<value 1>\",\n      \"<value 2>\",\n      \"<value 3>\",\n    ],\n    prompt: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/web/map":{"post":{"summary":"Map a site","description":"Discovers URLs on a site without fetching content. Fast. Synchronous. Charges credits on success.","operationId":"webMap","x-speakeasy-name-override":"map","x-crevio-read-only":true,"tags":["Web"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"Site entry point."},"limit":{"type":"integer","description":"Maximum URLs to return (default 50)."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"total_urls":{"type":"integer"},"urls":{"type":"array","items":{"type":"string"}},"categorized_urls":{"type":"object"},"timestamp":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.web.map({\n    url: \"https://gummy-catalyst.org/\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/web/read":{"post":{"summary":"Read a URL","description":"Fetches a single page as clean markdown. Optional `extract` runs an AI question over the page content. Synchronous. Charges credits on success.","operationId":"webRead","x-speakeasy-name-override":"read","x-crevio-read-only":true,"tags":["Web"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"The URL to read."},"formats":{"type":"array","items":{"type":"string"},"description":"Output formats: markdown (default), html, screenshot."},"only_main_content":{"type":"boolean","description":"Strip nav/ads/footers (default true)."},"extract":{"type":"string","description":"Optional question to answer using the page content."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"markdown":{"type":"string"},"metadata":{"type":"object"},"html":{"type":"string","description":"Only when requested via `formats`."},"screenshot_url":{"type":"string","description":"Only when requested via `formats`."},"extracted":{"type":"string","description":"AI answer — only when `extract` is provided."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.web.read({\n    url: \"https://subtle-hydrolyse.info/\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/web/research":{"post":{"summary":"Deep research","description":"Researches a question across multiple web sources and returns a cited synthesis. `quick` runs synchronously (200); `thorough` and `exhaustive` return a queued job (202) to poll at `GET /v1/jobs/{id}`. Charges credits on completion.","operationId":"webResearch","x-speakeasy-name-override":"research","tags":["Web"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"The research question."},"depth":{"type":"string","enum":["quick","thorough","exhaustive"],"description":"Breadth/latency tier (default quick)."}}}}}},"responses":{"200":{"description":"Synthesis (quick depth)","content":{"application/json":{"schema":{"type":"object","properties":{"synthesis":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"position":{"type":"integer"}}}},"depth":{"type":"string"}}}}}},"202":{"description":"Research job queued (thorough/exhaustive depth)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderJob"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.web.research({\n    query: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/web/search":{"post":{"summary":"Web search","description":"Searches the web and returns ranked results. Optional `site` scopes the query to one domain; `scrape: true` returns each result's main content as markdown. Synchronous. Charges credits on success.","operationId":"webSearch","x-speakeasy-name-override":"search","x-crevio-read-only":true,"tags":["Web"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string","description":"Search query."},"count":{"type":"integer","description":"Number of results (1–20, default 5)."},"site":{"type":"string","description":"Optional domain to scope the search to, e.g. \"stripe.com\"."},"scrape":{"type":"boolean","description":"Scrape each result's page content into `markdown` (default false)."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"},"markdown":{"type":"string","description":"Page content as markdown — only when `scrape: true`."},"position":{"type":"integer"}}}},"provider":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.web.search({\n    query: \"<value>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/webhook_endpoints":{"get":{"summary":"List webhook endpoints","description":"Returns a list of webhook endpoints for the current account","operationId":"listWebhookEndpoints","x-speakeasy-name-override":"list","tags":["WebhookEndpoints"],"security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","description":"Filter by status","schema":{"type":"string","enum":["active","inactive"]}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of webhook endpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEndpoints.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"post":{"summary":"Create webhook endpoint","description":"Creates a new webhook endpoint. The secret is only returned on creation.","operationId":"createWebhookEndpoint","x-speakeasy-name-override":"create","tags":["WebhookEndpoints"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointRequest"}}}},"responses":{"201":{"description":"Webhook endpoint created (includes secret)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEndpoints.create({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true}},"/webhook_endpoints/events":{"get":{"summary":"List available webhook event types","description":"Returns a list of all available event types that can be subscribed to","operationId":"listWebhookEventTypes","x-speakeasy-name-override":"listEventTypes","tags":["WebhookEndpoints"],"security":[{"ApiKey":[]}],"responses":{"200":{"description":"List of event types","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEndpoints.listEventTypes();\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/webhook_endpoints/{id}":{"get":{"summary":"Get webhook endpoint","description":"Returns a specific webhook endpoint","operationId":"getWebhookEndpoint","x-speakeasy-name-override":"get","tags":["WebhookEndpoints"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook endpoint details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEndpoints.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"},"patch":{"summary":"Update webhook endpoint","description":"Updates an existing webhook endpoint","operationId":"updateWebhookEndpoint","x-speakeasy-name-override":"update","tags":["WebhookEndpoints"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointRequest"}}}},"responses":{"200":{"description":"Webhook endpoint updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEndpoints.update({\n    id: \"<id>\",\n    webhookEndpointRequest: {},\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask","x-crevio-locked":true},"delete":{"summary":"Delete webhook endpoint","description":"Deletes a webhook endpoint","operationId":"deleteWebhookEndpoint","x-speakeasy-name-override":"delete","tags":["WebhookEndpoints"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook endpoint deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEndpoints.delete({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"ask"}},"/webhook_endpoints/{id}/test":{"post":{"summary":"Test webhook endpoint","description":"Sends a signed test event to the endpoint and returns what the receiver answered. A receiver that responds at all — even with an error status — is a `200` here, with `delivered: false`; `502` means nothing answered (DNS failure, refused connection, timeout).","operationId":"testWebhookEndpoint","x-speakeasy-name-override":"test","tags":["WebhookEndpoints"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"event_type","in":"query","description":"The event type to send as a test","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"The receiver's response to the test event","content":{"application/json":{"schema":{"type":"object","required":["delivered","response_code","response_body","message"],"properties":{"delivered":{"type":"boolean","description":"Whether the receiver answered with a 2xx status"},"response_code":{"type":"integer","description":"The HTTP status the receiver returned"},"response_body":{"type":"string","description":"The body the receiver returned, truncated to 10,000 characters"},"message":{"type":"string"}}}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"description":"The receiver could not be reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEndpoints.test({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/webhook_events":{"get":{"summary":"List webhook events","description":"Returns a list of webhook events for the current account","operationId":"listWebhookEvents","x-speakeasy-name-override":"list","tags":["WebhookEvents"],"security":[{"ApiKey":[]}],"parameters":[{"name":"event_type","in":"query","description":"Filter by event type (e.g. `order.created`)","schema":{"type":"string"}},{"name":"webhook_endpoint","in":"query","description":"Only deliveries to this webhook endpoint (`wh_…`)","schema":{"type":"string"}},{"name":"status","in":"query","description":"Filter by delivery status","schema":{"type":"string","enum":["pending","delivered","failed"]}},{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"List of webhook events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListResponse_WebhookEvent"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEvents.list({});\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/webhook_events/{id}":{"get":{"summary":"Get webhook event","description":"Returns a specific webhook event","operationId":"getWebhookEvent","x-speakeasy-name-override":"get","tags":["WebhookEvents"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}}],"responses":{"200":{"description":"Webhook event details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"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"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.webhookEvents.get({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/webhook_events/{id}/redeliver":{"post":{"summary":"Redeliver webhook event","description":"Sends a delivered or failed event to its endpoint again, unchanged: same `id`, same payload. Events are kept for 7 days. Returns 409 while the event is still being delivered, or when its endpoint is disabled.","operationId":"redeliverWebhookEvent","x-speakeasy-name-override":"redeliver","tags":["WebhookEvents"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"The event, queued for delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"allow"}},"/zones/{id}/records":{"get":{"summary":"List zone records","operationId":"listZoneRecords","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","description":"The zone's ID.","in":"path","required":true,"schema":{"type":"string"}}],"description":"Live DNS records of a Crevio-managed zone (domains purchased through Crevio).","responses":{"200":{"description":"Records","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"proxied":{"type":"boolean"},"locked":{"type":"boolean"},"owned":{"type":"boolean"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"},"put":{"summary":"Create or replace a zone record","description":"Creates a DNS record on a Crevio-managed zone, or replaces the existing record with the same type and name. Records Crevio itself manages are protected: set `acknowledge_unowned` to overwrite a record that was not created through the API.","operationId":"upsertZoneRecord","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","description":"The zone's ID.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","content"],"properties":{"type":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"mode":{"type":"string"},"ttl":{"type":"integer"},"priority":{"type":"integer"},"proxied":{"type":"boolean"},"acknowledge_unowned":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Record","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"content":{"type":"string"},"proxied":{"type":"boolean"},"locked":{"type":"boolean"},"owned":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/zones/{id}/records/{record_id}":{"delete":{"summary":"Delete a zone record","description":"Deletes a DNS record from a Crevio-managed zone. Removing records that Crevio relies on — the storefront, email authentication — will break the features that depend on them.","operationId":"deleteZoneRecord","tags":["Domains"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","description":"The zone's ID.","in":"path","required":true,"schema":{"type":"string"}},{"name":"record_id","description":"The DNS record's ID.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The DNS record was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResponse"},"example":{"id":"rec_abc123","object":"dns_record","deleted":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"ask"}},"/billing_portal/sessions":{"post":{"summary":"Create billing portal session","description":"Creates a short-lived link to a customer's hosted billing page on billing.crevio.co, where they can update their payment method and billing address, download invoices and manage subscriptions. Redirect the customer to `url` right away: it must be opened before `expires_at`, then keeps working for an hour in the browser that opened it. Do not store it or put it in emails.","operationId":"createBillingPortalSession","x-speakeasy-group":"billingPortal.sessions","x-speakeasy-name-override":"create","tags":["Billing Portal"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalSessionRequest"}}}},"responses":{"201":{"description":"Billing portal session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalSession"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const session = await crevio.billingPortal.sessions.create({\n    customer: \"cus_abc123\",\n    returnUrl: \"https://example.com/account\",\n  });\n\n  console.log(session.url);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/data/tools":{"get":{"summary":"Search data tools","description":"Searches Crevio's included business data: 70+ read-only tools over website/SEO and AI search visibility, people, companies, local businesses (Google Maps), social media, e-commerce (Amazon, Google Shopping), markets, SEC filings and crypto, jobs, reviews, ad libraries, US real estate, news, app stores, hotels, weather and US law. Pass a short noun phrase (e.g. \"tiktok comments\", \"zillow listings\", \"backlinks\") and read each tool's `input_schema` and `price`, then run one with createDataRun. Free.","operationId":"listDataTools","x-speakeasy-group":"data.tools","x-speakeasy-name-override":"list","tags":["Data"],"security":[{"ApiKey":[]}],"parameters":[{"name":"query","in":"query","description":"What you need, as a short phrase, e.g. \"instagram profile\".","schema":{"type":"string"}},{"name":"domain","in":"query","description":"Only tools in this domain.","schema":{"type":"string","enum":["website","people","company","smb","social","ecommerce","finance","jobs","reviews","ads","real_estate","news","apps","travel","weather","legal"]}},{"name":"platform","in":"query","description":"Only tools covering this platform, e.g. tiktok, amazon, zillow, trustpilot.","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Max tools to return (1-50).","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}}],"responses":{"200":{"description":"Matching tools, best match first.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/DataTool"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"x-crevio-approval":"allow"}},"/data/tools/{id}":{"get":{"summary":"Get a data tool","description":"One data tool with its full input schema and estimated price. Free.","operationId":"getDataTool","x-speakeasy-group":"data.tools","x-speakeasy-name-override":"get","tags":["Data"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Tool id, e.g. social.profile.","schema":{"type":"string"}}],"responses":{"200":{"description":"The tool.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataTool"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"404":{"$ref":"#/components/responses/NotFound"}},"x-crevio-approval":"allow"}},"/data/runs":{"post":{"summary":"Run a data tool","description":"Runs one data tool (find it with listDataTools) with `input` matching its `input_schema`, and returns the source's data. Billed from what the source charged, usually 1-5 credits; a failed run is free. Tools marked `queued` wait on the source's queue: if one is not done within about 25 seconds the run comes back `running` (HTTP 202), so poll getDataRun until it is `succeeded` or `failed`.","operationId":"createDataRun","x-speakeasy-group":"data.runs","x-speakeasy-name-override":"create","x-crevio-read-only":true,"tags":["Data"],"security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tool_id":{"type":"string","description":"Tool id from listDataTools, e.g. smb.search."},"input":{"type":"object","additionalProperties":true,"description":"The tool's input, per its input_schema."}},"required":["tool_id"]}}}},"responses":{"200":{"description":"Finished run (succeeded or failed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRun"}}}},"202":{"description":"Still running on the source's queue; poll getDataRun.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Insufficient credits","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"$ref":"#/components/responses/BadGateway"}},"x-crevio-approval":"allow"}},"/data/runs/{id}":{"get":{"summary":"Get a data run","description":"A data run by id: poll a `running` run until it is `succeeded` or `failed`.","operationId":"getDataRun","x-speakeasy-group":"data.runs","x-speakeasy-name-override":"get","tags":["Data"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Run id (job_…).","schema":{"type":"string"}}],"responses":{"200":{"description":"The run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"404":{"$ref":"#/components/responses/NotFound"}},"x-crevio-approval":"allow"}},"/customers/{id}/restore":{"post":{"summary":"Restore customer","description":"Brings back a deleted customer before it is permanently erased (see `purge_at`). Returns 409 when another customer now uses the same email address.","operationId":"restoreCustomer","x-speakeasy-name-override":"restore","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Customer restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.restore({\n    id: \"<id>\",\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}},"/customers/{id}/anonymize":{"post":{"summary":"Anonymize customer","description":"Removes a customer's personal data but keeps the customer and their orders for your records. Name, email, phone, notes and tax ID are redacted on the customer, its invoices and checkouts; their form submissions, bookings, calls, reviews, support chats and the emails they exchanged with you are deleted. Use it for customers with orders, who cannot be deleted. Immediate and permanent; `anonymized` is true afterwards.","operationId":"anonymizeCustomer","x-speakeasy-name-override":"anonymize","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}],"responses":{"200":{"description":"Customer anonymized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-crevio-approval":"ask"}},"/customers/retention_preview":{"get":{"summary":"Preview customer retention","description":"Shows what a retention period would delete: leads (customers without an account) with no form submission, booking, call, checkout or 1:1 email in the last `days` days. Broadcasts don't count as contact. Leads with orders are kept and counted in `exempt_count`. Customers with an account are never deleted by retention. Set the period with `customer_retention_days` on `PATCH /v1/account`; a daily job then deletes matching leads, and they are permanently erased `purge_after_days` later.","operationId":"previewCustomerRetention","x-speakeasy-name-override":"retentionPreview","tags":["Customers"],"security":[{"ApiKey":[]}],"parameters":[{"name":"days","in":"query","description":"Retention period to preview, 30 to 3650. Defaults to the account's `customer_retention_days`.","schema":{"type":"integer","minimum":30,"maximum":3650}}],"responses":{"200":{"description":"Retention preview","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["customer_retention_preview"]},"days":{"type":["integer","null"],"description":"The period previewed; null when none was given and the account has none set."},"deletable_count":{"type":"integer"},"exempt_count":{"type":"integer","description":"Inactive leads kept because they have paid orders."},"purge_after_days":{"type":"integer"},"sample":{"type":"array","description":"Up to 20 of the leads that would be deleted, oldest first.","items":{"$ref":"#/components/schemas/Customer"}}},"required":["object","days","deletable_count","exempt_count","purge_after_days","sample"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Crevio } from \"@crevio/sdk\";\n\nconst crevio = new Crevio({\n  apiKey: process.env[\"CREVIO_API_KEY\"] ?? \"\",\n});\n\nasync function run() {\n  const result = await crevio.customers.retentionPreview({\n    days: 180,\n  });\n\n  console.log(result);\n}\n\nrun();"}],"x-crevio-approval":"allow"}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"API key in the format: Bearer {api_token}"}},"parameters":{"Id":{"name":"id","in":"path","required":true,"description":"The resource ID (e.g., \"prod_abc123\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},"StartingAfter":{"name":"starting_after","in":"query","description":"Cursor for pagination — the ID of the last item in the previous page","schema":{"type":"string"}},"Limit":{"name":"limit","in":"query","description":"Items per page","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},"IdOrSlug":{"name":"id_or_slug","in":"path","required":true,"description":"The resource ID (e.g., \"prod_3f9a1c0b7d2e4a6f8b1c3d5e\") or slug (e.g., \"my-product\")","schema":{"type":"string"}},"SecretId":{"name":"secret_id","in":"path","required":true,"description":"The secret's ID (e.g., \"secret_3f9a1c0b7d2e4a6f8b1c3d5e\")","schema":{"type":"string"}},"Slug":{"name":"slug","in":"path","required":true,"description":"The skill slug (e.g., \"og-image-design\").","schema":{"type":"string"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.","schema":{"type":"string","maxLength":255},"example":"1f7a4c2e-3b19-4a6d-9f0c-2ac81b5d7e33"}},"schemas":{"AccessCheck":{"type":"object","properties":{"object":{"type":"string"},"has_access":{"type":"boolean"},"access_level":{"type":"string"},"expires_at":{"type":["string","null"]}},"required":["object","has_access","access_level","expires_at"]},"Account":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"domain":{"type":["string","null"]},"display_currency":{"type":"string"},"support_email":{"type":["string","null"]},"subdomain":{"type":["string","null"]},"ai_email_signature":{"type":["string","null"]},"ai_email_signature_enabled":{"type":"boolean"},"custom_instructions":{"type":["string","null"]},"customer_retention_days":{"type":["number","null"]},"avatar_url":{"type":["string","null"]},"description":{"type":["string","null"]},"social_links":{"type":"array","items":{"$ref":"#/components/schemas/SocialLink"}}},"required":["id","object","name","slug","domain","display_currency","support_email","subdomain","ai_email_signature","ai_email_signature_enabled","custom_instructions","customer_retention_days","avatar_url","description","social_links"]},"AccountRequest":{"type":"object","properties":{"name":{"type":"string"},"support_email":{"type":["string","null"]},"display_currency":{"type":"string"},"ai_email_signature":{"type":["string","null"]},"ai_email_signature_enabled":{"type":"boolean"},"custom_instructions":{"type":["string","null"]},"customer_retention_days":{"type":["integer","null"]}}},"Address":{"type":"object","properties":{"name":{"type":["string","null"]},"line1":{"type":["string","null"]},"line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"country":{"type":["string","null"]}},"required":["name","line1","line2","city","state","postal_code","country"]},"AiBot":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"handle":{"type":"string"},"role":{"type":["string","null"]},"persona":{"type":["string","null"]},"position":{"type":"integer"},"skill_slugs":{"type":["array","null"],"items":{"type":"string"}},"toolsets":{"type":["array","null"],"items":{"type":"string"}},"avatar_style":{"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"avatar_url":{"type":["string","null"]},"model_id":{"type":["string","null"]},"model_tier":{"type":["string","null"]}},"required":["id","object","name","handle","role","persona","position","skill_slugs","toolsets","avatar_style","created_at","updated_at","avatar_url","model_id","model_tier"]},"AiBotRequest":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string"},"role":{"type":["string","null"]},"persona":{"type":["string","null"]},"position":{"type":"integer"},"avatar_style":{"type":"object","properties":{"shape":{"type":"string"},"color":{"type":"string"}}},"skill_slugs":{"type":["array","null"],"items":{"type":"string"},"description":"Restrict the bot to these skills. `null` means every skill; `[]` means none. Omit to leave unchanged."},"toolsets":{"type":["array","null"],"items":{"type":"string"},"description":"Restrict the bot to these toolsets (crevio_platform, crevio_onboarding, crevio_docs, crevio_api, integrations). `null` means every toolset; `[]` means none. Omit to leave unchanged."},"model_tier":{"type":["string","null"],"enum":["fast","balanced","quality",null],"description":"Which model tier the bot runs on: `fast` (cheapest, for checks and short reviews), `balanced`, or `quality`. `null` uses the account default. Omit to leave unchanged."}}},"AiSite":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"access_mode":{"type":"string","enum":["public","members","account","admins_only","me_only"]},"subdomain":{"type":["string","null"]},"github_repo_full_name":{"type":["string","null"]},"metadata":{"type":"object"},"domain":{"type":["string","null"]},"github_url":{"type":["string","null"]},"domain_verified":{"type":"boolean"},"app_url":{"type":["string","null"]},"is_live":{"type":"boolean"},"show_referral_badge":{"type":"boolean"},"build_task_id":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","object","name","access_mode","subdomain","github_repo_full_name","metadata","domain","github_url","domain_verified","app_url","is_live","show_referral_badge","build_task_id","created_at"]},"AiSiteCreateRequest":{"type":"object","properties":{"prompt":{"type":"string","description":"Build brief describing the storefront to generate — brand, what you're selling, and the look and feel. Kicks off an AI build. Required unless `repository` is given."},"repository":{"type":"string","description":"Optional \"owner/repo\" of an existing GitHub repository (reached through a connected GitHub App installation) to start the site from instead of generating a fresh one. When set, `prompt` is optional and only tells the agent what to adapt."},"name":{"type":"string"},"subdomain":{"type":["string","null"]},"access_mode":{"type":"string","enum":["public","members","account","admins_only","me_only"]},"show_referral_badge":{"type":"boolean"}}},"AiSiteRequest":{"type":"object","properties":{"name":{"type":"string"},"subdomain":{"type":["string","null"]},"access_mode":{"type":"string","enum":["public","members","account","admins_only","me_only"]},"show_referral_badge":{"type":"boolean"}}},"AiSkill":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"category":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}},"version":{"type":"string"},"creator_name":{"type":["string","null"]},"creator_avatar_url":{"type":["string","null"]},"install_count":{"type":"integer"},"status":{"type":"string","enum":["draft","published","archived"]},"visibility":{"type":"string","description":"`private` is a skill this account uploaded: only this account sees it, and it is not in the public catalog.","enum":["public","private"]},"install_status":{"type":["string","null"]},"installed_version":{"type":["string","null"],"description":"The version this account installed. Null unless installed."},"update_available":{"type":"boolean","description":"True when the catalog `version` is newer than `installed_version`: POST /skills/{slug}/update installs it."},"external_source":{"type":["string","null"]},"external_url":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","slug","name","description","category","tags","version","creator_name","creator_avatar_url","install_count","status","visibility","install_status","installed_version","update_available","external_source","external_url","created_at"]},"AiTask":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["agent","script"]},"prompt":{"type":["string","null"]},"success_criteria":{"type":["string","null"]},"trigger_type":{"type":"string","enum":["immediate","cron","interval","once","event"]},"cron_expression":{"type":["string","null"]},"interval_seconds":{"type":["integer","null"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"event_conditions":{"type":["object","null"]},"condition_script":{"type":["string","null"]},"pre_run_script":{"type":["string","null"]},"script":{"type":["string","null"]},"timezone":{"type":"string"},"delivery_methods":{"type":"array","items":{"type":"string","enum":["notification","email","telegram","discord","slack"]}},"approval_mode":{"type":"string","enum":["autonomous","supervised","read_only"]},"model_id":{"type":["string","null"]},"agent":{"type":"string","enum":["business","engineering"]},"visibility":{"type":"string","enum":["account","personal"]},"active":{"type":"boolean"},"expires_at":{"type":["string","null"],"format":"date-time"},"next_run_at":{"type":["string","null"],"format":"date-time"},"last_run_at":{"type":["string","null"],"format":"date-time"},"total_runs_count":{"type":"integer"},"consecutive_failure_count":{"type":"integer"},"total_credits_consumed":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"max_runs_per_day":{"type":["integer","null"],"description":"Event tasks: the most event-started runs per day (account time zone); later events are skipped as `rate_limited`."},"min_interval_seconds":{"type":["integer","null"],"description":"Event tasks: the cooldown after an event-started run; events inside it are skipped as `rate_limited`."},"site_id":{"type":["string","null"]},"source":{"type":"string","description":"How the task came to exist: `user` (a person made it in the dashboard), `agent` (the agent made it inside the chat `origin_chat_id`, whose person is `created_by_id`), or `system` (a built-in task).","enum":["user","agent","system"]},"created_by_id":{"type":["string","null"],"description":"The person (`user_...`) who made the task or asked for it. Null for built-in tasks."},"created_by_name":{"type":["string","null"]},"origin_chat_id":{"type":["string","null"],"description":"The chat (`aichat_...`) the task was set up in. A member's chat opens only for that member."},"recent_runs":{"type":"array","items":{"$ref":"#/components/schemas/AiTaskRunSummary"},"description":"The task's newest executed runs (at most 5, newest first; skipped and test runs excluded)."}},"required":["id","object","name","description","kind","prompt","success_criteria","trigger_type","cron_expression","interval_seconds","scheduled_at","event_conditions","condition_script","pre_run_script","script","timezone","delivery_methods","approval_mode","model_id","agent","visibility","active","expires_at","next_run_at","last_run_at","total_runs_count","consecutive_failure_count","total_credits_consumed","created_at","updated_at","max_runs_per_day","min_interval_seconds","site_id","source","created_by_id","created_by_name","origin_chat_id","recent_runs"]},"AiTaskRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["agent","script"],"default":"agent","description":"`agent` runs `prompt` as an agent turn. `script` runs `script` on the account's computer with no agent and no model credits, for runs that are the same deterministic steps every time; it takes no `prompt`. To switch kind, send the new `kind` with its field and `null` for the other."},"prompt":{"type":["string","null"],"maxLength":10000,"description":"What the agent does on each run. Required for `kind: agent`, must be absent for `kind: script`."},"success_criteria":{"type":["string","null"],"maxLength":2000,"description":"What done means for one run: the checkable outcomes a finished run must have produced (a post is live at its URL, the report reached #sales, every new order has a tracking number). Every run is shown them and must check its result against them before it reports. Outcomes, not steps; the steps belong in `prompt`."},"trigger_type":{"type":"string","enum":["immediate","cron","interval","once","event"]},"cron_expression":{"type":["string","null"]},"interval_seconds":{"type":["integer","null"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"timezone":{"type":"string"},"model_id":{"type":["string","null"]},"agent":{"type":"string","enum":["business","engineering"],"description":"Which agent runs the task. Use `engineering` for pure code/build work on a site; defaults to `business`."},"condition_script":{"type":["string","null"],"description":"Cheap pre-run gate for recurring tasks (`cron`/`interval`). Plain JavaScript run in a sandboxed isolate against the same `crevioApi.*` connector as the execute tool, BEFORE each scheduled run — no LLM, no credits. The task only runs when the script's last expression (or explicit `return`) is truthy; it skips on `false`/`null`. **Default to setting this whenever the task is \"act only when X\"** (new/unfulfilled/failed records, a threshold crossed, an unread inbox, a metric at zero) — without it the agent wakes and spends credits on every tick even when there's nothing to do. Only omit it for tasks that genuinely should run every tick (e.g. a scheduled report the user always wants). End with a boolean, e.g. `const r = await crevioApi.listOrders({ status: 'succeeded' }); r.data.some(o => o.fulfillment_status !== 'fulfilled')`. Errors fail open (the task runs). Ignored for non-recurring triggers."},"pre_run_script":{"type":["string","null"]},"script":{"type":["string","null"],"maxLength":10000,"description":"JavaScript run on the account's computer on each run; its logs and return value become the run's summary. Required for `kind: script`, must be absent for `kind: agent`."},"approval_mode":{"type":"string","enum":["autonomous","supervised","read_only"]},"expires_at":{"type":["string","null"],"format":"date-time"},"active":{"type":"boolean"},"visibility":{"type":"string","enum":["account","personal"]},"max_runs_per_day":{"type":["integer","null"],"minimum":1,"maximum":1440,"description":"Event tasks only: at most this many runs started by events per calendar day, in the account's time zone. Every further event that day is recorded as a skipped run (`skip_reason: rate_limited`) and starts nothing, webhook deliveries included. Test runs don't count. Set it whenever the user names a daily cap; `null` removes it."},"min_interval_seconds":{"type":["integer","null"],"minimum":1,"maximum":604800,"description":"Event tasks only: cooldown after a run started by an event. An event within this many seconds of that run is recorded as a skipped run (`skip_reason: rate_limited`) and starts nothing. Set it whenever the user says \"at most once every N minutes\"; `null` removes it."},"delivery_methods":{"type":"array","items":{"type":"string","enum":["notification","email","telegram","discord","slack"]},"default":["notification","email"],"description":"Where each run's result is delivered. Omit it to get the default, in-app notification plus email; set it only when the user asked for a specific channel. `[]` delivers nowhere."},"event_conditions":{"type":["object","null"],"additionalProperties":true,"description":"Event tasks only: what starts a run. `event_type` is one event from GET /v1/events. To run after another task finishes, use `{event_type: \"task_run.completed\", after_task_id: \"task_...\"}` (or `task_run.failed` to run when it fails): each real run of that task that finishes starts this one, and the run receives the finished run (id, summary, status) as `event.data.object`. Test runs start nothing. A chain that loops back on itself or runs longer than 5 tasks is refused. `email_message.*` events also take `inbox_id`; `external.slack.*` events take `channel_id`, `from_user_id`, `reaction` and `channel_type`; `external.discord.*` events (`message`, `mention`, `reaction_added`) take `channel_id`, `from_user_id`, `emoji` and `guild_id`."},"site_id":{"type":"string","description":"Site this task works on (`site_...`); its repo is mounted as the run's workspace. Defaults to the account's default working site."}}},"AiTaskRun":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"task_id":{"type":"string"},"task_name":{"type":"string"},"chat_id":{"type":["string","null"],"description":"The run's own conversation (`aichat_...`): what it read, called and said. Read it with `search_chats`."},"status":{"type":"string","enum":["pending","running","completed","failed","needs_input","timed_out","unknown","skipped"]},"summary":{"type":["string","null"]},"error_message":{"type":["string","null"]},"test_run":{"type":"boolean"},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"credits_consumed":{"type":"integer"},"tool_calls_count":{"type":"integer"},"duration_ms":{"type":["integer","null"]},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"skip_reason":{"type":["string","null"],"enum":["condition","no_paid_plan_or_credits","no_recent_activity","no_task_activity","no_personal_sources","wake_gate","wake_limit","rate_limited","misfire","task_busy","account_at_capacity",null]},"skip_count":{"type":"integer"},"delivery_status":{"type":"string","enum":["delivered","not_delivered","not_requested","unknown"]},"completion":{"type":["string","null"],"description":"How the agent closed a completed run: `verified` (it re-checked the result), `recorded` (it reported without re-checking), or `recovered` (it never reported; `summary` is its last message). Null unless an agent turn completed the run.","enum":["verified","recorded","recovered",null]},"trigger_source":{"type":"string","enum":["scheduled","event","manual"]},"trigger_event":{"type":["object","null"],"description":"The event that started this run, `{type, data}`, exactly as the run received it; `data` matches the event's webhook payload. Null for a run no event started. POST /task_runs/{id}/replay runs the task again on it."},"replay_of":{"type":["string","null"],"description":"The run (`trun_...`) whose event this run replays. Null unless started by POST /task_runs/{id}/replay."},"captured_deliveries":{"type":"array"},"pending_approval_ids":{"type":"array"}},"required":["id","object","task_id","task_name","chat_id","status","summary","error_message","test_run","input_tokens","output_tokens","credits_consumed","tool_calls_count","duration_ms","started_at","completed_at","created_at","updated_at","skip_reason","skip_count","delivery_status","completion","trigger_source","trigger_event","replay_of","captured_deliveries","pending_approval_ids"]},"AiTaskRunRequest":{"type":"object","properties":{"status":{"type":"string","enum":["pending","running","completed","failed","needs_input","timed_out","unknown","skipped"]},"summary":{"type":["string","null"]},"error_message":{"type":["string","null"]},"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}},"AiTaskRunSummary":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","running","completed","failed","needs_input","timed_out","unknown","skipped"]},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":["string","null"]},"chat_id":{"type":["string","null"]}},"required":["id","status","created_at","completed_at","error_message","chat_id"]},"ApiKey":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"name":{"type":["string","null"]},"last4":{"type":"string"},"token_type":{"type":"string"},"token":{"type":["string","null"]},"last_used_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["object","id","name","last4","token_type","token","last_used_at","expires_at","created_at"]},"ApiKeyCreateRequest":{"type":"object","properties":{"name":{"type":["string","null"],"description":"Optional human-readable label for the key. Defaults to \"Default\" when omitted."}}},"Approval":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"approval_id":{"type":"string"},"status":{"type":"string"},"kind":{"type":"string"},"action_type":{"type":["string","null"]},"title":{"type":["string","null"]},"app_slug":{"type":["string","null"]},"tool_name":{"type":["string","null"]},"result":{"type":["object","null"]},"error":{"type":["string","null"]},"reason":{"type":["string","null"]},"chat_id":{"type":["string","null"]},"created_at":{"type":"string"},"resolved_at":{"type":["string","null"]}},"required":["object","id","approval_id","status","kind","action_type","title","app_slug","tool_name","result","error","reason","chat_id","created_at","resolved_at"]},"AudioGenerateRequest":{"type":"object","properties":{"model":{"type":"string","examples":["fast","balanced","quality","fal-ai/inworld-tts","fal-ai/elevenlabs/tts/turbo-v2.5","alibaba/qwen-audio-3-tts","fal-ai/elevenlabs/tts/multilingual-v2","fal-ai/elevenlabs/tts/eleven-v3"],"description":"A quality tier (fast, balanced, quality) or any fal.ai text-to-speech endpoint id. Prefer a tier — it tracks the best current model for that price point. Defaults to fal-ai/elevenlabs/tts/multilingual-v2; `GET /v1/audio/models` maps tiers to ids with live pricing."},"input":{"type":"object","description":"Model-specific input, forwarded to fal verbatim. `text` is required.","properties":{"text":{"type":"string","description":"The text to convert to speech."},"voice":{"type":"string","description":"Voice name/id supported by the chosen model (model-dependent)."}},"required":["text"]}},"required":["input"]},"BillingPortalSession":{"type":"object","properties":{"object":{"type":"string"},"customer":{"type":"string"},"url":{"type":"string"},"return_url":{"type":["string","null"]},"expires_at":{"type":"string"}},"required":["object","customer","url","return_url","expires_at"]},"BillingPortalSessionRequest":{"type":"object","properties":{"customer":{"type":"string","description":"ID of the customer (cus_...) the billing page is for. Required."},"return_url":{"type":["string","null"],"description":"Where the billing page Return link sends the customer. Defaults to your site."}}},"BlogCategory":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"blog_posts_count":{"type":"integer"}},"required":["id","object","name","slug","description","created_at","updated_at","blog_posts_count"]},"BlogPost":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"content":{"type":"string"},"status":{"type":"string","enum":["draft","published","scheduled","archived"]},"excerpt":{"type":"string"},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"url":{"type":"string"},"category":{"type":["string","null"]}},"required":["id","object","title","slug","content","status","excerpt","published_at","scheduled_at","created_at","updated_at","url","category"]},"BlogPostRequest":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"status":{"type":"string","enum":["draft","published","scheduled","archived"]},"slug":{"type":"string"},"excerpt":{"type":"string"},"blog_category_id":{"type":["integer","null"]},"published_at":{"type":["string","null"],"format":"date-time"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"seo_attributes":{"type":"object","properties":{"id":{"type":"string","description":"SEO record ID (for updates)"},"title":{"type":["string","null"]},"description":{"type":["string","null"]}}}}},"Booking":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"event_type_id":{"type":"string"},"customer_id":{"type":["string","null"]},"order_id":{"type":["string","null"]},"status":{"type":"string","enum":["pending","confirmed","cancelled","completed","no_show"]},"livemode":{"type":"boolean"},"time_zone":{"type":"string"},"attendee_name":{"type":["string","null"]},"attendee_email":{"type":["string","null"]},"attendee_phone":{"type":["string","null"]},"location_details":{"type":["string","null"]},"meet_url":{"type":["string","null"]},"cancel_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"intake_answers":{"type":"array","items":{"type":"object"}},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"cancelled_at":{"type":["string","null"],"format":"date-time"},"event_type":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/EventType"},{"type":"null"}],"description":"ID by default, full object when expanded"},"checkout":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Checkout"},{"type":"null"}],"description":"ID by default, full object when expanded"}},"required":["object","id","event_type_id","customer_id","order_id","status","livemode","time_zone","attendee_name","attendee_email","attendee_phone","location_details","meet_url","cancel_reason","created_at","updated_at","intake_answers","start_time","end_time","cancelled_at"]},"Broadcast":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"subject":{"type":["string","null"]},"preview_text":{"type":["string","null"]},"body":{"type":["string","null"]},"html_body":{"type":["string","null"]},"from":{"type":["string","null"]},"reply_to":{"type":["string","null"]},"styled":{"type":"boolean"},"audience":{"type":"object"},"audience_description":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","failed"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"sent_at":{"type":["string","null"],"format":"date-time"},"canceled_at":{"type":["string","null"],"format":"date-time"},"stats":{"type":"object"},"error":{"type":["string","null"]},"metadata":{"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","subject","preview_text","body","html_body","from","reply_to","styled","audience","audience_description","status","scheduled_at","started_at","sent_at","canceled_at","stats","error","metadata","created_at","updated_at"]},"BroadcastLinkClick":{"type":"object","properties":{"url":{"type":"string"},"clicks":{"type":"integer","description":"Total clicks, including repeats by the same recipient."},"unique_clicks":{"type":"integer","description":"Distinct recipients who clicked this link."}},"required":["url","clicks","unique_clicks"]},"BroadcastRecipient":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"broadcast":{"type":"string"},"address":{"type":"string"},"customer":{"type":["string","null"]},"status":{"type":"string","enum":["queued","sent","delivered","bounced","complained","failed"]},"sent_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"opened_at":{"type":["string","null"],"format":"date-time"},"clicked_at":{"type":["string","null"],"format":"date-time"},"unsubscribed_at":{"type":["string","null"],"format":"date-time"},"open_count":{"type":"integer"},"click_count":{"type":"integer"},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","broadcast","address","customer","status","sent_at","delivered_at","opened_at","clicked_at","unsubscribed_at","open_count","click_count","error","created_at"]},"BroadcastRequest":{"type":"object","properties":{"from":{"type":["string","null"],"description":"Sender email address (uses account default if omitted)"},"to":{"type":"array","items":{"type":"string"},"description":"List of recipient email addresses"},"subject":{"type":"string","description":"Email subject line"},"body":{"type":"string","description":"Email body content"},"customer_type":{"type":["string","null"],"description":"Filter recipients by customer type"},"send_to_all":{"type":["boolean","null"],"description":"Send to all customers"}}},"BroadcastStats":{"type":"object","description":"Delivery and engagement rollup for a broadcast. Rates are fractions of `sent` (a recipient never handed to the provider can't have opened anything).","properties":{"object":{"type":"string","enum":["broadcast_stats"]},"broadcast":{"type":"string","description":"The broadcast's prefixed id."},"recipients":{"type":"integer","description":"Size of the resolved audience."},"sent":{"type":"integer","description":"Handed to the email provider."},"delivered":{"type":"integer"},"bounced":{"type":"integer"},"complained":{"type":"integer","description":"Marked as spam by the recipient."},"failed":{"type":"integer"},"opened":{"type":"integer","description":"Distinct recipients who opened."},"clicked":{"type":"integer","description":"Distinct recipients who clicked a link."},"unsubscribed":{"type":"integer"},"delivery_rate":{"type":"number"},"open_rate":{"type":"number"},"click_rate":{"type":"number"},"bounce_rate":{"type":"number"},"unsubscribe_rate":{"type":"number"},"progress":{"type":"number","description":"Percentage of the audience already handed to the provider."},"status":{"type":"string","enum":["draft","scheduled","sending","sent","canceled","failed"]}},"required":["object","broadcast","recipients","sent","delivered","bounced","complained","failed","opened","clicked","unsubscribed","delivery_rate","open_rate","click_rate","bounce_rate","unsubscribe_rate","progress","status"]},"Call":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string","enum":["queued","scheduled","ringing","in_progress","ended","failed"]},"to_number":{"type":["string","null"]},"from_number":{"type":["string","null"]},"objective":{"type":["string","null"]},"summary":{"type":["string","null"]},"transcript":{"type":["string","null"]},"recording_url":{"type":["string","null"]},"ended_reason":{"type":["string","null"]},"duration_seconds":{"type":["integer","null"]},"credits_charged":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"customer":{"type":["string","null"]}},"required":["id","object","direction","status","to_number","from_number","objective","summary","transcript","recording_url","ended_reason","duration_seconds","credits_charged","created_at","updated_at","customer"]},"CallRequest":{"type":"object","properties":{"to_number":{"type":["string","null"]},"objective":{"type":["string","null"]},"first_message":{"type":["string","null"]},"purpose":{"type":["string","null"]}}},"Chapter":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"title":{"type":"string"},"position":{"type":"integer"},"lessons":{"type":"array","items":{"$ref":"#/components/schemas/Lesson"}}},"required":["id","object","title","position","lessons"]},"ChapterRequest":{"type":"object","properties":{"title":{"type":"string","description":"Chapter title (defaults to \"Chapter N\")"},"position":{"type":"integer","description":"Zero-based ordinal among the course's chapters"}}},"Checkout":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"status":{"type":"string","enum":["open","complete","abandoned","expired"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"mode":{"type":"string"},"currency":{"type":["string","null"]},"total":{"type":"number"},"purchase_url":{"type":"string"},"customer":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Customer"},{"type":"null"}],"description":"ID by default, full object when expanded"},"checkout_items":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutItem"}}},"required":["id","object","status","created_at","updated_at","metadata","mode","currency","total","purchase_url","checkout_items"]},"CheckoutConfiguration":{"type":"object","properties":{"object":{"type":"string"},"allowed_countries":{"type":"array","items":{"type":"string"},"description":"ISO 3166-1 alpha-2 allow-list; empty means every country can check out."},"collect_tax":{"type":"boolean"},"tax_behavior":{"type":"string","enum":["unspecified","inclusive","exclusive"]},"tax_code":{"type":"string"},"allow_discount_codes":{"type":"boolean"},"show_tax_id_input":{"type":"boolean"},"show_phone_number_input":{"type":"boolean"},"collect_call_consent":{"type":"boolean"},"collect_shipping_address":{"type":"boolean"},"allow_multiple_quantity":{"type":"boolean"},"success_url":{"type":["string","null"]}},"required":["object","allowed_countries","collect_tax","tax_behavior","tax_code","allow_discount_codes","show_tax_id_input","show_phone_number_input","collect_call_consent","collect_shipping_address","allow_multiple_quantity","success_url"]},"CheckoutConfigurationRequest":{"type":"object","properties":{"success_url":{"type":["string","null"],"description":"Full https:// URL buyers land on after paying. Pass null or \"\" to restore the default thank-you page."},"collect_tax":{"type":"boolean","description":"Collect tax at checkout via Stripe Tax."},"tax_behavior":{"type":"string","enum":["unspecified","inclusive","exclusive"],"description":"Whether prices include tax (inclusive) or tax is added on top (exclusive)."},"allow_discount_codes":{"type":"boolean"},"show_tax_id_input":{"type":"boolean"},"show_phone_number_input":{"type":"boolean"},"collect_call_consent":{"type":"boolean"},"collect_shipping_address":{"type":"boolean"},"allow_multiple_quantity":{"type":["boolean","null"]},"allowed_countries":{"type":"array","items":{"type":"string"},"description":"Allow-list of ISO 3166-1 alpha-2 country codes (e.g. [\"DE\", \"AT\"]); buyers outside it are blocked at checkout. Case-insensitive. Pass [] to allow every country."}}},"CheckoutCreateRequest":{"type":"object","properties":{"email":{"type":["string","null"]},"customer":{"type":["string","null"],"description":"Customer ID"},"discount_code":{"type":["string","null"]},"line_items":{"type":"array","items":{"type":"object","properties":{"price_variant":{"type":"string"},"quantity":{"type":"integer"}},"required":["price_variant"]}}}},"CheckoutItem":{"type":"object","properties":{"object":{"type":"string"},"quantity":{"type":"integer"},"price_variant":{"type":"string"},"product":{"type":["string","null"]}},"required":["object","quantity","price_variant","product"]},"CheckoutLink":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":["string","null"]},"success_url":{"type":["string","null"]},"allow_discount_codes":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"metadata":{"type":["object","null"]},"url":{"type":"string"},"discount":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Discount"},{"type":"null"}],"description":"ID by default, full object when expanded"},"price_variants":{"type":"array","items":{"$ref":"#/components/schemas/PriceVariant"}}},"required":["id","object","name","success_url","allow_discount_codes","created_at","updated_at","metadata","url"]},"CheckoutLinkRequest":{"type":"object","properties":{"name":{"type":["string","null"]},"discount":{"type":["string","null"],"description":"Discount ID"},"allow_discount_codes":{"type":"boolean"},"success_url":{"type":["string","null"]},"price_variants":{"type":"array","items":{"type":"string"}}}},"Connection":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"provider":{"type":"string"},"label":{"type":["string","null"]},"status":{"type":"string"},"status_detail":{"type":["string","null"]},"disconnectable":{"type":"boolean"},"callable":{"type":"boolean"},"access":{"type":"string"},"members":{"type":["array","null"],"items":{"type":"string"}},"connected_at":{"type":["string","null"]}},"required":["object","id","kind","provider","label","status","status_detail","disconnectable","callable","access","members","connected_at"]},"ConnectionApp":{"type":"object","properties":{"object":{"type":"string","enum":["connection_app"]},"kind":{"type":"string","description":"Provider family. Opaque — compare the value, don't parse it."},"toolkit":{"type":"string","description":"Connectable identifier (app slug, MCP url, or platform)"},"name":{"type":"string"},"description":{"type":["string","null"]},"image_url":{"type":["string","null"]},"connected":{"type":"boolean"},"connection_id":{"type":["string","null"],"description":"Public id to call tools/execute on when connected"}},"required":["object","kind","toolkit","name","connected"]},"ConnectionInvocation":{"type":"object","properties":{"object":{"type":"string","enum":["connection_execution"]},"connection":{"type":"string","description":"The connection public id"},"tool":{"type":["string","null"]},"status":{"type":"string","enum":["executed"]},"result":{"type":["object","array","string","number","boolean","null"],"description":"Provider response"}},"required":["object","connection","status"]},"ConnectionLink":{"type":"object","properties":{"object":{"type":"string","enum":["connection_link"]},"status":{"type":"string","enum":["INITIATED"]},"toolkit":{"type":"string"},"redirect_url":{"type":"string","description":"Hosted OAuth URL to send the user to"},"external_account_id":{"type":"string"},"expires_at":{"type":["string","null"]},"setup_fields":{"type":"array","description":"Fields the connect page asks the user for besides the OAuth login (e.g. Shopify's shop ID and the client ID/secret of a custom app they must create first, with the redirect URI to register). Empty for plain OAuth apps. Walk the user through these before sending them to `redirect_url`.","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":["string","null"]},"description":{"type":["string","null"],"description":"Setup instructions for this field, in Markdown"},"optional":{"type":"boolean"}},"required":["name","optional"]}}},"required":["object","status","toolkit","redirect_url"]},"ConnectionPointer":{"type":"object","description":"A connection operated via its native typed endpoints rather than the generic execute surface.","properties":{"object":{"type":"string","enum":["connection_pointer"]},"transport_hint":{"type":"string","enum":["native"]},"endpoints":{"type":"string","description":"Native API path prefix, e.g. /v1/socials"}},"required":["object","endpoints"]},"ConnectionProxyResponse":{"type":"object","properties":{"object":{"type":"string","enum":["connection_proxy_response"]},"connection":{"type":"string","description":"The connection public id"},"endpoint":{"type":["string","null"]},"status":{"type":"integer","description":"The status code the app returned"},"truncated":{"type":"boolean","description":"The response body exceeded the size cap and was cut"},"body":{"type":["object","array","string","number","boolean","null"],"description":"The app's response body"}},"required":["object","connection","status"]},"ConnectionTool":{"type":"object","properties":{"object":{"type":"string","enum":["connection_tool"]},"name":{"type":"string","description":"Tool name passed as `tool` to /execute"},"label":{"type":"string"},"description":{"type":["string","null"]},"policy":{"type":"string","description":"Effective approval policy","enum":["off","always_ask","always_allow"]},"default_policy":{"type":"string","enum":["off","always_ask","always_allow"]}},"required":["object","name","label","policy","default_policy"]},"CourseDetailsRequest":{"type":"object","properties":{"description":{"type":["string","null"]},"require_lesson_completion":{"type":"boolean","description":"Require each lesson be completed before the next unlocks"},"instructor":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":["string","null"]},"bio":{"type":["string","null"]}}}}},"Customer":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"email":{"type":"string"},"name":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone_number":{"type":["string","null"]},"customer_type":{"type":"string","enum":["paid","free","lead"]},"notes":{"type":["string","null"]},"confirmed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"deleted_at":{"type":["string","null"],"format":"date-time"},"purge_at":{"type":["string","null"]},"anonymized":{"type":"boolean"},"metadata":{"type":"object"},"orders_count":{"type":"integer"},"total_spend":{"type":"number"},"tags":{"type":"array"}},"required":["id","object","email","name","first_name","last_name","phone_number","customer_type","notes","confirmed_at","created_at","updated_at","deleted_at","purge_at","anonymized","metadata","orders_count","total_spend","tags"]},"CustomerRequest":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"customer_type":{"type":"string","enum":["paid","free","lead"]},"notes":{"type":["string","null"]},"tag_ids":{"type":"array","items":{"type":"string"}}}},"CustomerTagRequest":{"type":"object","properties":{"tag":{"type":"object","properties":{"id":{"type":"string","description":"Tag ID to add"}},"required":["id"]}}},"DataRun":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"tool_id":{"type":"string"},"status":{"type":"string"},"data":{"type":["object","null"]},"source":{"type":["string","null"]},"error":{"type":["object","null"]},"credits_used":{"type":"integer"},"input":{"type":"object"},"created_at":{"type":"string"},"completed_at":{"type":["string","null"]}},"required":["object","id","tool_id","status","data","source","error","credits_used","input","created_at","completed_at"]},"DataTool":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"platforms":{"type":"array","items":{"type":"string"}},"queued":{"type":"boolean"},"price":{"type":"object"},"input_schema":{"type":"object"}},"required":["object","id","name","description","domains","platforms","queued","price","input_schema"]},"DatabaseQueryResult":{"type":"object","properties":{"object":{"type":"string","description":"Always \"database_query_result\"."},"rows":{"type":"array","description":"The rows returned by the query, each an object keyed by column name.","items":{"type":"object","additionalProperties":true}},"row_count":{"type":"integer","description":"Number of rows returned."},"meta":{"type":["object","null"],"description":"Execution metadata for the surfaced statement (e.g. rows read/written, duration).","additionalProperties":true}},"required":["object","rows","row_count"]},"DeleteResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"Deployment":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"site":{"type":"string"},"status":{"type":"string","enum":["pending","building","live","failed","superseded","unpublished"]},"commit_sha":{"type":["string","null"]},"is_live":{"type":"boolean"},"url":{"type":["string","null"]},"triggered_by":{"type":["string","null"]},"error_message":{"type":["string","null"]},"db_bookmark":{"type":["string","null"]},"current_stage":{"type":["string","null"]},"stages":{"type":"array"},"duration_seconds":{"type":["number","null"]},"elapsed_seconds":{"type":["number","null"]},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","object","site","status","commit_sha","is_live","url","triggered_by","error_message","db_bookmark","current_stage","stages","duration_seconds","elapsed_seconds","started_at","finished_at","created_at"]},"DigitalDownloadDetailsRequest":{"type":"object","properties":{"watermark_enabled":{"type":"boolean","description":"Stamp the buyer's email onto delivered PDFs"}}},"DigitalDownloadFile":{"type":"object","properties":{"id":{"type":"string","description":"Attachment id (`att_...`)"},"filename":{"type":"string"},"content_type":{"type":["string","null"]},"byte_size":{"type":"integer"},"url":{"type":"string"}},"required":["id","filename","byte_size","url"]},"DisconnectedConnectionById":{"type":"object","properties":{"object":{"type":"string","enum":["connection"]},"id":{"type":"string"},"disconnected":{"type":"boolean"}},"required":["object","id","disconnected"]},"Discount":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"discount_type":{"type":"string","enum":["percentage","fixed"]},"code":{"type":"string"},"amount_off":{"type":["integer","null"]},"duration":{"type":"string","enum":["forever","once","repeating"]},"duration_in_months":{"type":["integer","null"]},"max_redemptions":{"type":["integer","null"]},"times_redeemed":{"type":"integer"},"starts_at":{"type":["string","null"],"format":"date-time"},"redeem_by":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"percent_off":{"type":["number","null"],"format":"double"},"currency":{"type":["string","null"]}},"required":["id","object","status","discount_type","code","amount_off","duration","duration_in_months","max_redemptions","times_redeemed","starts_at","redeem_by","created_at","updated_at","percent_off","currency"]},"DiscountRequest":{"type":"object","properties":{"code":{"type":"string"},"discount_type":{"type":"string","enum":["percentage","fixed"]},"amount_off":{"type":["integer","null"]},"percent_off":{"type":["number","null"]},"currency":{"type":["string","null"]},"duration":{"type":"string","enum":["forever","once","repeating"]},"duration_in_months":{"type":["integer","null"]},"starts_at":{"type":["string","null"],"format":"date-time","description":"When the code becomes usable. Checkout rejects it before this time; omit it to make the code usable right away. For a sale that starts later, create the discount now with `starts_at` set rather than scheduling its creation."},"redeem_by":{"type":["string","null"],"format":"date-time","description":"When the code stops being usable. Must be in the future and after `starts_at`."},"max_redemptions":{"type":["integer","null"]},"price_variants":{"type":"array","items":{"type":"string"}}}},"Domain":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"domain":{"type":"string"},"purchase_status":{"type":["string","null"],"enum":["pending_payment","registering","registered","failed",null]},"site_id":{"type":"object"},"managed_zone":{"type":"boolean"},"zone_id":{"type":"object"},"capabilities":{"type":"object"},"records":{"type":"object"},"next_step":{"type":"object"},"verified_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"verification_errors":{"type":"array","items":{"type":"string"}}},"required":["object","id","domain","purchase_status","site_id","managed_zone","zone_id","capabilities","records","next_step","created_at","verification_errors"]},"EmailDraft":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"inbox_id":{"type":"string"},"thread_id":{"type":"string"},"to":{"type":"array"},"cc":{"type":"array"},"bcc":{"type":"array"},"reply_to":{"type":["string","null"]},"in_reply_to":{"type":["string","null"]},"subject":{"type":["string","null"]},"text":{"type":"string"},"html":{"type":"string"},"labels":{"type":"array","items":{"type":"string"}},"attachments":{"type":"array"},"send_at":{"type":["string","null"],"format":"date-time"},"send_status":{"type":"string","enum":["draft","scheduled","sending","failed"]},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","inbox_id","thread_id","to","cc","bcc","reply_to","in_reply_to","subject","text","html","labels","attachments","send_at","send_status","created_at"]},"EmailInbox":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"address":{"type":"string"},"local_part":{"type":"string"},"domain":{"type":["string","null"]},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["active","deleted"]},"metadata":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","address","local_part","domain","display_name","status","metadata","created_at"]},"EmailInboxEvent":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"inbox_id":{"type":"string"},"message_id":{"type":"string"},"thread_id":{"type":"string"},"type":{"type":"string"},"data":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","inbox_id","message_id","thread_id","type","data","created_at"]},"EmailMessage":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"thread_id":{"type":"string"},"inbox_id":{"type":"string"},"direction":{"type":"string","enum":["inbound","outbound"]},"status":{"type":"string","enum":["received","queued","sent","delivered","bounced","complained","failed"]},"message_id":{"type":"string"},"in_reply_to":{"type":["string","null"]},"references":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"to":{"type":"array"},"cc":{"type":"array"},"bcc":{"type":"array"},"reply_to":{"type":["string","null"]},"subject":{"type":["string","null"]},"preview":{"type":["string","null"]},"labels":{"type":"array","items":{"type":"string"}},"suppressed":{"type":"array"},"delivery":{"type":"object"},"delivered_at":{"type":["string","null"],"format":"date-time"},"attachments":{"type":"array"},"text":{"type":"string"},"html":{"type":"string"},"timestamp":{"type":"string"},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","thread_id","inbox_id","direction","status","message_id","in_reply_to","references","from","to","cc","bcc","reply_to","subject","preview","labels","suppressed","delivery","delivered_at","attachments","text","html","timestamp","created_at"]},"EmailMetrics":{"type":"object","properties":{"object":{"type":"string","enum":["email_metrics"]},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"timezone":{"type":"string"},"source":{"type":"string","enum":["all","broadcast","message"]},"group_by":{"type":["string","null"],"enum":["period","source","broadcast","inbox",null]},"granularity":{"type":"string","enum":["hour","day","week","month"],"description":"Present only when grouping by period."},"totals":{"type":"object","properties":{"sent":{"type":"integer"},"delivered":{"type":"integer"},"bounced":{"type":"integer"},"complained":{"type":"integer"},"failed":{"type":"integer"},"opened":{"type":"integer"},"clicked":{"type":"integer"},"unsubscribed":{"type":"integer"},"suppressed":{"type":"integer"},"delivery_rate":{"type":"number","format":"float"},"bounce_rate":{"type":"number","format":"float"},"complaint_rate":{"type":"number","format":"float"},"open_rate":{"type":"number","format":"float"},"click_rate":{"type":"number","format":"float"},"unsubscribe_rate":{"type":"number","format":"float"}},"required":["sent","delivered","bounced","complained","failed","opened","clicked","unsubscribed","suppressed","delivery_rate","bounce_rate","complaint_rate","open_rate","click_rate","unsubscribe_rate"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailMetricsBucket"},"description":"Per-group rows. Empty when `group_by` is omitted — `totals` is the whole answer."}},"required":["object","start_date","end_date","timezone","source","totals","data"]},"EmailMetricsBucket":{"type":"object","description":"One group's metrics. Carries whichever dimension key matches `group_by`.","properties":{"period":{"type":"string","format":"date-time","description":"Bucket start, when grouping by period."},"source":{"type":"string","enum":["broadcast","message"],"description":"Send path, when grouping by source."},"broadcast":{"type":"string","description":"Broadcast id, when grouping by broadcast."},"inbox":{"type":"string","description":"Inbox id, when grouping by inbox."},"sent":{"type":"integer"},"delivered":{"type":"integer"},"bounced":{"type":"integer"},"complained":{"type":"integer"},"failed":{"type":"integer"},"opened":{"type":"integer"},"clicked":{"type":"integer"},"unsubscribed":{"type":"integer"},"suppressed":{"type":"integer"},"delivery_rate":{"type":"number","format":"float"},"bounce_rate":{"type":"number","format":"float"},"complaint_rate":{"type":"number","format":"float"},"open_rate":{"type":"number","format":"float"},"click_rate":{"type":"number","format":"float"},"unsubscribe_rate":{"type":"number","format":"float"}},"required":["sent","delivered","bounced","complained","failed","opened","clicked","unsubscribed","suppressed","delivery_rate","bounce_rate","complaint_rate","open_rate","click_rate","unsubscribe_rate"]},"EmailSuppression":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"address":{"type":"string"},"reason":{"type":"string","enum":["bounced","complained","unsubscribed","manual"]},"email_message":{"type":["string","null"]},"metadata":{"type":"object"},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","address","reason","email_message","metadata","created_at"]},"EmailSuppressionBatchRequest":{"type":"object","properties":{"addresses":{"type":"array","items":{"type":"string"},"maxItems":100},"reason":{"type":"string","enum":["manual","unsubscribed"]},"metadata":{"type":"object","additionalProperties":true}},"required":["addresses"]},"EmailSuppressionRequest":{"type":"object","properties":{"address":{"type":"string"},"reason":{"type":"string","enum":["manual","unsubscribed"],"description":"Why the address is suppressed. Defaults to `manual`. Bounces and complaints are recorded automatically from delivery events and cannot be set here."},"metadata":{"type":"object"}},"required":["address"]},"EmailThread":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"inbox_id":{"type":"string"},"subject":{"type":["string","null"]},"preview":{"type":["string","null"]},"labels":{"type":"array","items":{"type":"string"}},"participants":{"type":"array","items":{"type":"string"}},"message_count":{"type":"integer"},"messages":{"type":"array"},"last_message_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","inbox_id","subject","preview","labels","participants","message_count","messages","last_message_at","created_at"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["api_error","invalid_request_error","validation_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string"},"errors":{"type":"object"},"doc_url":{"type":"string"}},"required":["type","message"]}},"required":["error"]},"EventSession":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"title":{"type":"string"},"description":{"type":["string","null"]},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"location_type":{"type":"string","enum":["zoom","google_meet","custom_link","physical_address"]},"location_details":{"type":"string"},"allow_rsvp":{"type":["boolean","null"]},"capacity":{"type":["integer","null"]},"repeat_frequency":{"type":"string","enum":["never","day","week","month","year"]}},"required":["id","object","title","description","start_time","end_time","location_type","location_details","allow_rsvp","capacity","repeat_frequency"]},"EventSessionRequest":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":["string","null"]},"start_time":{"type":"string","format":"date-time"},"end_time":{"type":"string","format":"date-time"},"location_type":{"type":"string","enum":["zoom","google_meet","custom_link","physical_address"]},"location_details":{"type":"string"},"allow_rsvp":{"type":["boolean","null"]},"capacity":{"type":["integer","null"]},"repeat_frequency":{"type":"string","enum":["never","day","week","month","year"]}}},"EventSource":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"vendor":{"type":"string","enum":["pipedream","webhook"]},"vendor_trigger_id":{"type":["string","null"]},"vendor_component_id":{"type":["string","null"]},"event_name":{"type":"string"},"configured_props":{"type":"object"},"description":{"type":["string","null"]},"signature_required":{"type":"boolean"},"active":{"type":"boolean"},"last_delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"qualified_event_name":{"type":"string"},"inbound_url":{"type":["string","null"]}},"required":["id","object","vendor","vendor_trigger_id","vendor_component_id","event_name","configured_props","description","signature_required","active","last_delivered_at","created_at","updated_at","qualified_event_name","inbound_url"]},"EventSourceRequest":{"type":"object","properties":{"vendor":{"type":"string","enum":["pipedream","webhook"]},"vendor_component_id":{"type":["string","null"]},"event_name":{"type":"string"},"description":{"type":["string","null"]},"signature_required":{"type":"boolean"},"configured_props":{"type":"object"}}},"EventType":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"duration_minutes":{"type":"integer"},"buffer_before_minutes":{"type":"integer"},"buffer_after_minutes":{"type":"integer"},"min_notice_minutes":{"type":"integer"},"booking_window_days":{"type":"integer"},"max_per_day":{"type":["integer","null"]},"reminder_minutes":{"type":"array","items":{"type":"number"}},"location_type":{"type":"string","enum":["google_meet","zoom","custom_link","physical","phone"]},"location_details":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"form_id":{"type":["string","null"]},"form":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Form"},{"type":"null"}],"description":"ID by default, full object when expanded"},"free":{"type":"boolean"},"schedule_id":{"type":["string","null"]},"experience_id":{"type":"string"},"product_id":{"type":["string","null"]},"price_variants":{"type":"array","items":{"$ref":"#/components/schemas/PriceVariant"}}},"required":["object","id","name","slug","duration_minutes","buffer_before_minutes","buffer_after_minutes","min_notice_minutes","booking_window_days","max_per_day","reminder_minutes","location_type","location_details","created_at","updated_at","form_id","free","schedule_id","experience_id","product_id","price_variants"]},"EventTypeDetailsRequest":{"type":"object","properties":{"duration_minutes":{"type":"integer"},"capacity":{"type":"integer"},"location_type":{"type":"string","enum":["google_meet","zoom","custom_link","physical","phone"]},"location_details":{"type":["string","null"]},"buffer_before_minutes":{"type":"integer"},"buffer_after_minutes":{"type":"integer"},"min_notice_minutes":{"type":"integer"},"booking_window_days":{"type":"integer"},"max_per_day":{"type":["integer","null"]},"reminder_minutes":{"type":"array","items":{"type":"integer"},"description":"Minutes-before-start to remind the attendee"},"schedule_id":{"type":["string","null"],"description":"Availability schedule (`sched_…`) that makes this bookable; \"\" detaches"},"form_id":{"type":["string","null"],"description":"Intake form (`form_…`) shown at booking; \"\" detaches"}}},"Experience":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":["string","null"]},"access_type":{"type":"string","enum":["secret","open"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"type":{"type":"string"},"active_grants_count":{"type":"integer"},"details":{"type":"object","description":"Type-specific fields, shaped by the experience's `type`. Mirrors what PATCH accepts under `details` (see the per-type *DetailsRequest schemas), plus read-only collections (e.g. a course's `chapters`)."}},"required":["id","object","name","slug","description","access_type","created_at","updated_at","type","active_grants_count","details"]},"ExperienceCreateRequest":{"type":"object","properties":{"type":{"type":"string","enum":["digital_download","course","written_content","website_embed","link","forum","discord_server","telegram","event","event_type"],"description":"The kind of experience (sellable content/access) to create. Each type builds a different content model managed through its own nested endpoints:\n- `course` — online course; add modules via POST /experiences/{id}/chapters, lessons via POST /chapters/{id}/lessons\n- `digital_download` — downloadable files; upload via POST /experiences/{id}/files\n- `forum` — community; add topics/posts via POST /experiences/{id}/topics and /posts\n- `event` — live event; add sessions via POST /experiences/{id}/event_sessions\n- `event_type` — bookable 1:1 session (Cal.com-style); set schedule/form via PATCH details\n- `link` — link-in-bio; add links via POST /experiences/{id}/link_items\n- `written_content` — rich-text article (set body via PATCH details)\n- `website_embed`, `discord_server`, `telegram` — embed / external community access\nMake an experience sellable by linking it to a price variant: POST /price_variants/{id}/experiences."},"name":{"type":"string","description":"Display name for the experience"}},"required":["type"]},"ExperienceGrant":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"customer":{"type":"string"},"customer_name":{"type":"string"},"customer_email":{"type":"string"},"experience":{"type":"string"},"experience_name":{"type":"string"},"status":{"type":"string"},"grant_type":{"type":"string"},"reason":{"type":["string","null"]},"granted_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","object","customer","customer_name","customer_email","experience","experience_name","status","grant_type","reason","granted_at","revoked_at","expires_at","created_at","updated_at"]},"ExperienceGrantRequest":{"type":"object","properties":{"customer_id":{"type":"string","description":"Customer ID (`cus_...`) to grant access to"},"reason":{"type":["string","null"],"description":"Optional reason recorded on the grant"}},"required":["customer_id"]},"ExperienceLinkDeleteResponse":{"type":"object","properties":{"price_variant":{"type":"string"},"experience":{"type":"string"},"object":{"type":"string","enum":["experience_link"]},"deleted":{"type":"boolean","enum":[true]}},"required":["price_variant","experience","object","deleted"]},"ExperienceUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"],"description":"Short description (max 200 chars)"},"access_type":{"type":"string","enum":["secret","open"],"description":"`secret` (access via grant/purchase) or `open` (visible to members)"},"slug":{"type":"string","description":"URL slug, unique within the account"},"details":{"description":"Type-specific fields. The accepted shape is determined by the experience's `type` (see the per-type schemas). Collection content (chapters, link items, topics, posts, event sessions) has its own nested endpoints. Link, Discord, Telegram, and Event types take no `details`.","oneOf":[{"$ref":"#/components/schemas/CourseDetailsRequest"},{"$ref":"#/components/schemas/DigitalDownloadDetailsRequest"},{"$ref":"#/components/schemas/WrittenContentDetailsRequest"},{"$ref":"#/components/schemas/WebsiteEmbedDetailsRequest"},{"$ref":"#/components/schemas/ForumDetailsRequest"},{"$ref":"#/components/schemas/EventTypeDetailsRequest"}]}}},"File":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string","enum":["file","external_video"]},"upload_status":{"type":"string","enum":["pending","processing","ready","failed"]},"source":{"type":"string","enum":["upload","url_import","external_video","generation"]},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"url":{"type":["string","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}},"source_job_id":{"type":["string","null"]},"filename":{"type":["string","null"]},"content_type":{"type":["string","null"]},"size":{"type":["integer","null"]},"provider":{"type":["string","null"]},"file_url":{"type":["string","null"]}},"required":["object","id","kind","upload_status","source","title","description","created_at","updated_at","url","tags","source_job_id","filename","content_type","size","provider","file_url"]},"FileCreateResponse":{"type":"object","allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"upload_url":{"type":["string","null"]},"upload_headers":{"type":["object","null"]}}}]},"FileRequest":{"type":"object","properties":{"kind":{"type":["string","null"],"enum":["file","external_video",null],"description":"Defaults to 'file'. Set to 'external_video' to pin a YouTube, Vimeo, or Wistia URL as an embed."},"url":{"type":["string","null"],"description":"Required when kind=external_video, or for server-side URL imports of files."},"filename":{"type":["string","null"],"description":"Required for presigned uploads. Optional for URL imports."}}},"FileUpdateRequest":{"type":"object","properties":{"title":{"type":["string","null"],"description":"Human-readable display title. Pass null to clear it."},"filename":{"type":["string","null"],"description":"Rename the file (updates the stored blob filename). Files only."},"description":{"type":["string","null"],"description":"Free-text description. Pass null to clear it."},"tags":{"type":["array","null"],"items":{"type":"string"},"description":"Replaces the tag list. Pass an empty array to clear all tags."},"url":{"type":["string","null"],"description":"New source URL for an external-video embed (YouTube, Vimeo, or Wistia)."}}},"Form":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"redirect_url":{"type":["string","null"]},"settings":{"type":"object"},"archived_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"confirmation_required":{"type":"boolean"},"tag_ids":{"type":"array","items":{"type":"string"}},"delivery_url":{"type":["string","null"]},"delivery_subject":{"type":["string","null"]},"delivery_message":{"type":["string","null"]},"delivery_type":{"type":"string","enum":["none","file","link","experience"]},"delivery_file":{"type":["object","null"]},"experience_id":{"type":["string","null"]},"submissions_count":{"type":"number"},"form_fields":{"type":"array","items":{"$ref":"#/components/schemas/FormField"}}},"required":["id","object","name","redirect_url","settings","archived_at","created_at","updated_at","confirmation_required","tag_ids","delivery_url","delivery_subject","delivery_message","delivery_type","delivery_file","experience_id","submissions_count","form_fields"]},"FormField":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"field_type":{"type":"string","enum":["email","text","phone","textarea","radio","select","checkbox","consent"]},"required":{"type":["boolean","null"]},"position":{"type":["integer","null"]},"options":{"type":"array","items":{"type":"string"}}},"required":["id","object","name","field_type","required","position","options"]},"FormRequest":{"type":"object","properties":{"name":{"type":"string"},"redirect_url":{"type":["string","null"],"description":"Full https:// URL people land on after they click the confirmation link, with `confirmation_required` on."},"delivery_type":{"type":"string","enum":["none","file","link","experience"],"description":"What everyone who submits gets by email, on every submission. `none` turns delivery off; `file` needs `delivery_file_id`, `link` needs `delivery_url`, `experience` needs `experience_id`."},"delivery_url":{"type":["string","null"],"description":"Full https:// URL to send: a page, video or download elsewhere."},"experience_id":{"type":["string","null"],"description":"Experience ID to grant access to; the email carries a sign-in link."},"delivery_subject":{"type":["string","null"],"description":"Subject of the delivery email. Defaults to \"Your freebie from <business> is here!\"."},"delivery_message":{"type":["string","null"],"description":"Plain-text body of the delivery email; the download button is added below it."},"archived_at":{"type":["string","null"],"format":"date-time"},"tag_ids":{"type":"array","items":{"type":"string"},"description":"Tag IDs added to everyone who submits (never replacing their other tags). With `confirmation_required`, once they confirm."},"form_fields_attributes":{"type":"array","description":"Nested-attributes payload for creating, updating, or destroying fields in one round-trip. Pass `id` to update an existing field; pass `_destroy: true` to remove one.","items":{"type":"object","properties":{"id":{"type":["integer","null"],"description":"FormField id (omit when creating)"},"name":{"type":"string","description":"User-facing label"},"field_type":{"type":"string","enum":["email","text","phone","textarea","radio","select","checkbox","consent"]},"required":{"type":"boolean"},"position":{"type":"integer","description":"Zero-based ordinal"},"options":{"type":"array","items":{"type":"string"},"description":"Required when field_type is radio/select/checkbox"},"_destroy":{"type":"boolean","description":"Set true to remove this field"}},"required":["name","field_type"]}},"settings":{"type":"object"},"confirmation_required":{"type":"boolean","description":"Double opt-in: tags and the lead magnet wait until the person clicks the confirmation link."},"delivery_file_id":{"type":"string","description":"File ID (`file_...`, from the Files API) to send as a download."}}},"FormSubmission":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"answers":{"type":"array","items":{"type":"object","properties":{"field_type":{"type":"string"},"label":{"type":"string"},"required":{"type":"boolean"},"value":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"null"}]},"options":{"type":"array","items":{"type":"string"}}},"required":["field_type","label","required","value"]}},"respondent_type":{"type":"string"},"confirmation_requested_at":{"type":["string","null"],"format":"date-time"},"confirmed_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"respondent_id":{"type":"string"},"form_id":{"type":"string"}},"required":["id","object","answers","respondent_type","confirmation_requested_at","confirmed_at","delivered_at","created_at","respondent_id","form_id"]},"FormSubmissionRequest":{"type":"object","properties":{"form_id":{"type":"string","description":"Form ID being submitted"},"email":{"type":"string","description":"Respondent email address. Used to upsert a Customer and, as a convenience, auto-fills the form's email field if no answer is provided for it."},"name":{"type":["string","null"],"description":"Respondent name (defaults to email local-part if omitted). Auto-fills the form's first text field when present and not otherwise supplied via `answers`."},"answers":{"type":"object","additionalProperties":true,"description":"Map of form_field id → answer value. Optional for simple email-only forms — pass `{}` and rely on the `email` auto-fill. A `consent` field takes `true` when the person ticked it."},"ip_address":{"type":["string","null"],"description":"The submitter's IP address, kept with the submission as a record of the signup."}},"required":["form_id","email","answers"]},"Formation":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"status":{"type":"string","enum":["awaiting_payment","pending","submitted","completed","failed"]},"entity_type":{"type":"string","enum":["LLC"]},"state":{"type":"string"},"naics_code":{"type":"string"},"industry":{"type":["string","null"]},"description":{"type":"string"},"name_options":{"type":"array"},"members":{"type":"array"},"responsible_party":{"type":"object"},"mailing_address":{"type":"object"},"ein":{"type":["string","null"]},"formation_filing_date":{"type":["string","null"]},"formation_filing_number":{"type":["string","null"]},"services":{"type":"array"},"signature_requirements":{"type":"array"},"admin_notes":{"type":"array"},"doola_error":{"type":["string","null"]},"stripe_checkout_session_id":{"type":["string","null"]},"submitted_at":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"required_actions":{"type":"array"},"doola_company_id":{"type":["string","null"]},"verification_id":{"type":["string","null"]},"payment_status":{"type":"string","enum":["unpaid","paid","refunded"]},"documents":{"type":"array","items":{"$ref":"#/components/schemas/FormationDocument"}}},"required":["id","object","status","entity_type","state","naics_code","industry","description","name_options","members","responsible_party","mailing_address","ein","formation_filing_date","formation_filing_number","services","signature_requirements","admin_notes","doola_error","stripe_checkout_session_id","submitted_at","created_at","updated_at","required_actions","doola_company_id","verification_id","payment_status","documents"]},"FormationDocument":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"document_type":{"type":"string"},"name":{"type":"string"},"content_type":{"type":["string","null"]},"doola_created_at":{"type":["string","null"]},"doola_last_modified_at":{"type":["string","null"]},"doola_company_id":{"type":"string"},"download_url":{"type":["string","null"]}},"required":["id","object","document_type","name","content_type","doola_created_at","doola_last_modified_at","doola_company_id","download_url"]},"ForumDetailsRequest":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"layout":{"type":"string","enum":["feed","list","card"]},"admin_only_posting":{"type":"boolean"},"admin_only_commenting":{"type":"boolean"}}},"GenerationModel":{"type":"object","properties":{"object":{"type":"string","enum":["model"]},"id":{"type":"string"},"tier":{"type":["string","null"],"enum":["fast","balanced","quality",null],"description":"Quality tier this model backs. Pass the tier name as `model` instead of the id."},"default":{"type":"boolean"},"unit_price":{"type":["number","null"]},"unit":{"type":["string","null"]},"currency":{"type":["string","null"]},"credits_per_second":{"type":["number","null"],"description":"Video models only: Crevio credits per second of output, from what recent generations were billed."}},"required":["object","id","default"]},"ImageEditRequest":{"type":"object","properties":{"model":{"type":"string","examples":["fast","balanced","quality","fal-ai/bytedance/seedream/v4.5/edit","fal-ai/nano-banana-2/edit","openai/gpt-image-2.5/sunburst/edit","fal-ai/nano-banana/edit","fal-ai/nano-banana-pro/edit","fal-ai/flux-pro/kontext"],"description":"A quality tier (fast, balanced, quality) or any fal.ai image-to-image endpoint id. Prefer a tier — it tracks the best current model for that price point. Defaults to fal-ai/nano-banana/edit."},"input":{"type":"object","description":"Model-specific input, forwarded to fal verbatim. `prompt` and a source image (`image_url` or `image_urls`) are required. For a featured model either image field is accepted and normalized to whichever that model expects; other models receive it as sent.","properties":{"prompt":{"type":"string","description":"Text instruction describing the edit to apply."},"image_url":{"type":"string","format":"uri","description":"URL of the source image to edit."},"image_urls":{"type":"array","items":{"type":"string","format":"uri"},"description":"URLs of source/reference images (multi-image models only; single-image models use the first)."}},"required":["prompt"]}},"required":["input"]},"ImageGenerateRequest":{"type":"object","properties":{"model":{"type":"string","examples":["fast","balanced","quality","fal-ai/z-image/turbo","fal-ai/nano-banana-2","openai/gpt-image-2.5/flare/text-to-image"],"description":"A quality tier (fast, balanced, quality) or any fal.ai image endpoint id. Prefer a tier — it tracks the best current model for that price point. Defaults to fal-ai/nano-banana-2; `GET /v1/images/models` maps tiers to ids with live pricing."},"input":{"type":"object","description":"Model-specific input, forwarded to fal verbatim. `prompt` is required.","properties":{"prompt":{"type":"string","description":"Text prompt describing the image to generate."}},"required":["prompt"]}},"required":["input"]},"ImageUpscaleRequest":{"type":"object","properties":{"model":{"type":"string","examples":["fast","balanced","quality","fal-ai/seedvr/upscale/image","fal-ai/topaz/upscale/image","topaz/upscale/image/generative"],"description":"A quality tier (fast, balanced, quality) or any fal.ai upscaling endpoint id. Prefer a tier — it tracks the best current model for that price point. Defaults to fal-ai/topaz/upscale/image."},"input":{"type":"object","description":"Model-specific input, forwarded to fal verbatim. `image_url` is required.","properties":{"image_url":{"type":"string","format":"uri","description":"URL of the source image to upscale."},"scale":{"type":"integer","enum":[2,4],"default":2,"description":"Upscaling factor. Defaults to 2."},"output_format":{"type":"string","enum":["jpeg","png"],"default":"jpeg","description":"Output image format. Defaults to jpeg."}},"required":["image_url"]}},"required":["input"]},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"status":{"type":"string","enum":["open","paid","past_due","void"]},"number":{"type":"string"},"description":{"type":["string","null"]},"customer_name":{"type":["string","null"]},"email_address":{"type":["string","null"]},"collection_method":{"type":"string","enum":["send_invoice","charge_automatically"]},"due_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"checkout_url":{"type":["string","null"]},"amount":{"type":["number","null"]},"currency":{"type":["string","null"]},"paid_at":{"type":["string","null"]},"customer":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Customer"},{"type":"null"}],"description":"ID by default, full object when expanded"},"price_variant":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/PriceVariant"},{"type":"null"}],"description":"ID by default, full object when expanded"},"order":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Order"},{"type":"null"}],"description":"ID by default, full object when expanded"}},"required":["id","object","status","number","description","customer_name","email_address","collection_method","due_at","created_at","updated_at","checkout_url","amount","currency","paid_at","price_variant"]},"InvoiceRequest":{"type":"object","properties":{"customer_name":{"type":["string","null"]},"email_address":{"type":["string","null"]},"description":{"type":["string","null"]},"customer":{"type":["string","null"],"description":"Customer ID"},"price_variant":{"type":["string","null"],"description":"Price variant ID"},"due_at":{"type":"string","format":"date-time"}}},"JobCancelResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["job"]},"status":{"type":"string","enum":["cancelled"]},"credits_refunded":{"type":"integer"}},"required":["id","object","status","credits_refunded"]},"LegalPage":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"body":{"type":"string"},"policy_type":{"type":"string","enum":["terms_of_service","privacy_policy","refund_policy"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","title","slug","body","policy_type","created_at","updated_at"]},"LegalPageRequest":{"type":"object","properties":{"body":{"type":"string"}}},"Lesson":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"title":{"type":"string"},"position":{"type":"integer"},"lesson_type":{"type":"string"},"published":{"type":"boolean"},"published_at":{"type":["string","null"],"format":"date-time"},"html_content":{"type":["string","null"]},"chapter":{"type":"string"},"video_url":{"type":["string","null"]},"files":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"filename":{"type":["string","null"]},"content_type":{"type":["string","null"]},"byte_size":{"type":"integer"},"url":{"type":"string"}},"required":["id","filename","byte_size","url"]}}},"required":["id","object","title","position","lesson_type","published","published_at","html_content","chapter","video_url","files"]},"LessonFile":{"type":"object","properties":{"id":{"type":"string","description":"Attachment id (`att_...`)"},"filename":{"type":"string"},"content_type":{"type":["string","null"]},"byte_size":{"type":"integer"},"url":{"type":"string"}},"required":["id","filename","byte_size","url"]},"LessonRequest":{"type":"object","properties":{"title":{"type":"string","description":"Lesson title (defaults to \"Lesson N\")"},"lesson_type":{"type":"string","description":"Lesson type (defaults to `multimedia`)"},"html_content":{"type":["string","null"],"description":"Rich-text lesson body"},"video_url":{"type":["string","null"],"description":"URL of the lesson's video"},"is_published":{"type":"boolean"}}},"LinkItem":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","object","title","url","created_at","updated_at"]},"LinkItemRequest":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"}}},"ListResponse_AiBot":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AiBot"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_AiSite":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AiSite"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_AiSkill":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AiSkill"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_AiTask":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AiTask"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_AiTaskRun":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AiTaskRun"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_ApiKey":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Approval":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Approval"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_BlogCategory":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/BlogCategory"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_BlogPost":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/BlogPost"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Booking":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Booking"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Call":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Call"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Chapter":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Chapter"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_CheckoutLink":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutLink"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Connection":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Connection"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_ConnectionApp":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionApp"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_ConnectionCapability":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ConnectionTool"},{"$ref":"#/components/schemas/ConnectionPointer"}]}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Customer":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Deployment":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Deployment"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_DigitalDownloadFile":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/DigitalDownloadFile"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Discount":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Domain":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_EmailSuppression":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailSuppression"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_EventSession":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventSession"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_EventSource":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventSource"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_EventType":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Experience":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Experience"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_ExperienceGrant":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ExperienceGrant"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_File":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Form":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Form"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_FormSubmission":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/FormSubmission"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Formation":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Formation"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_FormationDocument":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/FormationDocument"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_GenerationModel":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/GenerationModel"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Invoice":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_LegalPage":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/LegalPage"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Lesson":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Lesson"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_LessonFile":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/LessonFile"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_LinkItem":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/LinkItem"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Log":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Log"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Order":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_OrderItem":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_PhoneConsent":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PhoneConsent"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_PhoneNumber":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumber"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_PhoneSuppression":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PhoneSuppression"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Plan":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Post":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Post"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_PriceVariant":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceVariant"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Product":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_ProviderJob":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProviderJob"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Refund":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Review":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Review"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Schedule":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Secret":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Secret"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Subscription":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Tag":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_Topic":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Topic"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_UsageTransaction":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/UsageTransaction"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_WebhookEndpoint":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"ListResponse_WebhookEvent":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}},"has_more":{"type":"boolean"},"url":{"type":"string"}},"required":["object","data","has_more","url"]},"Log":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"action":{"type":"string"},"actor_type":{"type":"string"},"actor_id":{"type":["string","null"]},"entity_type":{"type":["string","null"]},"entity_id":{"type":["string","null"]},"data":{"type":"object"},"created_at":{"type":"string"}},"required":["object","id","action","actor_type","actor_id","entity_type","entity_id","data","created_at"]},"Me":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":["string","null"]},"username":{"type":"string"},"email":{"type":"string"},"preferred_language":{"type":"string"},"time_zone":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"avatar_url":{"type":["string","null"]},"roles":{"type":"array"}},"required":["id","object","name","username","email","preferred_language","time_zone","created_at","avatar_url","roles"]},"MediaGalleryItem":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"category":{"type":"string","enum":["image","video","external"]},"url":{"type":"string"}},"required":["id","type","category","url"]},"Order":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"status":{"type":"string","enum":["succeeded","pending","failed","refunded","partially_refunded","disputed"]},"livemode":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"metadata":{"type":["object","null"]},"amount":{"type":"integer","description":"Amount charged after discounts, in the smallest currency unit (79 = $0.79)."},"currency":{"type":"string"},"amount_refunded":{"type":"integer","description":"Amount refunded so far, in the smallest currency unit."},"customer":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Customer"},{"type":"null"}],"description":"ID by default, full object when expanded"},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}},"checkout":{"type":"string"},"billing_address":{"oneOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"shipping_address":{"oneOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"charge":{"type":["string","null"]}},"required":["id","object","status","livemode","created_at","updated_at","metadata","amount","currency","amount_refunded","customer","checkout","billing_address","shipping_address","charge"]},"OrderItem":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"quantity":{"type":"integer"},"order":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Order"},{"type":"null"}],"description":"ID by default, full object when expanded"},"price_variant":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/PriceVariant"},{"type":"null"}],"description":"ID by default, full object when expanded"},"product":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Product"},{"type":"null"}],"description":"ID by default, full object when expanded"}},"required":["id","object","quantity","price_variant","product"]},"PhoneConsent":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"e164":{"type":"string"},"purpose":{"type":"string","enum":["marketing","transactional"]},"consent_method":{"type":"string","enum":["web_form","checkout","import","verbal","api","other"]},"timezone":{"type":["string","null"]},"consented_at":{"type":"string","format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"customer":{"type":["string","null"]}},"required":["id","object","e164","purpose","consent_method","timezone","consented_at","revoked_at","created_at","updated_at","customer"]},"PhoneConsentRequest":{"type":"object","properties":{"e164":{"type":"string"},"purpose":{"type":"string","enum":["marketing","transactional"]},"consent_method":{"type":"string","enum":["web_form","checkout","import","verbal","api","other"]},"timezone":{"type":["string","null"]},"customer":{"type":["string","null"],"description":"Customer ID"},"proof":{"type":"object"}}},"PhoneNumber":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"e164":{"type":["string","null"]},"status":{"type":"string","enum":["active","inactive","awaiting_verification","in_review","declined","cancelled"]},"country":{"type":"string"},"inbound_objective":{"type":["string","null"]},"forward_to":{"type":["string","null"]},"call_routing":{"type":"string","enum":["agent","forward"]},"verification_url":{"type":["string","null"]},"review_note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"monthly_credits":{"type":"integer"}},"required":["id","object","e164","status","country","inbound_objective","forward_to","call_routing","verification_url","review_note","created_at","updated_at","monthly_credits"]},"PhoneNumberRequest":{"type":"object","properties":{"inbound_objective":{"type":["string","null"]},"status":{"type":"string","enum":["active","inactive","awaiting_verification","in_review","declined","cancelled"]},"country":{"type":"string"},"forward_to":{"type":["string","null"]},"call_routing":{"type":"string","enum":["agent","forward"]}}},"PhoneSuppression":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"e164":{"type":"string"},"reason":{"type":"string","enum":["opt_out","dnc_registry","complaint","manual","bounce"]},"note":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","object","e164","reason","note","created_at","updated_at"]},"PhoneSuppressionRequest":{"type":"object","properties":{"e164":{"type":"string"},"reason":{"type":"string","enum":["opt_out","dnc_registry","complaint","manual","bounce"]},"note":{"type":["string","null"]}}},"Plan":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"interval":{"type":"string"},"currency":{"type":["string","null"]},"trial_period_days":{"type":["integer","null"]},"tiers":{"type":"array","items":{"$ref":"#/components/schemas/PlanTier"}},"features":{"type":"array","items":{"type":"string"}},"limits":{"type":"array","items":{"$ref":"#/components/schemas/PlanLimit"}}},"required":["object","id","name","interval","currency","trial_period_days","tiers","features","limits"]},"PlanLimit":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":["number","null"]}},"required":["name","value"]},"PlanTier":{"type":"object","properties":{"credits":{"type":"number"},"price":{"type":"number"},"current":{"type":"boolean"}},"required":["credits","price","current"]},"Post":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"title":{"type":["string","null"]},"content":{"type":"string"},"pinned":{"type":["boolean","null"]},"gif_url":{"type":["string","null"]},"author_name":{"type":"string"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/Topic"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","object","title","content","pinned","gif_url","author_name","topics","created_at","updated_at"]},"PostRequest":{"type":"object","properties":{"title":{"type":["string","null"]},"content":{"type":"string","description":"Post body (required). The post's slug is derived from the title when present, otherwise from the content."},"pinned":{"type":"boolean"},"gif_url":{"type":["string","null"]},"topics":{"type":"array","items":{"type":"string"},"description":"Topic IDs (`topic_...`) to file the post under"}},"required":["content"]},"PriceVariant":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"amount":{"type":["integer","null"]},"amount_type":{"type":"string","enum":["free","fixed","custom"]},"billing_type":{"type":"string","enum":["subscription","one_time","payment_plan"]},"recurring_interval":{"type":["string","null"],"enum":["day","week","month","year",null]},"interval_count":{"type":"integer"},"installment_count":{"type":["integer","null"]},"setup_fee_amount":{"type":["integer","null"]},"trial_period_days":{"type":["integer","null"]},"revoke_after_days":{"type":["integer","null"]},"quantity_available":{"type":["integer","null"]},"archived":{"type":["boolean","null"]},"position":{"type":"integer"},"hidden":{"type":["boolean","null"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"currency":{"type":["string","null"]},"discounted_from_amount":{"type":["integer","null"]},"minimum_amount":{"type":["integer","null"]},"maximum_amount":{"type":["integer","null"]},"preset_amount":{"type":["integer","null"]},"waitlist":{"type":"boolean"},"benefits":{"type":"array","items":{"type":"string"}},"purchase_url":{"type":"string"},"product":{"type":"string"}},"required":["id","object","name","amount","amount_type","billing_type","recurring_interval","interval_count","installment_count","setup_fee_amount","trial_period_days","revoke_after_days","quantity_available","archived","position","hidden","created_at","updated_at","currency","discounted_from_amount","minimum_amount","maximum_amount","preset_amount","waitlist","purchase_url","product"]},"PriceVariantExperienceRequest":{"type":"object","properties":{"experience_id":{"type":"string","description":"Experience ID or slug to link"}},"required":["experience_id"]},"PriceVariantRequest":{"type":"object","properties":{"product":{"type":"string","description":"Product ID the variant belongs to"},"name":{"type":"string"},"amount_type":{"type":"string","enum":["free","fixed","custom"]},"amount":{"type":["integer","null"]},"currency":{"type":["string","null"]},"billing_type":{"type":"string","enum":["subscription","one_time","payment_plan"]},"recurring_interval":{"type":["string","null"],"enum":["day","week","month","year"]},"interval_count":{"type":"integer"},"installment_count":{"type":["integer","null"]},"setup_fee_amount":{"type":["integer","null"]},"trial_period_days":{"type":["integer","null"]},"revoke_after_days":{"type":["integer","null"]},"quantity_available":{"type":["integer","null"]},"waitlist":{"type":"boolean"},"archived":{"type":["boolean","null"]},"hidden":{"type":["boolean","null"]}},"required":["product"]},"PriceVariantUpdateRequest":{"type":"object","properties":{"name":{"type":"string"},"amount_type":{"type":"string","enum":["free","fixed","custom"]},"amount":{"type":["integer","null"]},"currency":{"type":["string","null"]},"billing_type":{"type":"string","enum":["subscription","one_time","payment_plan"]},"recurring_interval":{"type":["string","null"],"enum":["day","week","month","year"]},"interval_count":{"type":"integer"},"installment_count":{"type":["integer","null"]},"setup_fee_amount":{"type":["integer","null"]},"trial_period_days":{"type":["integer","null"]},"revoke_after_days":{"type":["integer","null"]},"quantity_available":{"type":["integer","null"]},"waitlist":{"type":"boolean"},"archived":{"type":["boolean","null"]},"hidden":{"type":["boolean","null"]}}},"Product":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"description":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"metadata":{"type":"object"},"body_html":{"type":"string"},"button_cta":{"type":["string","null"]},"url":{"type":"string"},"available_from":{"type":["string","null"],"format":"date-time"},"available_until":{"type":["string","null"],"format":"date-time"},"published_at":{"type":["string","null"],"format":"date-time"},"reviews_count":{"type":"integer"},"average_rating":{"type":["number","null"]},"seo":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Seo"},{"type":"null"}],"description":"ID by default, full object when expanded"},"media_gallery":{"type":"array","items":{"$ref":"#/components/schemas/MediaGalleryItem"}},"price_variants":{"type":"array","items":{"$ref":"#/components/schemas/PriceVariant"}},"reviews":{"type":"array","items":{"$ref":"#/components/schemas/Review"}}},"required":["id","object","name","slug","status","description","created_at","updated_at","metadata","body_html","button_cta","url","available_from","available_until","published_at","reviews_count","average_rating","media_gallery","price_variants"]},"ProductRequest":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"],"description":"A product can't be set to `active` until it has at least one price variant. Create it as `draft` (or omit — `draft` is the default), add a price variant via POST /v1/price_variants, then PATCH the product to `active`."},"description":{"type":"string"},"body_html":{"type":"string"},"slug":{"type":"string"},"button_cta":{"type":["string","null"]},"available_from":{"type":["string","null"],"format":"date-time"},"available_until":{"type":["string","null"],"format":"date-time"},"tax_code":{"type":["string","null"]},"images":{"type":"array","items":{"type":"string"},"description":"MediaLibrary file ids (e.g. `file_abc123`) to set as the product gallery; the first is the cover. Replaces the existing gallery — an empty array clears it. Create files via POST /v1/files or POST /v1/images/generate.","example":["file_abc123"]},"seo":{"type":"object","properties":{"title":{"type":["string","null"],"maxLength":60,"description":"Meta title for the product page. Aim for 60 characters or fewer; `null` clears it."},"description":{"type":["string","null"],"maxLength":160,"description":"Meta description for the product page. Aim for 160 characters or fewer; `null` clears it."}},"description":"Search-engine metadata for the product page, in the same shape it is returned. Omitted keys are left unchanged."}}},"ProviderJob":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"type":{"type":"string"},"status":{"type":"string","enum":["queued","processing","completed","failed","cancelled"]},"model":{"type":"string"},"progress":{"type":"integer"},"input":{"type":"object"},"result":{"type":["object","null"]},"error":{"type":["string","null"]},"error_code":{"type":["string","null"]},"credits_used":{"type":["integer","null"]},"provider_request_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["id","object","type","status","model","progress","input","result","error","error_code","credits_used","provider_request_id","created_at","started_at","completed_at"]},"Refund":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"amount":{"type":"integer"},"currency":{"type":"string"},"reason":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"provider":{"type":"string"},"metadata":{"type":"object"},"order":{"type":"string"}},"required":["id","object","amount","currency","reason","status","created_at","provider","metadata","order"]},"RefundRequest":{"type":"object","properties":{"order":{"type":"string","description":"Order ID to refund"},"amount":{"type":["integer","null"],"description":"Amount to refund in cents (omit for full refund)"},"reason":{"type":["string","null"],"description":"Reason for the refund"},"notes":{"type":["string","null"],"description":"Internal notes about the refund"}}},"Review":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"rating":{"type":"integer"},"customer_name":{"type":["string","null"]},"content":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"customer_image_url":{"type":["string","null"]}},"required":["id","object","rating","customer_name","content","created_at","customer_image_url"]},"ReviewCreateRequest":{"type":"object","properties":{"product":{"type":"string","description":"Product ID the review is for"},"customer":{"type":["string","null"],"description":"Customer ID, optional"},"customer_name":{"type":["string","null"],"description":"Display name (required when no customer)"},"rating":{"type":"integer","description":"Star rating, 1-5"},"content":{"type":"string","description":"Review body"}},"required":["product","rating","content"]},"ReviewPositionRequest":{"type":"object","properties":{"position":{"type":"integer","description":"Zero-based ordinal position within the product's reviews"}},"required":["position"]},"ReviewRequest":{"type":"object","properties":{"customer_name":{"type":["string","null"]},"rating":{"type":"integer"},"content":{"type":["string","null"]},"position":{"type":"integer"}}},"Schedule":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"time_zone":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"availability":{"type":"array","items":{"type":"object"}},"overrides":{"type":"array","items":{"type":"object"}}},"required":["object","id","name","time_zone","created_at","updated_at","availability","overrides"]},"Secret":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"target":{"type":"string"},"scope":{"type":"string"},"site_id":{"type":["string","null"]},"site_ids":{"type":"object"},"description":{"type":["string","null"]},"egress_host":{"type":["string","null"]},"egress_header":{"type":["string","null"]},"egress_placement":{"type":"string"},"egress_signing":{"type":"object"},"egress_default_headers":{"type":"object"},"last4":{"type":"string"},"value":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["object","id","name","target","scope","site_id","site_ids","description","egress_host","egress_header","egress_placement","egress_signing","egress_default_headers","last4","value","created_at"]},"Seo":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]}},"required":["title","description"]},"SiteAnalyticsDimension":{"type":"array","description":"Top 20 values for a single analytics dimension, ranked by unique visitors.","items":{"type":"object","properties":{"value":{"type":"string"},"pageviews":{"type":"integer"},"visitors":{"type":"integer"}}}},"SocialAccount":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"platform":{"type":"string","enum":["twitter","linkedin","instagram","facebook","youtube","tiktok","pinterest","threads","reddit","bluesky","metaads","tiktokads","googleads","linkedinads","pinterestads","xads","openaiads"]},"username":{"type":["string","null"]},"display_name":{"type":["string","null"]},"avatar_url":{"type":["string","null"]},"external_id":{"type":["string","null"]},"label":{"type":["string","null"]},"status":{"type":"string","enum":["active","inactive","error"]}},"required":["object","id","platform","username","display_name","avatar_url","external_id","label","status"]},"SocialLink":{"type":"object","properties":{"platform":{"type":"string","enum":["facebook","twitter","instagram","linkedin","youtube","tiktok","pinterest","discord","twitch","telegram","email","url"]},"url":{"type":"string"}},"required":["platform","url"]},"SocialPost":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"title":{"type":["string","null"]},"content":{"type":"string"},"platforms":{"type":"object"},"platform_data":{"type":"object"},"upload_ids":{"type":"array"},"media_urls":{"type":"array"},"status":{"type":"string","enum":["draft","publishing","scheduled","posted","failed","disconnected"]},"scheduled_at":{"type":["string","null"],"format":"date-time"},"posted_at":{"type":["string","null"],"format":"date-time"},"error":{"type":["string","null"]},"analytics":{"type":"object"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["object","id","title","content","platforms","platform_data","upload_ids","media_urls","status","scheduled_at","posted_at","error","analytics","created_at","updated_at"]},"SocialUpload":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"url":{"type":"string"},"filename":{"type":["string","null"]},"content_type":{"type":["string","null"]},"size_bytes":{"type":["integer","null"]},"thumbnail_url":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["object","id","url","filename","content_type","size_bytes","thumbnail_url","created_at"]},"Status":{"type":"object","properties":{"object":{"type":"string","enum":["status"]},"status":{"type":"string","enum":["operational"]},"api_version":{"type":"string"},"authenticated":{"type":"boolean"},"account":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["id","name"]},"limits":{"type":"object","properties":{"rate_limit":{"type":"object","properties":{"tier":{"type":"string","enum":["free","starter","pro","business"]},"limit":{"type":"integer"},"window_seconds":{"type":"integer"},"remaining":{"type":"integer"},"resets_at":{"type":"string","format":"date-time"}},"required":["tier","limit","window_seconds","remaining","resets_at"]},"task_runs":{"type":"object","properties":{"max_concurrent_per_account":{"type":"integer"},"max_concurrent_per_task":{"type":"integer"},"max_runtime_seconds":{"type":"integer"}},"required":["max_concurrent_per_account","max_concurrent_per_task","max_runtime_seconds"]},"pagination":{"type":"object","properties":{"default_limit":{"type":"integer"},"max_limit":{"type":"integer"}},"required":["default_limit","max_limit"]}},"required":["rate_limit","task_runs","pagination"]},"documentation_url":{"type":"string"},"timestamp":{"type":"string","format":"date-time"}},"required":["object","status","api_version","authenticated","account","limits","documentation_url","timestamp"]},"Subscription":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"status":{"type":["string","null"]},"quantity":{"type":"integer"},"current_period_start":{"type":["string","null"],"format":"date-time"},"current_period_end":{"type":["string","null"],"format":"date-time"},"trial_ends_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"livemode":{"type":"boolean"},"canceled":{"type":"boolean"},"paused":{"type":"boolean"},"customer":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Customer"},{"type":"null"}],"description":"ID by default, full object when expanded"},"order":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Order"},{"type":"null"}],"description":"ID by default, full object when expanded"},"discount":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Discount"},{"type":"null"}],"description":"ID by default, full object when expanded"}},"required":["id","object","status","quantity","current_period_start","current_period_end","trial_ends_at","ends_at","created_at","updated_at","livemode","canceled","paused"]},"Tag":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"customers_count":{"type":"number"}},"required":["id","object","name","created_at","updated_at","customers_count"]},"TagRequest":{"type":"object","properties":{"name":{"type":"string"}}},"TaskCostEstimate":{"type":"object","properties":{"object":{"type":"string"},"runs_per_day":{"type":["number","null"]},"credits_per_run":{"type":"number"},"basis":{"type":"string","enum":["task_history","account_history","typical"]},"sample_runs":{"type":"number"},"credits_per_day":{"type":["number","null"]},"credits_per_month":{"type":["number","null"]},"balance":{"type":"number"},"burn_rate_per_day":{"type":"number"},"refills_at":{"type":["string","null"]},"runs_out_at":{"type":["string","null"]},"runs_out_before_refill":{"type":"boolean"},"auto_top_up":{"type":"boolean"}},"required":["object","runs_per_day","credits_per_run","basis","sample_runs","credits_per_day","credits_per_month","balance","burn_rate_per_day","refills_at","runs_out_at","runs_out_before_refill","auto_top_up"]},"Topic":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"name":{"type":"string"}},"required":["id","object","name"]},"TopicRequest":{"type":"object","properties":{"name":{"type":"string"}}},"Usage":{"type":"object","properties":{"object":{"type":"string"},"plan":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/UsagePlan"},{"type":"null"}],"description":"ID by default, full object when expanded"},"credits":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/UsageCreditBalance"},{"type":"null"}],"description":"ID by default, full object when expanded"},"spend":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/UsageSpend"},{"type":"null"}],"description":"ID by default, full object when expanded"},"forecast":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/UsageForecast"},{"type":"null"}],"description":"ID by default, full object when expanded"}},"required":["object","plan","credits","spend","forecast"]},"UsageChatSpend":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"title":{"type":["string","null"]},"credits":{"type":"number"},"runs":{"type":["number","null"]},"last_charged_at":{"type":"string"}},"required":["type","id","title","credits","runs","last_charged_at"]},"UsageCreditBalance":{"type":"object","properties":{"balance":{"type":"number"},"plan_credits":{"type":"number"},"top_up_credits":{"type":"number"},"bonus_credits":{"type":"number"},"monthly_allowance":{"type":["number","null"]},"limit_reached":{"type":"boolean"},"auto_top_up":{"type":"boolean"}},"required":["balance","plan_credits","top_up_credits","bonus_credits","monthly_allowance","limit_reached","auto_top_up"]},"UsageDaySpend":{"type":"object","properties":{"date":{"type":"string"},"credits":{"type":"number"}},"required":["date","credits"]},"UsageForecast":{"type":"object","properties":{"burn_rate_per_day":{"type":"number"},"runs_out_at":{"type":["string","null"]},"projected_balance_at_period_end":{"type":"number"},"will_run_out":{"type":"boolean"}},"required":["burn_rate_per_day","runs_out_at","projected_balance_at_period_end","will_run_out"]},"UsageOperationSpend":{"type":"object","properties":{"operation":{"type":"string"},"description":{"type":["string","null"]},"credits":{"type":"number"}},"required":["operation","description","credits"]},"UsagePlan":{"type":"object","properties":{"name":{"type":["string","null"]},"status":{"type":"string"},"is_paid":{"type":"boolean"},"on_trial":{"type":"boolean"},"trial_ends_at":{"type":["string","null"]},"renews_at":{"type":["string","null"]},"price":{"type":["number","null"]},"currency":{"type":["string","null"]},"interval":{"type":["string","null"]},"has_payment_method":{"type":"boolean"}},"required":["name","status","is_paid","on_trial","trial_ends_at","renews_at","price","currency","interval","has_payment_method"]},"UsageSpend":{"type":"object","properties":{"period_start":{"type":"string"},"period_end":{"type":"string"},"time_zone":{"type":"string"},"total_credits":{"type":"number"},"today_credits":{"type":"number"},"by_operation":{"type":"array","items":{"$ref":"#/components/schemas/UsageOperationSpend"}},"by_day":{"type":"array","items":{"$ref":"#/components/schemas/UsageDaySpend"}},"by_chat":{"type":"array","items":{"$ref":"#/components/schemas/UsageChatSpend"}}},"required":["period_start","period_end","time_zone","total_credits","today_credits","by_operation","by_day","by_chat"]},"UsageTransaction":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"category":{"type":"string"},"operation":{"type":["string","null"]},"description":{"type":["string","null"]},"amount":{"type":"number"},"reference":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["object","id","category","operation","description","amount","reference","created_at"]},"User":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"email":{"type":["string","null"]}},"required":["object","id","first_name","last_name","email"]},"VideoGenerateRequest":{"type":"object","properties":{"model":{"type":"string","examples":["fast","balanced","quality","fal-ai/veo3.1/lite","minimax/h3-max/text-to-video","google/gemini-omni-flash/v1.1/text-to-video","fal-ai/veo3.1"],"description":"A quality tier (fast, balanced, quality) or any fal.ai video endpoint id. Prefer a tier — it tracks the best current model for that price point. Required: video bills per second, so there is no default. `GET /v1/videos/models` maps tiers to ids with live pricing."},"input":{"type":"object","description":"Model-specific input, forwarded to fal verbatim. `prompt` is required.","properties":{"prompt":{"type":"string","description":"Text prompt describing the video to generate."},"duration":{"type":"integer","description":"Clip length in seconds (model-dependent, e.g. 5-10)."},"aspect_ratio":{"type":"string","description":"Aspect ratio, e.g. 16:9, 9:16, 1:1."},"image_url":{"type":"string","description":"Source image URL for image-to-video models."}},"required":["prompt"]}},"required":["model","input"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"url":{"type":"string"},"api_version":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"enabled_events":{"type":"array","items":{"type":"string"}},"secret":{"type":["string","null"]}},"required":["id","object","url","api_version","status","created_at","updated_at","enabled_events"]},"WebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"api_version":{"type":"string"},"enabled_events":{"type":"array","items":{"type":"string"}}}},"WebhookEndpointWithSecret":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"url":{"type":"string"},"api_version":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"enabled_events":{"type":"array","items":{"type":"string"}},"secret":{"type":["string","null"]}},"required":["id","object","url","api_version","status","created_at","updated_at","enabled_events","secret"]},"WebhookEvent":{"type":"object","properties":{"object":{"type":"string"},"id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object"},"api_version":{"type":"string"},"webhook_endpoint":{"type":"string"},"request":{"type":["object","null"],"description":"Delivery details (response_code, response_body, error_message, attempt_number, delivered_at); populated when expanded with `expand=request`."}},"required":["object","id","event_type","status","created_at","data","api_version","webhook_endpoint","request"]},"WebsiteEmbedDetailsRequest":{"type":"object","properties":{"url":{"type":"string","description":"Page to embed; must be live and allow framing"}}},"WrittenContentDetailsRequest":{"type":"object","properties":{"title":{"type":["string","null"]},"html_content":{"type":["string","null"]}}},"XMentions":{"type":"object","properties":{"object":{"type":"string"},"account_id":{"type":"string"},"handle":{"type":"string"},"mentions":{"type":"object"}},"required":["object","account_id","handle","mentions"]}},"responses":{"Unauthorized":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"type":"invalid_request_error","code":"authentication_required","message":"You did not provide an API key."}}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"type":"invalid_request_error","code":"resource_missing","message":"The requested resource was not found"}}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"UnprocessableEntity":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"type":"validation_error","code":"validation_failed","message":"Email is required","errors":{"email":["can't be blank"]}}}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"type":"invalid_request_error","code":"bad_request","message":"The request was malformed or contained invalid parameters"}}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"type":"invalid_request_error","code":"forbidden","message":"You do not have permission to perform this action"}}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"type":"api_error","code":"internal_error","message":"An unexpected error occurred"}}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"Conflict":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"BadGateway":{"description":"Upstream (provider) failure","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"ServiceUnavailable":{"description":"Feature not configured for this workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"},"Request-Id":{"$ref":"#/components/headers/RequestId"},"Deprecation":{"$ref":"#/components/headers/Deprecation"},"Sunset":{"$ref":"#/components/headers/Sunset"},"Link":{"$ref":"#/components/headers/DeprecationLink"}}},"EventStream":{"description":"SSE stream of the resource.","content":{"text/event-stream":{"schema":{"type":"string","description":"SSE stream. Events: `snapshot` (full object on connect), `update` (full object on each change), `done` (terminal state reached, stream closes), `close` (stream ended without a terminal state — reconnect to continue). `: keep-alive` comments are sent every 15s. State lives server-side, so reconnecting resumes losslessly with a fresh snapshot."}}}},"TooManyRequests":{"description":"Rate limit exceeded — 600 requests per minute per credential. Retry after the number of seconds in `Retry-After`.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimitPolicy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"type":"invalid_request_error","code":"rate_limit_exceeded","message":"Too many requests. Please retry later."}}}}}},"headers":{"RateLimit":{"description":"Remaining quota for the current window, as an IETF structured field: `\"default\";r=<remaining>;t=<seconds until reset>`.","schema":{"type":"string","examples":["\"default\";r=596;t=11"]}},"RateLimitPolicy":{"description":"The quota this credential is subject to: `\"default\";q=<requests>;w=<window seconds>`.","schema":{"type":"string","examples":["\"default\";q=600;w=60"]}},"RetryAfter":{"description":"Seconds to wait before retrying.","schema":{"type":"integer","examples":[11]}},"RequestId":{"description":"Unique id for this request. Quote it when reporting a problem.","schema":{"type":"string","examples":["8fe045fe-cb8a-4407-a44d-5df60385e522"]}},"Deprecation":{"description":"Present only on a deprecated operation. Structured-field date (RFC 9745) — `@` followed by the Unix timestamp at which the operation became deprecated.","schema":{"type":"string","examples":["@1775001600"]}},"Sunset":{"description":"Present only on a deprecated operation. HTTP-date (RFC 8594) after which the operation stops responding. Always at least six months after `Deprecation`.","schema":{"type":"string","examples":["Thu, 01 Oct 2026 00:00:00 GMT"]}},"DeprecationLink":{"description":"Present only on a deprecated operation. `<url>; rel=\"deprecation\"` pointing at the migration notes.","schema":{"type":"string","examples":["<https://crevio.co/docs/developer/guides/versioning>; rel=\"deprecation\""]}}}},"security":[{"ApiKey":[]}],"tags":[{"name":"Account","description":"Current account information"},{"name":"Bots","description":"Named bot identities (persona, skills, toolsets) chats and tasks can run as"},{"name":"Analytics","description":"Account-wide business analytics"},{"name":"BlogCategories","description":"Blog post categories"},{"name":"BlogPosts","description":"Blog content management"},{"name":"Broadcasts","description":"One-to-many email sending"},{"name":"CheckoutLinks","description":"Shareable checkout links"},{"name":"CheckoutConfiguration","description":"Account-wide checkout settings"},{"name":"Checkouts","description":"Checkout session management"},{"name":"Customers","description":"Customer relationship management"},{"name":"Discounts","description":"Discount code management"},{"name":"Experiences","description":"Digital experiences (courses, communities, downloads)"},{"name":"Files","description":"File uploads and external media management"},{"name":"FormSubmissions","description":"Form submission management"},{"name":"FormationDocuments","description":"Documents generated for a formation"},{"name":"Formations","description":"Whitelabel business formation via doola Partner API"},{"name":"Forms","description":"Hosted forms that capture leads and submissions"},{"name":"Invoices","description":"Invoice creation, payment, and lifecycle management"},{"name":"LegalPages","description":"Terms, privacy and refund pages for the storefront"},{"name":"Me","description":"Current user profile"},{"name":"OrderItems","description":"Order line items"},{"name":"Orders","description":"Order history and details"},{"name":"PriceVariants","description":"Product pricing tiers"},{"name":"Products","description":"Digital product catalog"},{"name":"Refunds","description":"Refund management"},{"name":"Reviews","description":"Product reviews"},{"name":"Socials","description":"Social media management (accounts, posts, media)."},{"name":"Subscriptions","description":"Subscription lifecycle management (cancel, pause, resume)"},{"name":"Tags","description":"Customer tags"},{"name":"TaskRuns","description":"Individual execution records for AI tasks."},{"name":"Tasks","description":"AI tasks — scheduled or event-triggered agentic work (cron, interval, once, immediate, event)."},{"name":"WebhookEndpoints","description":"Webhook endpoint management"},{"name":"WebhookEvents","description":"Webhook event delivery history"},{"name":"Leads","description":"Find, verify and enrich business leads (Hunter.io-backed)."},{"name":"Ads","description":"Paid advertising — campaigns, ad groups, ads, audiences, targeting, leads, conversions, and reports across Meta, Google, TikTok, LinkedIn, Pinterest, and X."},{"name":"Domains","description":"Custom web domains for your sites."},{"name":"Web","description":"Web search & scraping (search, read, map, crawl, extract, research), backed by Firecrawl."},{"name":"Skills","description":"AI skills marketplace — search the catalog and install or uninstall skills for your account's agent."},{"name":"Schedules","description":"Reusable availability schedules that back event types."},{"name":"EventTypes","x-displayName":"Event Types","description":"Bookable services customers can schedule time on."},{"name":"Bookings","description":"Reservations made against event types."},{"name":"Connections","description":"Third-party app connections (connect, list, execute)"},{"name":"Approvals","description":"Human-in-the-loop approvals for gated actions"},{"name":"Logs","description":"Account activity log"},{"name":"Access","description":"Per-user access checks for gated resources"},{"name":"ApiKeys","description":"API key management"},{"name":"Audio","description":"AI audio generation"},{"name":"Calls","description":"Outbound phone calls placed by the account's agent"},{"name":"Chapters","description":"Course chapters"},{"name":"Deployments","description":"Site deployments and build logs"},{"name":"Email","description":"Inboxes, threads, messages, drafts and delivery events"},{"name":"Email Suppressions","description":"Addresses no send path will deliver to"},{"name":"EventSessions","description":"Scheduled sessions of an event experience"},{"name":"EventSources","description":"Third-party event sources that trigger tasks"},{"name":"Events","description":"Events an account can subscribe to"},{"name":"ForumPosts","description":"Posts inside a forum experience"},{"name":"Images","description":"AI image generation, editing and stock search"},{"name":"Jobs","description":"Long-running asynchronous jobs"},{"name":"Lessons","description":"Lessons inside a course chapter"},{"name":"LinkItems","description":"Links inside a link-in-bio experience"},{"name":"Phone Consents","description":"Recorded consent to place calls to a number"},{"name":"Phone Numbers","description":"Phone numbers provisioned for the account"},{"name":"Phone Suppressions","description":"Do-not-call entries"},{"name":"Sites","description":"AI-built sites — storefronts and web apps"},{"name":"Status","description":"API and account status"},{"name":"Topics","description":"Discussion topics inside a forum experience"},{"name":"Plans","description":"The plans Crevio sells, their credit tiers, prices and limits."},{"name":"Usage","description":"Credit usage and transaction history"},{"name":"Users","description":"Users of the account"},{"name":"Video","description":"AI video generation"},{"name":"Secrets","description":"Account-level environment variables shared across the account's sites"},{"name":"Billing Portal","description":"Hosted billing pages for your customers"},{"name":"Data","description":"Included business data: search the tool catalog, then run a tool (website/SEO, people, companies, local businesses, social, e-commerce, finance, jobs, reviews, ads, real estate, news, apps, travel, weather, legal)."}],"servers":[{"url":"https://api.crevio.co/v1","description":"Production"}],"webhooks":{"x.mention.received":{"post":{"tags":["Socials"],"summary":"X mention received","description":"Triggered when people mention your connected X account (checked every few minutes)","operationId":"webhookXMentionReceived","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["x.mention.received"],"description":"The event type","example":"x.mention.received"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/XMentions"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"lead.created":{"post":{"tags":["Customers"],"summary":"Lead created","description":"Triggered when a new lead is captured","operationId":"webhookLeadCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["lead.created"],"description":"The event type","example":"lead.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Customer"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"form_submission.created":{"post":{"tags":["FormSubmissions"],"summary":"Form submission created","description":"Triggered when a form submission is received","operationId":"webhookFormSubmissionCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["form_submission.created"],"description":"The event type","example":"form_submission.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/FormSubmission"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"form_submission.confirmed":{"post":{"tags":["FormSubmissions"],"summary":"Form submission confirmed","description":"Triggered when a pending form submission is confirmed via double opt-in","operationId":"webhookFormSubmissionConfirmed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["form_submission.confirmed"],"description":"The event type","example":"form_submission.confirmed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/FormSubmission"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"customer.confirmed":{"post":{"tags":["Customers"],"summary":"Customer confirmed","description":"Triggered when a customer confirms their email via double opt-in","operationId":"webhookCustomerConfirmed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["customer.confirmed"],"description":"The event type","example":"customer.confirmed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Customer"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"customer.tag_added":{"post":{"tags":["Customers"],"summary":"Customer tag added","description":"Triggered when a tag is added to a customer","operationId":"webhookCustomerTagAdded","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["customer.tag_added"],"description":"The event type","example":"customer.tag_added"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Customer"},"tag":{"$ref":"#/components/schemas/Tag"}},"required":["object","tag"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"customer.tag_removed":{"post":{"tags":["Customers"],"summary":"Customer tag removed","description":"Triggered when a tag is removed from a customer","operationId":"webhookCustomerTagRemoved","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["customer.tag_removed"],"description":"The event type","example":"customer.tag_removed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Customer"},"tag":{"$ref":"#/components/schemas/Tag"}},"required":["object","tag"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"checkout.created":{"post":{"tags":["Checkouts"],"summary":"Checkout created","description":"Triggered when a new checkout is created","operationId":"webhookCheckoutCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["checkout.created"],"description":"The event type","example":"checkout.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` expanded.","properties":{"object":{"$ref":"#/components/schemas/Checkout"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"order.created":{"post":{"tags":["Orders"],"summary":"Order created","description":"Triggered when a new order is created","operationId":"webhookOrderCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["order.created"],"description":"The event type","example":"order.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Order"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"order.paid":{"post":{"tags":["Orders"],"summary":"Order paid","description":"Triggered when an order is paid","operationId":"webhookOrderPaid","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["order.paid"],"description":"The event type","example":"order.paid"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Order"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"subscription.created":{"post":{"tags":["Subscriptions"],"summary":"Subscription created","description":"Triggered when a customer completes checkout for a subscription","operationId":"webhookSubscriptionCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["subscription.created"],"description":"The event type","example":"subscription.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `order.line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Subscription"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"subscription.renewed":{"post":{"tags":["Subscriptions"],"summary":"Subscription renewed","description":"Triggered when a subscription's recurring payment succeeds","operationId":"webhookSubscriptionRenewed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["subscription.renewed"],"description":"The event type","example":"subscription.renewed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `order.line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Subscription"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"subscription.canceled":{"post":{"tags":["Subscriptions"],"summary":"Subscription canceled","description":"Triggered when a subscription is set to end at the close of its current period","operationId":"webhookSubscriptionCanceled","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["subscription.canceled"],"description":"The event type","example":"subscription.canceled"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `order.line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Subscription"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"subscription.paused":{"post":{"tags":["Subscriptions"],"summary":"Subscription paused","description":"Triggered when a subscription's payment collection is paused","operationId":"webhookSubscriptionPaused","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["subscription.paused"],"description":"The event type","example":"subscription.paused"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `order.line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Subscription"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"subscription.resumed":{"post":{"tags":["Subscriptions"],"summary":"Subscription resumed","description":"Triggered when a paused or canceled subscription is resumed","operationId":"webhookSubscriptionResumed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["subscription.resumed"],"description":"The event type","example":"subscription.resumed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `order.line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Subscription"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"subscription.past_due":{"post":{"tags":["Subscriptions"],"summary":"Subscription past due","description":"Triggered when a subscription's renewal payment fails and Stripe starts retrying","operationId":"webhookSubscriptionPastDue","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["subscription.past_due"],"description":"The event type","example":"subscription.past_due"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `order.line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Subscription"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"subscription.ended":{"post":{"tags":["Subscriptions"],"summary":"Subscription ended","description":"Triggered when a subscription has ended and access is revoked","operationId":"webhookSubscriptionEnded","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["subscription.ended"],"description":"The event type","example":"subscription.ended"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `order.line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Subscription"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"refund.created":{"post":{"tags":["Refunds"],"summary":"Refund created","description":"Triggered when a refund is issued for an order","operationId":"webhookRefundCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["refund.created"],"description":"The event type","example":"refund.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Order"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"refund.updated":{"post":{"tags":["Refunds"],"summary":"Refund updated","description":"Triggered when a refund status is updated","operationId":"webhookRefundUpdated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["refund.updated"],"description":"The event type","example":"refund.updated"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` and `line_items` expanded.","properties":{"object":{"$ref":"#/components/schemas/Order"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"invoice.created":{"post":{"tags":["Invoices"],"summary":"Invoice created","description":"Triggered when an invoice is created","operationId":"webhookInvoiceCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["invoice.created"],"description":"The event type","example":"invoice.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` expanded.","properties":{"object":{"$ref":"#/components/schemas/Invoice"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"invoice.paid":{"post":{"tags":["Invoices"],"summary":"Invoice paid","description":"Triggered when an invoice is paid","operationId":"webhookInvoicePaid","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["invoice.paid"],"description":"The event type","example":"invoice.paid"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` expanded.","properties":{"object":{"$ref":"#/components/schemas/Invoice"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"invoice.past_due":{"post":{"tags":["Invoices"],"summary":"Invoice past due","description":"Triggered when an invoice is past due","operationId":"webhookInvoicePastDue","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["invoice.past_due"],"description":"The event type","example":"invoice.past_due"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` expanded.","properties":{"object":{"$ref":"#/components/schemas/Invoice"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"invoice.voided":{"post":{"tags":["Invoices"],"summary":"Invoice voided","description":"Triggered when an invoice is voided","operationId":"webhookInvoiceVoided","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["invoice.voided"],"description":"The event type","example":"invoice.voided"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it, with `customer` expanded.","properties":{"object":{"$ref":"#/components/schemas/Invoice"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"product.created":{"post":{"tags":["Products"],"summary":"Product created","description":"Triggered when a new product is created","operationId":"webhookProductCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["product.created"],"description":"The event type","example":"product.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Product"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"product.updated":{"post":{"tags":["Products"],"summary":"Product updated","description":"Triggered when a product is updated","operationId":"webhookProductUpdated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["product.updated"],"description":"The event type","example":"product.updated"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Product"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"booking.created":{"post":{"tags":["Bookings"],"summary":"Booking created","description":"Triggered when a new booking is created","operationId":"webhookBookingCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["booking.created"],"description":"The event type","example":"booking.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"booking.cancelled":{"post":{"tags":["Bookings"],"summary":"Booking cancelled","description":"Triggered when a booking is cancelled","operationId":"webhookBookingCancelled","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["booking.cancelled"],"description":"The event type","example":"booking.cancelled"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"booking.rescheduled":{"post":{"tags":["Bookings"],"summary":"Booking rescheduled","description":"Triggered when a booking is rescheduled to a new time","operationId":"webhookBookingRescheduled","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["booking.rescheduled"],"description":"The event type","example":"booking.rescheduled"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Booking"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"task.created":{"post":{"tags":["Tasks"],"summary":"Task created","description":"Triggered when a new task is created","operationId":"webhookTaskCreated","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["task.created"],"description":"The event type","example":"task.created"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/AiTask"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"task_run.completed":{"post":{"tags":["TaskRuns"],"summary":"Task run completed","description":"Triggered when a task run finishes successfully","operationId":"webhookTaskRunCompleted","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["task_run.completed"],"description":"The event type","example":"task_run.completed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/AiTaskRun"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"task_run.failed":{"post":{"tags":["TaskRuns"],"summary":"Task run failed","description":"Triggered when a task run fails","operationId":"webhookTaskRunFailed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["task_run.failed"],"description":"The event type","example":"task_run.failed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/AiTaskRun"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"task_run.needs_input":{"post":{"tags":["TaskRuns"],"summary":"Task run needs input","description":"Triggered when a supervised task run is awaiting user input","operationId":"webhookTaskRunNeedsInput","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["task_run.needs_input"],"description":"The event type","example":"task_run.needs_input"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/AiTaskRun"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"deployment.succeeded":{"post":{"tags":["Deployments"],"summary":"Deployment succeeded","description":"Triggered when a site deploy builds, ships and passes its smoke check","operationId":"webhookDeploymentSucceeded","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["deployment.succeeded"],"description":"The event type","example":"deployment.succeeded"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Deployment"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"deployment.failed":{"post":{"tags":["Deployments"],"summary":"Deployment failed","description":"Triggered when a site deploy fails to build, ship or come up","operationId":"webhookDeploymentFailed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["deployment.failed"],"description":"The event type","example":"deployment.failed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Deployment"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"job.completed":{"post":{"tags":["Jobs"],"summary":"Job completed","description":"Triggered when a generation job completes successfully","operationId":"webhookJobCompleted","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["job.completed"],"description":"The event type","example":"job.completed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/ProviderJob"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"job.failed":{"post":{"tags":["Jobs"],"summary":"Job failed","description":"Triggered when a generation job fails","operationId":"webhookJobFailed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["job.failed"],"description":"The event type","example":"job.failed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/ProviderJob"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"email_message.received":{"post":{"tags":["Email"],"summary":"Email message received","description":"Triggered when an inbound email is received in an inbox","operationId":"webhookEmailMessageReceived","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["email_message.received"],"description":"The event type","example":"email_message.received"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/EmailMessage"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"email_message.sent":{"post":{"tags":["Email"],"summary":"Email message sent","description":"Triggered when an outbound email is sent from an inbox","operationId":"webhookEmailMessageSent","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["email_message.sent"],"description":"The event type","example":"email_message.sent"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/EmailMessage"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"email_message.delivered":{"post":{"tags":["Email"],"summary":"Email message delivered","description":"Triggered when an outbound email is delivered to the recipient's mail server","operationId":"webhookEmailMessageDelivered","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["email_message.delivered"],"description":"The event type","example":"email_message.delivered"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/EmailMessage"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"email_message.bounced":{"post":{"tags":["Email"],"summary":"Email message bounced","description":"Triggered when an outbound email hard-bounces (recipient is added to the suppression list)","operationId":"webhookEmailMessageBounced","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["email_message.bounced"],"description":"The event type","example":"email_message.bounced"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/EmailMessage"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"email_message.complained":{"post":{"tags":["Email"],"summary":"Email message complained","description":"Triggered when a recipient marks an outbound email as spam (recipient is added to the suppression list)","operationId":"webhookEmailMessageComplained","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["email_message.complained"],"description":"The event type","example":"email_message.complained"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/EmailMessage"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"email_message.failed":{"post":{"tags":["Email"],"summary":"Email message failed","description":"Triggered when an outbound email fails to send","operationId":"webhookEmailMessageFailed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["email_message.failed"],"description":"The event type","example":"email_message.failed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/EmailMessage"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"broadcast.sent":{"post":{"tags":["Broadcasts"],"summary":"Broadcast sent","description":"Triggered when every recipient of a broadcast has been handed to the email provider","operationId":"webhookBroadcastSent","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["broadcast.sent"],"description":"The event type","example":"broadcast.sent"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Broadcast"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"broadcast.canceled":{"post":{"tags":["Broadcasts"],"summary":"Broadcast canceled","description":"Triggered when a scheduled or in-flight broadcast is canceled","operationId":"webhookBroadcastCanceled","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["broadcast.canceled"],"description":"The event type","example":"broadcast.canceled"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Broadcast"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}},"broadcast.failed":{"post":{"tags":["Broadcasts"],"summary":"Broadcast failed","description":"Triggered when a broadcast fails to send to any recipient","operationId":"webhookBroadcastFailed","security":[],"parameters":[{"name":"webhook-id","in":"header","required":true,"description":"The event's id, identical on every retry and equal to `id` in the body. Store it to ignore a delivery you have already handled.","schema":{"type":"string"}},{"name":"webhook-timestamp","in":"header","required":true,"description":"Unix seconds when this attempt was sent. Reject anything older than five minutes.","schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"description":"`v1,<signature>`, per the Standard Webhooks specification: the base64 HMAC-SHA256 of `<webhook-id>.<webhook-timestamp>.<raw request body>`, keyed with the bytes your `whsec_` secret encodes. Verify it with a Standard Webhooks library before processing the event.","schema":{"type":"string"}}],"requestBody":{"description":"Event payload Crevio POSTs to your endpoint.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for this webhook event","example":"whev_abc123"},"object":{"type":"string","enum":["event"],"example":"event"},"type":{"type":"string","enum":["broadcast.failed"],"description":"The event type","example":"broadcast.failed"},"created_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp of when the event was created","example":"2025-01-15T10:30:00Z"},"api_version":{"type":"string","description":"API version used to generate the payload","example":"v1"},"data":{"type":"object","description":"`object` is the resource exactly as its API endpoint returns it.","properties":{"object":{"$ref":"#/components/schemas/Broadcast"}},"required":["object"]}},"required":["id","object","type","created_at","api_version","data"]}}}},"responses":{"200":{"description":"Return any 2xx status within 5 seconds to acknowledge receipt."}}}}},"externalDocs":{"description":"Crevio developer documentation","url":"https://crevio.co/docs/developer"}}