{"openapi":"3.1.0","info":{"title":"iUtils Social API","version":"2026-09-13","description":"Everything the iUtils Social application can do, for programs. Authenticate with a bearer token from Settings \u2192 API access; each token carries scopes and acts as the person who minted it, with their brand roles.","contact":{"url":"https:\/\/social.iutils.net\/developers"}},"servers":[{"url":"https:\/\/social.iutils.net\/api\/v1"}],"tags":[{"name":"Approvals"},{"name":"Brands"},{"name":"Ads"},{"name":"Analytics"},{"name":"Campaigns"},{"name":"Inbox"},{"name":"Media"},{"name":"Reports"},{"name":"Scheduled posts"},{"name":"SmartLinks"},{"name":"Team"},{"name":"Meta"},{"name":"Webhooks"}],"paths":{"\/api\/v1\/approvals":{"get":{"operationId":"approvals_index","tags":["Approvals"],"summary":"List posts awaiting review","description":"Across every brand the token holder holds `review_posts` on; `brand_id` narrows to one.\n\nRequires scope `approvals:read`.","security":[{"bearerToken":[]}],"x-scope":"approvals:read","parameters":[{"name":"brand_id","in":"query","schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ScheduledPost"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/approvals\/{network}\/{post}\/approve":{"post":{"operationId":"approvals_approve","tags":["Approvals"],"summary":"Approve a post","description":"Requires scope `approvals:write`.","security":[{"bearerToken":[]}],"x-scope":"approvals:write","parameters":[{"name":"network","in":"path","required":true,"schema":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"post","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ApprovalNote"}}}},"responses":{"200":{"description":"The approved post.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ScheduledPost"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"`approval_already_decided` or `post_window_missed`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/approvals\/{network}\/{post}\/reject":{"post":{"operationId":"approvals_reject","tags":["Approvals"],"summary":"Reject a post","description":"Requires scope `approvals:write`.","security":[{"bearerToken":[]}],"x-scope":"approvals:write","parameters":[{"name":"network","in":"path","required":true,"schema":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"post","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ApprovalNote"}}}},"responses":{"200":{"description":"The rejected post.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ScheduledPost"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"`approval_already_decided`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/approvals\/{network}\/{post}\/request-changes":{"post":{"operationId":"approvals_request_changes","tags":["Approvals"],"summary":"Request changes on a post","description":"A note is required; it is shown to the author.\n\nRequires scope `approvals:write`.","security":[{"bearerToken":[]}],"x-scope":"approvals:write","parameters":[{"name":"network","in":"path","required":true,"schema":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"post","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ApprovalNote"}}}},"responses":{"200":{"description":"The post, now awaiting changes.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ScheduledPost"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"`approval_already_decided`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands":{"get":{"operationId":"brands_index","tags":["Brands"],"summary":"List brands","description":"Every brand the token holder is a member of, across the workspaces they belong to.\n\nRequires scope `brands:read`.","security":[{"bearerToken":[]}],"x-scope":"brands:read","parameters":[{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Brand"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"post":{"operationId":"brands_store","tags":["Brands"],"summary":"Create a brand","description":"Creates a brand in the token's workspace and makes the token holder its Manager. Refused with `brand_limit_reached` when the plan's brand allowance is used up.\n\nRequires scope `brands:write`.","security":[{"bearerToken":[]}],"x-scope":"brands:write","parameters":[{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BrandInput"}}}},"responses":{"201":{"description":"The new brand.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Brand"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Validation failed, or `brand_limit_reached`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}":{"get":{"operationId":"brands_show","tags":["Brands"],"summary":"Get a brand","description":"Requires scope `brands:read`.","security":[{"bearerToken":[]}],"x-scope":"brands:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The brand.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Brand"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"patch":{"operationId":"brands_update","tags":["Brands"],"summary":"Update a brand","description":"Needs `brand_manage` on the brand.\n\nRequires scope `brands:write`.","security":[{"bearerToken":[]}],"x-scope":"brands:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/BrandUpdate"}}}},"responses":{"200":{"description":"The updated brand.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Brand"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/ads\/accounts":{"get":{"operationId":"brands_ads_accounts","tags":["Ads"],"summary":"Bound ad accounts","description":"One entry per network with a bound account, with its sync state.\n\nRequires scope `ads:read`.","security":[{"bearerToken":[]}],"x-scope":"ads:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Bound accounts.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/AdAccount"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/ads\/campaigns":{"get":{"operationId":"brands_ads_campaigns","tags":["Ads"],"summary":"Campaigns on one network","description":"Fetched live from the network and cached for five minutes. `network` is required.\n\nRequires scope `ads:read`.","security":[{"bearerToken":[]}],"x-scope":"ads:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"network","in":"query","required":true,"schema":{"type":"string","enum":["meta","google","linkedin"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Campaigns.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/AdCampaign"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"`ad_account_not_bound`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"502":{"description":"`provider_rejected`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/ads\/daily":{"get":{"operationId":"brands_ads_daily","tags":["Ads"],"summary":"Daily paid metrics","description":"Persisted account-level rows from the nightly sync, with per-network totals in `meta.totals`.\n\nRequires scope `ads:read`.","security":[{"bearerToken":[]}],"x-scope":"ads:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"network","in":"query","schema":{"type":"string","enum":["meta","google","linkedin"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Daily rows.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/AdDailyMetric"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/analytics":{"get":{"operationId":"brands_analytics","tags":["Analytics"],"summary":"Analytics summary","description":"The same report the analytics page and PDF export build. Needs `analytics_view`; the read-only Client role gets 403.\n\nRequires scope `analytics:read`.","security":[{"bearerToken":[]}],"x-scope":"analytics:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":366,"default":30}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"The report.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/AnalyticsReport"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/analytics\/daily":{"get":{"operationId":"brands_analytics_daily","tags":["Analytics"],"summary":"Daily series per network","description":"One account-level metric (`impressions` by default; also `followers`, `views`, `page_views`, `website_clicks`, \u2026) as a daily series for each network.\n\nRequires scope `analytics:read`.","security":[{"bearerToken":[]}],"x-scope":"analytics:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"metric","in":"query","schema":{"type":"string","default":"impressions"}},{"name":"surface","in":"query","schema":{"type":"string","enum":["facebook","instagram","linkedin","twitter","youtube","google_business","tiktok","pinterest","threads","bluesky"]}},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":366,"default":30}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"One series per surface.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/DailySeries"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/analytics\/posts":{"get":{"operationId":"brands_analytics_posts","tags":["Analytics"],"summary":"Post performance table","description":"Requires scope `analytics:read`.","security":[{"bearerToken":[]}],"x-scope":"analytics:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"surface","in":"query","schema":{"type":"string","enum":["facebook","instagram","linkedin","twitter","youtube","google_business","tiktok","pinterest","threads","bluesky"]}},{"name":"sort","in":"query","schema":{"type":"string","enum":["impressions","interactions","reach","published_at"],"default":"impressions"}},{"name":"direction","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":366,"default":30}},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/AnalyticsPost"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/campaigns":{"get":{"operationId":"brands_campaigns_index","tags":["Campaigns"],"summary":"List content campaigns","description":"Requires scope `campaigns:read`.","security":[{"bearerToken":[]}],"x-scope":"campaigns:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Campaign"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/campaigns\/{campaign}":{"get":{"operationId":"brands_campaigns_show","tags":["Campaigns"],"summary":"Get a content campaign","description":"Requires scope `campaigns:read`.","security":[{"bearerToken":[]}],"x-scope":"campaigns:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"campaign","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The campaign.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Campaign"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"patch":{"operationId":"brands_campaigns_update","tags":["Campaigns"],"summary":"Update a content campaign","description":"Name, description, start and end date; a field left out keeps its value, and `null` clears a date or the description. `ends_at` may not fall before `starts_at`. Needs `planner_edit` on the brand.\n\nRequires scope `campaigns:write`.","security":[{"bearerToken":[]}],"x-scope":"campaigns:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"campaign","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/CampaignUpdate"}}}},"responses":{"200":{"description":"The updated campaign.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Campaign"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Validation failed.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/inbox\/threads":{"get":{"operationId":"brands_inbox_threads_index","tags":["Inbox"],"summary":"List inbox threads","description":"Unresolved threads by default, newest activity first. Needs `inbox_view`.\n\nRequires scope `inbox:read`.","security":[{"bearerToken":[]}],"x-scope":"inbox:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"platform","in":"query","schema":{"type":"string","enum":["linkedin","facebook","instagram","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"type","in":"query","schema":{"type":"string","enum":["private_message","comment","mention","review","question"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["unresolved","resolved","unread","all"]}},{"name":"assigned_user_id","in":"query","schema":{"type":"integer"}},{"name":"unassigned","in":"query","schema":{"type":"boolean"}},{"name":"search","in":"query","schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/InboxThread"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/inbox\/threads\/{thread}":{"get":{"operationId":"brands_inbox_threads_show","tags":["Inbox"],"summary":"Get a thread with its messages","description":"Requires scope `inbox:read`.","security":[{"bearerToken":[]}],"x-scope":"inbox:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"thread","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The thread, with up to 200 messages.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/InboxThread"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/inbox\/threads\/{thread}\/assign":{"post":{"operationId":"brands_inbox_threads_assign","tags":["Inbox"],"summary":"Assign a thread","description":"`user_id` must be a member of the workspace; `null` unassigns.\n\nRequires scope `inbox:write`.","security":[{"bearerToken":[]}],"x-scope":"inbox:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"thread","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InboxAssign"}}}},"responses":{"200":{"description":"The thread with its new assignee.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/InboxThread"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/inbox\/threads\/{thread}\/reply":{"post":{"operationId":"brands_inbox_threads_reply","tags":["Inbox"],"summary":"Reply to a thread","description":"Sends the reply through the network the thread came from. Needs `inbox_edit`.\n\nRequires scope `inbox:write`.","security":[{"bearerToken":[]}],"x-scope":"inbox:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"thread","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/InboxReply"}}}},"responses":{"201":{"description":"The thread after the reply.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/InboxThread"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`reply_unsupported` or `reply_failed`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"502":{"description":"`provider_rejected`: the network refused the reply.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/inbox\/threads\/{thread}\/resolve":{"post":{"operationId":"brands_inbox_threads_resolve","tags":["Inbox"],"summary":"Resolve a thread","description":"Requires scope `inbox:write`.","security":[{"bearerToken":[]}],"x-scope":"inbox:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"thread","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"responses":{"200":{"description":"The resolved thread.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/InboxThread"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/inbox\/threads\/{thread}\/unresolve":{"post":{"operationId":"brands_inbox_threads_unresolve","tags":["Inbox"],"summary":"Reopen a thread","description":"Requires scope `inbox:write`.","security":[{"bearerToken":[]}],"x-scope":"inbox:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"thread","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"responses":{"200":{"description":"The reopened thread.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/InboxThread"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/media":{"get":{"operationId":"brands_media_index","tags":["Media"],"summary":"List media assets","description":"Requires scope `media:read`.","security":[{"bearerToken":[]}],"x-scope":"media:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"kind","in":"query","schema":{"type":"string","enum":["image","video"]}},{"name":"search","in":"query","schema":{"type":"string"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/MediaAsset"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"post":{"operationId":"brands_media_store","tags":["Media"],"summary":"Upload a media asset","description":"Multipart. jpeg, png, webp, gif, mp4 or mov; 50 MB at most. Needs `planner_edit`.\n\nRequires scope `media:write`.","security":[{"bearerToken":[]}],"x-scope":"media:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"$ref":"#\/components\/schemas\/MediaUpload"}}}},"responses":{"201":{"description":"The stored asset.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/MediaAsset"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/media\/{asset}":{"get":{"operationId":"brands_media_show","tags":["Media"],"summary":"Get a media asset","description":"Requires scope `media:read`.","security":[{"bearerToken":[]}],"x-scope":"media:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"asset","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The asset.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/MediaAsset"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/reports\/share-links":{"get":{"operationId":"brands_reports_share_links_index","tags":["Reports"],"summary":"List report share links","description":"Requires scope `reports:read`.","security":[{"bearerToken":[]}],"x-scope":"reports:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"include_revoked","in":"query","schema":{"type":"boolean"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ShareLink"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"post":{"operationId":"brands_reports_share_links_store","tags":["Reports"],"summary":"Create a report share link","description":"The public URL is returned once, on this response. Needs `analytics_view`.\n\nRequires scope `reports:write`.","security":[{"bearerToken":[]}],"x-scope":"reports:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":false,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ShareLinkInput"}}}},"responses":{"201":{"description":"The link, with its one-time `url`.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ShareLink"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/reports\/share-links\/{shareLink}\/revoke":{"post":{"operationId":"brands_reports_share_links_revoke","tags":["Reports"],"summary":"Revoke a report share link","description":"Requires scope `reports:write`.","security":[{"bearerToken":[]}],"x-scope":"reports:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"shareLink","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"responses":{"200":{"description":"The revoked link.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ShareLink"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/scheduled-posts":{"get":{"operationId":"brands_scheduled_posts_index","tags":["Scheduled posts"],"summary":"List scheduled posts","description":"Upcoming posts by default. Pass `status`, `from` or `to` to look elsewhere. Needs `planner_view`.\n\nRequires scope `posts:read`.","security":[{"bearerToken":[]}],"x-scope":"posts:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"network","in":"query","schema":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","processing","sent","failed","cancelled","draft","manual"]}},{"name":"approval_status","in":"query","schema":{"type":"string","enum":["draft","pending_approval","approved","rejected","changes_requested"]}},{"name":"from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","schema":{"type":"string","format":"date-time"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/ScheduledPost"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"post":{"operationId":"brands_scheduled_posts_store","tags":["Scheduled posts"],"summary":"Schedule a post","description":"Runs the composer pipeline: one scheduled post per network, each validated by its network. Needs `schedule_and_publish`. A 422 with `scheduled_count: 0` carries the per-network reasons in `errors`.\n\nRequires scope `posts:write`.","security":[{"bearerToken":[]}],"x-scope":"posts:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ScheduledPostInput"}}}},"responses":{"201":{"description":"At least one network accepted the post.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ScheduleResult"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Validation failed, or every network refused (see `data.errors`).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/scheduled-posts\/{network}\/{post}":{"delete":{"operationId":"brands_scheduled_posts_destroy","tags":["Scheduled posts"],"summary":"Cancel a scheduled post","description":"Deletes a post that has not published; subscribers receive `post.cancelled`.\n\nRequires scope `posts:write`.","security":[{"bearerToken":[]}],"x-scope":"posts:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"network","in":"path","required":true,"schema":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"post","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Cancelled.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"`post_not_cancellable`: the post is publishing or live.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"get":{"operationId":"brands_scheduled_posts_show","tags":["Scheduled posts"],"summary":"Get a scheduled post","description":"Requires scope `posts:read`.","security":[{"bearerToken":[]}],"x-scope":"posts:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"network","in":"path","required":true,"schema":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"post","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The post.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ScheduledPost"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"patch":{"operationId":"brands_scheduled_posts_update","tags":["Scheduled posts"],"summary":"Edit a scheduled post","description":"Body and\/or time, on a post that has not published. A post that was sent back for changes is re-approved by the edit.\n\nRequires scope `posts:write`.","security":[{"bearerToken":[]}],"x-scope":"posts:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"network","in":"path","required":true,"schema":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"post","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ScheduledPostUpdate"}}}},"responses":{"200":{"description":"The updated post.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ScheduledPost"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"`post_not_editable` or `post_window_missed`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/scheduled-posts\/{network}\/{post}\/publish":{"post":{"operationId":"brands_scheduled_posts_publish","tags":["Scheduled posts"],"summary":"Publish a scheduled post now","description":"Moves an approved pending, draft or failed post to now and hands it to the publisher.\n\nRequires scope `posts:write`.","security":[{"bearerToken":[]}],"x-scope":"posts:write","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"network","in":"path","required":true,"schema":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]}},{"name":"post","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"responses":{"202":{"description":"Queued for publishing.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ScheduledPost"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"`post_not_publishable` or `post_awaiting_approval`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/smartlinks":{"get":{"operationId":"brands_smartlinks_index","tags":["SmartLinks"],"summary":"List SmartLinks","description":"Requires scope `smartlinks:read`.","security":[{"bearerToken":[]}],"x-scope":"smartlinks:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/SmartLink"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/smartlinks\/{smartLink}":{"get":{"operationId":"brands_smartlinks_show","tags":["SmartLinks"],"summary":"Get a SmartLink","description":"Requires scope `smartlinks:read`.","security":[{"bearerToken":[]}],"x-scope":"smartlinks:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"smartLink","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The SmartLink.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/SmartLink"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/smartlinks\/{smartLink}\/stats":{"get":{"operationId":"brands_smartlinks_stats","tags":["SmartLinks"],"summary":"SmartLink statistics","description":"Requires scope `smartlinks:read`.","security":[{"bearerToken":[]}],"x-scope":"smartlinks:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"name":"smartLink","in":"path","required":true,"schema":{"type":"integer"}},{"name":"days","in":"query","schema":{"type":"integer","enum":[7,30,90],"default":30}}],"responses":{"200":{"description":"Totals, daily series, destinations, referrers, devices and countries.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/SmartLinkStats"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/brands\/{brand}\/team":{"get":{"operationId":"brands_team_index","tags":["Team"],"summary":"Brand roster","description":"Who is on the brand and with which role. Needs `brand_manage` on the brand or an owner\/admin seat in the workspace.\n\nRequires scope `team:read`.","security":[{"bearerToken":[]}],"x-scope":"team:read","parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/TeamMember"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/openapi.json":{"get":{"operationId":"openapi","tags":["Meta"],"summary":"This document","description":"The OpenAPI 3.1 description of the API. Public; no token needed.","responses":{"200":{"description":"The OpenAPI document.","content":{"application\/json":{"schema":{"type":"object"}}}}}}},"\/api\/v1\/webhooks":{"get":{"operationId":"webhooks_index","tags":["Webhooks"],"summary":"List webhook subscriptions","description":"Workspace owners and admins only.\n\nRequires scope `webhooks:manage`.","security":[{"bearerToken":[]}],"x-scope":"webhooks:manage","parameters":[{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/WebhookSubscription"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"post":{"operationId":"webhooks_store","tags":["Webhooks"],"summary":"Create a webhook subscription","description":"The signing secret is returned once. HTTPS, public hosts only. Capped per workspace.\n\nRequires scope `webhooks:manage`.","security":[{"bearerToken":[]}],"x-scope":"webhooks:manage","parameters":[{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/WebhookSubscriptionInput"}}}},"responses":{"201":{"description":"The subscription with its one-time `secret`.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WebhookSubscription"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Validation failed, or `webhook_limit_reached`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/webhooks\/{subscription}":{"delete":{"operationId":"webhooks_destroy","tags":["Webhooks"],"summary":"Delete a webhook subscription","description":"Requires scope `webhooks:manage`.","security":[{"bearerToken":[]}],"x-scope":"webhooks:manage","parameters":[{"name":"subscription","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Deleted"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"get":{"operationId":"webhooks_show","tags":["Webhooks"],"summary":"Get a webhook subscription","description":"Requires scope `webhooks:manage`.","security":[{"bearerToken":[]}],"x-scope":"webhooks:manage","parameters":[{"name":"subscription","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The subscription.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WebhookSubscription"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}},"patch":{"operationId":"webhooks_update","tags":["Webhooks"],"summary":"Update a webhook subscription","description":"Setting `active: true` on a disabled subscription re-enables it and resets its failure count.\n\nRequires scope `webhooks:manage`.","security":[{"bearerToken":[]}],"x-scope":"webhooks:manage","parameters":[{"name":"subscription","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/WebhookSubscriptionUpdate"}}}},"responses":{"200":{"description":"The updated subscription.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WebhookSubscription"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/webhooks\/{subscription}\/deliveries":{"get":{"operationId":"webhooks_deliveries_index","tags":["Webhooks"],"summary":"List deliveries","description":"The ledger, newest first.\n\nRequires scope `webhooks:manage`.","security":[{"bearerToken":[]}],"x-scope":"webhooks:manage","parameters":[{"name":"subscription","in":"path","required":true,"schema":{"type":"integer"}},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","retrying","succeeded","failed","blocked","skipped"]}},{"name":"event","in":"query","schema":{"type":"string","enum":["post.published","post.failed","post.scheduled","post.cancelled","approval.requested","approval.approved","approval.rejected","approval.changes_requested","inbox.thread.created","inbox.thread.assigned","brand.created","connection.needs_reconnect"]}},{"$ref":"#\/components\/parameters\/per_page"},{"$ref":"#\/components\/parameters\/cursor"}],"responses":{"200":{"description":"A page of results.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/WebhookDelivery"}},"meta":{"$ref":"#\/components\/schemas\/PageMeta"}},"required":["data","meta"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/webhooks\/{subscription}\/deliveries\/{delivery}":{"get":{"operationId":"webhooks_deliveries_show","tags":["Webhooks"],"summary":"Get a delivery","description":"Requires scope `webhooks:manage`.","security":[{"bearerToken":[]}],"x-scope":"webhooks:manage","parameters":[{"name":"subscription","in":"path","required":true,"schema":{"type":"integer"}},{"name":"delivery","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The delivery with its payload.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WebhookDelivery"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/webhooks\/{subscription}\/deliveries\/{delivery}\/redeliver":{"post":{"operationId":"webhooks_deliveries_redeliver","tags":["Webhooks"],"summary":"Redeliver","description":"Sends the same payload again as a new delivery that points back at the original.\n\nRequires scope `webhooks:manage`.","security":[{"bearerToken":[]}],"x-scope":"webhooks:manage","parameters":[{"name":"subscription","in":"path","required":true,"schema":{"type":"integer"}},{"name":"delivery","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#\/components\/parameters\/idempotencyKey"}],"responses":{"202":{"description":"The new delivery.","content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/WebhookDelivery"}},"required":["data"]}}}},"401":{"description":"`unauthenticated`: no token, or a revoked or expired one.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"`forbidden` (your brand role lacks the permission), `insufficient_scope` (the token was not minted with the scope), or `api_access_not_entitled` (the workspace's plan no longer includes API access).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"`not_found`: no such resource, or one you are not a member of.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"`subscription_inactive`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"`validation_failed`; `details.fields` names each offending field.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"`rate_limited`; retry after the seconds in `Retry-After`.","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}}},"components":{"securitySchemes":{"bearerToken":{"type":"http","scheme":"bearer","description":"A token from Settings \u2192 API access."}},"parameters":{"cursor":{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Opaque; take it from `meta.next` rather than constructing it."},"per_page":{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"idempotencyKey":{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":128},"description":"Any unique string. A retry with the same key returns the stored response instead of running again."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable, machine-readable. Branch on this, not on `message`."},"message":{"type":"string"},"details":{"type":"object","description":"Present on some errors; `fields` on validation failures."}}}}},"PageMeta":{"type":"object","required":["per_page","next"],"properties":{"per_page":{"type":"integer"},"next":{"type":["string","null"],"format":"uri","description":"Follow to get the next page; null on the last one."}}},"Deleted":{"type":"object","properties":{"deleted":{"type":"boolean"}}},"Brand":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"notes":{"type":["string","null"]},"agency_id":{"type":"integer"},"connected_networks":{"type":"array","items":{"type":"string"}},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"BrandInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":120},"notes":{"type":["string","null"],"maxLength":2000}}},"BrandUpdate":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"notes":{"type":["string","null"],"maxLength":2000}}},"ScheduledPost":{"type":"object","properties":{"id":{"type":"integer"},"network":{"type":"string","enum":["linkedin","meta","twitter","google_business","youtube","pinterest","tiktok","threads","bluesky"]},"platform":{"type":"string","description":"facebook or instagram for the meta network; otherwise equals network."},"brand_id":{"type":"integer"},"body":{"type":"string"},"body_preview":{"type":"string"},"scheduled_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","processing","sent","failed","cancelled","draft","manual"]},"approval_status":{"type":"string","enum":["draft","pending_approval","approved","rejected","changes_requested"]},"approval_note":{"type":["string","null"]},"remote_post_id":{"type":["string","null"]},"sent_at":{"type":["string","null"],"format":"date-time"},"error_message":{"type":["string","null"]},"created_by_user_id":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"ScheduledPostInput":{"type":"object","required":["body","networks","scheduled_at"],"properties":{"body":{"type":"string","maxLength":5000},"networks":{"type":"array","minItems":1,"items":{"type":"string","enum":["linkedin","facebook","instagram","twitter","google_business","pinterest","youtube","threads","tiktok","bluesky"]}},"scheduled_at":{"type":"string","format":"date-time","description":"Must be in the future."}}},"ScheduledPostUpdate":{"type":"object","properties":{"body":{"type":"string","maxLength":5000},"scheduled_at":{"type":"string","format":"date-time"}}},"ScheduleResult":{"type":"object","properties":{"scheduled_count":{"type":"integer"},"failed_count":{"type":"integer"},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Keyed by network: why that network refused."},"posts":{"type":"array","items":{"$ref":"#\/components\/schemas\/ScheduledPost"}}}},"MediaAsset":{"type":"object","properties":{"id":{"type":"integer"},"brand_id":{"type":"integer"},"kind":{"type":"string","enum":["image","video"]},"url":{"type":"string","format":"uri"},"original_name":{"type":["string","null"]},"alt_text":{"type":["string","null"]},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"size_bytes":{"type":["integer","null"]},"created_by_user_id":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"MediaUpload":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"alt_text":{"type":"string","maxLength":500}}},"ApprovalNote":{"type":"object","properties":{"note":{"type":"string","maxLength":2000}}},"InboxThread":{"type":"object","properties":{"id":{"type":"integer"},"brand_id":{"type":"integer"},"platform":{"type":"string"},"type":{"type":"string"},"external_thread_id":{"type":"string"},"sender":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]},"avatar_url":{"type":["string","null"]}}},"subject":{"type":["string","null"]},"preview":{"type":["string","null"]},"sentiment":{"type":["string","null"]},"rating":{"type":["integer","null"]},"is_unread":{"type":"boolean"},"is_resolved":{"type":"boolean"},"assigned_user_id":{"type":["integer","null"]},"first_response_due_at":{"type":["string","null"],"format":"date-time"},"last_activity_at":{"type":["string","null"],"format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"},"messages_count":{"type":"integer"},"messages":{"type":"array","description":"Only on the show endpoint.","items":{"$ref":"#\/components\/schemas\/InboxMessage"}},"created_at":{"type":["string","null"],"format":"date-time"}}},"InboxMessage":{"type":"object","properties":{"id":{"type":"integer"},"direction":{"type":"string","enum":["inbound","outbound"]},"external_message_id":{"type":["string","null"]},"author":{"type":"object","properties":{"name":{"type":["string","null"]},"handle":{"type":["string","null"]}}},"body":{"type":["string","null"]},"published_at":{"type":["string","null"],"format":"date-time"},"is_read":{"type":"boolean"}}},"InboxReply":{"type":"object","required":["body"],"properties":{"body":{"type":"string","maxLength":5000}}},"InboxAssign":{"type":"object","required":["user_id"],"properties":{"user_id":{"type":["integer","null"]}}},"Campaign":{"type":"object","properties":{"id":{"type":"integer"},"brand_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":["string","null"]},"starts_at":{"type":["string","null"],"format":"date-time"},"ends_at":{"type":["string","null"],"format":"date-time"},"posts_count":{"type":"integer"},"created_by_user_id":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"CampaignUpdate":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"description":{"type":["string","null"],"maxLength":10000,"description":"HTML; sanitized the way the campaign page saves it."},"starts_at":{"type":["string","null"],"format":"date"},"ends_at":{"type":["string","null"],"format":"date"}}},"SmartLink":{"type":"object","properties":{"id":{"type":"integer"},"brand_id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"public_url":{"type":"string","format":"uri"},"tagline":{"type":["string","null"]},"destinations":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"href":{"type":"string"}}}},"published_at":{"type":["string","null"],"format":"date-time"},"page_views":{"type":"integer"},"clicks":{"type":"integer"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"SmartLinkStats":{"type":"object","properties":{"smart_link_id":{"type":"integer"},"days":{"type":"integer"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"totals":{"type":"object","properties":{"views":{"type":"integer"},"clicks":{"type":"integer"},"click_rate":{"type":["number","null"]}}},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"views":{"type":"integer"},"clicks":{"type":"integer"}}}},"destinations":{"type":"array","items":{"type":"object"}},"referrers":{"type":"array","items":{"type":"object"}},"devices":{"type":"array","items":{"type":"object"}},"countries":{"type":"array","items":{"type":"object"}}}},"AnalyticsReport":{"type":"object","description":"The analytics page's report: impressions, interactions and followers with per-surface breakdowns, top posts, web, links, paid and local sections when the brand has them.","additionalProperties":true},"DailySeries":{"type":"object","properties":{"brand_id":{"type":"integer"},"metric":{"type":"string"},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"series":{"type":"array","items":{"type":"object","properties":{"surface":{"type":"string"},"total":{"type":"integer"},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"value":{"type":"integer"}}}}}}}}},"AnalyticsPost":{"type":"object","properties":{"id":{"type":"integer"},"surface":{"type":"string"},"remote_post_id":{"type":"string"},"published_at":{"type":["string","null"],"format":"date-time"},"body_preview":{"type":["string","null"]},"media_url":{"type":["string","null"]},"impressions":{"type":["integer","null"]},"reach":{"type":["integer","null"]},"interactions":{"type":["integer","null"]},"reactions":{"type":["integer","null"]},"comments":{"type":["integer","null"]},"shares":{"type":["integer","null"]},"clicks":{"type":["integer","null"]},"synced_at":{"type":["string","null"],"format":"date-time"}}},"AdAccount":{"type":"object","properties":{"network":{"type":"string","enum":["meta","google","linkedin"]},"external_account_id":{"type":"string"},"name":{"type":["string","null"]},"currency":{"type":["string","null"]},"timezone":{"type":["string","null"]},"sync":{"type":["object","null"],"properties":{"last_success_at":{"type":["string","null"],"format":"date-time"},"last_attempted_at":{"type":["string","null"],"format":"date-time"},"failing_since":{"type":["string","null"],"format":"date-time"},"last_error":{"type":["string","null"]},"stale":{"type":"boolean"}}}}},"AdCampaign":{"type":"object","properties":{"network":{"type":"string"},"id":{"type":"string"},"name":{"type":["string","null"]},"status":{"type":["string","null"]}},"additionalProperties":true},"AdDailyMetric":{"type":"object","properties":{"date":{"type":"string","format":"date"},"network":{"type":"string"},"external_account_id":{"type":"string"},"currency":{"type":["string","null"]},"spend":{"type":["number","null"]},"impressions":{"type":"integer"},"clicks":{"type":"integer"},"conversions":{"type":"number"},"conversion_value":{"type":["number","null"]},"reach":{"type":["integer","null"]},"frequency":{"type":["number","null"]}}},"ShareLink":{"type":"object","properties":{"id":{"type":"integer"},"brand_id":{"type":"integer"},"period":{"type":"object","properties":{"type":{"type":"string","enum":["rolling","fixed"]},"days":{"type":["integer","null"]},"from":{"type":["string","null"]},"to":{"type":["string","null"]}}},"includes_paid_metrics":{"type":"boolean"},"expires_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"active":{"type":"boolean"},"url":{"type":"string","format":"uri","description":"Only on the create response."},"created_by_user_id":{"type":["integer","null"]},"created_at":{"type":["string","null"],"format":"date-time"}}},"ShareLinkInput":{"type":"object","properties":{"period":{"type":"string","enum":["rolling-30","fixed"],"default":"rolling-30"},"from":{"type":"string","format":"date","description":"Required when period is fixed."},"to":{"type":"string","format":"date","description":"Required when period is fixed."},"expires_in_days":{"type":["integer","null"],"enum":[30,90,null],"description":"Omit for a link that never expires."},"includes_paid_metrics":{"type":"boolean","default":false}}},"TeamMember":{"type":"object","properties":{"membership_id":{"type":"integer"},"user_id":{"type":"integer"},"name":{"type":["string","null"]},"email":{"type":["string","null"]},"role":{"type":["object","null"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"slug":{"type":"string"},"permissions":{"type":"array","items":{"type":"string"}}}},"joined_at":{"type":["string","null"],"format":"date-time"}}},"WebhookSubscription":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string","format":"uri"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["post.published","post.failed","post.scheduled","post.cancelled","approval.requested","approval.approved","approval.rejected","approval.changes_requested","inbox.thread.created","inbox.thread.assigned","brand.created","connection.needs_reconnect"]}},"active":{"type":"boolean"},"consecutive_failures":{"type":"integer"},"last_delivered_at":{"type":["string","null"],"format":"date-time"},"last_failed_at":{"type":["string","null"],"format":"date-time"},"disabled_at":{"type":["string","null"],"format":"date-time"},"disabled_reason":{"type":["string","null"]},"secret":{"type":"string","description":"Only on the create response."},"created_at":{"type":["string","null"],"format":"date-time"}}},"WebhookSubscriptionInput":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri","description":"HTTPS, public host."},"description":{"type":["string","null"],"maxLength":120},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["post.published","post.failed","post.scheduled","post.cancelled","approval.requested","approval.approved","approval.rejected","approval.changes_requested","inbox.thread.created","inbox.thread.assigned","brand.created","connection.needs_reconnect"]}}}},"WebhookSubscriptionUpdate":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"description":{"type":["string","null"],"maxLength":120},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["post.published","post.failed","post.scheduled","post.cancelled","approval.requested","approval.approved","approval.rejected","approval.changes_requested","inbox.thread.created","inbox.thread.assigned","brand.created","connection.needs_reconnect"]}},"active":{"type":"boolean"}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"integer"},"subscription_id":{"type":"integer"},"redelivered_from_id":{"type":["integer","null"]},"event":{"type":"string"},"status":{"type":"string","enum":["pending","retrying","succeeded","failed","blocked","skipped"]},"attempt":{"type":"integer"},"max_attempts":{"type":"integer"},"response_status":{"type":["integer","null"]},"response_excerpt":{"type":["string","null"]},"error":{"type":["string","null"]},"next_retry_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"payload":{"type":"object"}}},"WebhookEnvelope":{"type":"object","description":"The body every webhook delivery carries.","required":["id","event","sent_at","attempt","data"],"properties":{"id":{"type":"string","description":"The delivery id; the same across retries."},"event":{"type":"string","enum":["post.published","post.failed","post.scheduled","post.cancelled","approval.requested","approval.approved","approval.rejected","approval.changes_requested","inbox.thread.created","inbox.thread.assigned","brand.created","connection.needs_reconnect"]},"sent_at":{"type":"string","format":"date-time"},"attempt":{"type":"integer"},"data":{"type":"object","description":"Event-specific; see the developer documentation."}}}}},"x-scopes":{"brands:read":"List and read the brands the token holder belongs to.","brands:write":"Create and update brands.","posts:read":"List and read scheduled posts.","posts:write":"Create, update, cancel and publish scheduled posts.","media:read":"List and read media library assets.","media:write":"Upload media library assets.","approvals:read":"List posts awaiting review.","approvals:write":"Approve, reject and request changes on posts.","inbox:read":"List and read inbox threads.","inbox:write":"Reply to, resolve and assign inbox threads.","campaigns:read":"List content campaigns.","campaigns:write":"Edit content campaigns: name, description and dates.","smartlinks:read":"List SmartLinks and read their statistics.","analytics:read":"Read analytics reports, daily series and post tables.","ads:read":"Read paid-media accounts, campaigns and daily metrics.","reports:read":"List report share links.","reports:write":"Create and revoke report share links.","team:read":"Read a brand's team roster.","webhooks:manage":"Manage webhook subscriptions and deliveries."},"x-webhook-events":{"post.scheduled":"A post was added to the schedule (any network).","post.published":"A scheduled post went live on its network.","post.failed":"A scheduled post could not be published; the payload carries the error.","post.cancelled":"A pending post was cancelled or deleted before it published.","approval.requested":"A post entered the review queue.","approval.approved":"A reviewer approved a post.","approval.rejected":"A reviewer rejected a post; the payload carries the note.","approval.changes_requested":"A reviewer or client asked for changes to a post.","inbox.thread.created":"A new conversation, comment, mention or review arrived in the inbox.","inbox.thread.assigned":"An inbox thread was assigned to (or unassigned from) a team member.","brand.created":"A brand was created in the agency.","connection.needs_reconnect":"A connected network revoked or expired its authorisation and needs reconnecting."},"x-rate-limits":{"per_ip_per_minute":120,"per_token_per_minute":300}}