> For the complete documentation index, see [llms.txt](https://boundaryai.gitbook.io/boundaryai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boundaryai.gitbook.io/boundaryai-docs/api-and-webhooks/models.md).

# Models

## The ContentPushedData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ContentPushedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"question_id":{"title":"Question Id","type":"integer"},"original_survey_id":{"title":"Original Survey Id","type":"integer"},"original_question_id":{"title":"Original Question Id","type":"integer"},"lines_pushed":{"minimum":0,"title":"Lines Pushed","type":"integer"},"api_key_id":{"title":"Api Key Id","type":"integer"}},"required":["survey_series_id","survey_id","question_id","original_survey_id","original_question_id","lines_pushed","api_key_id"],"title":"ContentPushedData","type":"object"}}}}
```

## The ContentPushedEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ContentPushedEvent":{"additionalProperties":false,"properties":{"event":{"const":"content.pushed","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/ContentPushedData"}},"required":["event","timestamp","data"],"title":"ContentPushedEvent","type":"object"},"ContentPushedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"question_id":{"title":"Question Id","type":"integer"},"original_survey_id":{"title":"Original Survey Id","type":"integer"},"original_question_id":{"title":"Original Question Id","type":"integer"},"lines_pushed":{"minimum":0,"title":"Lines Pushed","type":"integer"},"api_key_id":{"title":"Api Key Id","type":"integer"}},"required":["survey_series_id","survey_id","question_id","original_survey_id","original_question_id","lines_pushed","api_key_id"],"title":"ContentPushedData","type":"object"}}}}
```

## The SeriesCreatedData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SeriesCreatedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"name":{"title":"Name","type":"string"},"api_key_id":{"title":"Api Key Id","type":"integer"}},"required":["survey_series_id","name","api_key_id"],"title":"SeriesCreatedData","type":"object"}}}}
```

## The SeriesCreatedEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SeriesCreatedEvent":{"additionalProperties":false,"properties":{"event":{"const":"series.created","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/SeriesCreatedData"}},"required":["event","timestamp","data"],"title":"SeriesCreatedEvent","type":"object"},"SeriesCreatedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"name":{"title":"Name","type":"string"},"api_key_id":{"title":"Api Key Id","type":"integer"}},"required":["survey_series_id","name","api_key_id"],"title":"SeriesCreatedData","type":"object"}}}}
```

## The SurveyCreatedData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SurveyCreatedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"survey_title":{"title":"Survey Title","type":"string"},"questions_created":{"minimum":0,"title":"Questions Created","type":"integer"},"api_key_id":{"title":"Api Key Id","type":"integer"}},"required":["survey_series_id","survey_id","survey_title","questions_created","api_key_id"],"title":"SurveyCreatedData","type":"object"}}}}
```

## The SurveyCreatedEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SurveyCreatedEvent":{"additionalProperties":false,"properties":{"event":{"const":"survey.created","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/SurveyCreatedData"}},"required":["event","timestamp","data"],"title":"SurveyCreatedEvent","type":"object"},"SurveyCreatedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"survey_title":{"title":"Survey Title","type":"string"},"questions_created":{"minimum":0,"title":"Questions Created","type":"integer"},"api_key_id":{"title":"Api Key Id","type":"integer"}},"required":["survey_series_id","survey_id","survey_title","questions_created","api_key_id"],"title":"SurveyCreatedData","type":"object"}}}}
```

## The SurveyPublishedData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SurveyPublishedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"survey_name":{"title":"Survey Name","type":"string"},"api_key_id":{"title":"Api Key Id","type":"integer"}},"required":["survey_series_id","survey_id","survey_name","api_key_id"],"title":"SurveyPublishedData","type":"object"}}}}
```

## The SurveyPublishedEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SurveyPublishedEvent":{"additionalProperties":false,"properties":{"event":{"const":"survey.published","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/SurveyPublishedData"}},"required":["event","timestamp","data"],"title":"SurveyPublishedEvent","type":"object"},"SurveyPublishedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"survey_name":{"title":"Survey Name","type":"string"},"api_key_id":{"title":"Api Key Id","type":"integer"}},"required":["survey_series_id","survey_id","survey_name","api_key_id"],"title":"SurveyPublishedData","type":"object"}}}}
```

## The AnalysisCompletedData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"AnalysisCompletedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"analysis_id":{"title":"Analysis Id","type":"integer"},"survey_name":{"title":"Survey Name","type":"string"}},"required":["survey_series_id","survey_id","analysis_id","survey_name"],"title":"AnalysisCompletedData","type":"object"}}}}
```

## The AnalysisCompletedEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"AnalysisCompletedEvent":{"additionalProperties":false,"properties":{"event":{"const":"analysis.completed","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/AnalysisCompletedData"}},"required":["event","timestamp","data"],"title":"AnalysisCompletedEvent","type":"object"},"AnalysisCompletedData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"analysis_id":{"title":"Analysis Id","type":"integer"},"survey_name":{"title":"Survey Name","type":"string"}},"required":["survey_series_id","survey_id","analysis_id","survey_name"],"title":"AnalysisCompletedData","type":"object"}}}}
```

## The FlagRaisedData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FlagRaisedData":{"description":"Fired when a Custom Monitoring monitor crosses its alert threshold.\n\nThe event name keeps the legacy ``flag`` wording for backward\ncompatibility with existing subscribers; in product vocabulary this\nis a *monitor* alert. It fires under the same watermark/threshold\ngate as email/SMS monitor alerts.","properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"analysis_id":{"title":"Analysis Id","type":"integer"},"survey_name":{"title":"Survey Name","type":"string"},"group_name":{"description":"The feedback group's name","title":"Group Name","type":"string"},"trigger_type":{"title":"Trigger Type","type":"string"},"flag_counts":{"additionalProperties":{"type":"integer"},"description":"Monitor name -> count of NEW matches since the last alert","title":"Flag Counts","type":"object"},"total_flagged":{"minimum":0,"title":"Total Flagged","type":"integer"}},"required":["survey_series_id","survey_id","analysis_id","survey_name","group_name","trigger_type","flag_counts","total_flagged"],"title":"FlagRaisedData","type":"object"}}}}
```

## The FlagRaisedEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FlagRaisedEvent":{"additionalProperties":false,"properties":{"event":{"const":"flag.raised","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/FlagRaisedData"}},"required":["event","timestamp","data"],"title":"FlagRaisedEvent","type":"object"},"FlagRaisedData":{"description":"Fired when a Custom Monitoring monitor crosses its alert threshold.\n\nThe event name keeps the legacy ``flag`` wording for backward\ncompatibility with existing subscribers; in product vocabulary this\nis a *monitor* alert. It fires under the same watermark/threshold\ngate as email/SMS monitor alerts.","properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"analysis_id":{"title":"Analysis Id","type":"integer"},"survey_name":{"title":"Survey Name","type":"string"},"group_name":{"description":"The feedback group's name","title":"Group Name","type":"string"},"trigger_type":{"title":"Trigger Type","type":"string"},"flag_counts":{"additionalProperties":{"type":"integer"},"description":"Monitor name -> count of NEW matches since the last alert","title":"Flag Counts","type":"object"},"total_flagged":{"minimum":0,"title":"Total Flagged","type":"integer"}},"required":["survey_series_id","survey_id","analysis_id","survey_name","group_name","trigger_type","flag_counts","total_flagged"],"title":"FlagRaisedData","type":"object"}}}}
```

## The ReportReadyData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ReportReadyData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"subscription_id":{"title":"Subscription Id","type":"integer"},"period_key":{"description":"The closed tracking period the report covers","title":"Period Key","type":"string"},"report_id":{"title":"Report Id","type":"integer"},"report_name":{"title":"Report Name","type":"string"}},"required":["survey_series_id","subscription_id","period_key","report_id","report_name"],"title":"ReportReadyData","type":"object"}}}}
```

## The ReportReadyEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ReportReadyEvent":{"additionalProperties":false,"properties":{"event":{"const":"report.ready","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/ReportReadyData"}},"required":["event","timestamp","data"],"title":"ReportReadyEvent","type":"object"},"ReportReadyData":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"integer"},"subscription_id":{"title":"Subscription Id","type":"integer"},"period_key":{"description":"The closed tracking period the report covers","title":"Period Key","type":"string"},"report_id":{"title":"Report Id","type":"integer"},"report_name":{"title":"Report Name","type":"string"}},"required":["survey_series_id","subscription_id","period_key","report_id","report_name"],"title":"ReportReadyData","type":"object"}}}}
```

## The InvitesCompletedData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InvitesCompletedData":{"properties":{"distribution_id":{"title":"Distribution Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"status":{"title":"Status","type":"string"},"total":{"minimum":0,"title":"Total","type":"integer"},"sent":{"minimum":0,"title":"Sent","type":"integer"},"failed":{"minimum":0,"title":"Failed","type":"integer"},"skipped":{"minimum":0,"title":"Skipped","type":"integer"}},"required":["distribution_id","survey_id","status","total","sent","failed","skipped"],"title":"InvitesCompletedData","type":"object"}}}}
```

## The InvitesCompletedEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InvitesCompletedEvent":{"additionalProperties":false,"properties":{"event":{"const":"invites.completed","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/InvitesCompletedData"}},"required":["event","timestamp","data"],"title":"InvitesCompletedEvent","type":"object"},"InvitesCompletedData":{"properties":{"distribution_id":{"title":"Distribution Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"status":{"title":"Status","type":"string"},"total":{"minimum":0,"title":"Total","type":"integer"},"sent":{"minimum":0,"title":"Sent","type":"integer"},"failed":{"minimum":0,"title":"Failed","type":"integer"},"skipped":{"minimum":0,"title":"Skipped","type":"integer"}},"required":["distribution_id","survey_id","status","total","sent","failed","skipped"],"title":"InvitesCompletedData","type":"object"}}}}
```

## The InviteBouncedData object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InviteBouncedData":{"properties":{"distribution_id":{"title":"Distribution Id","type":"integer"},"survey_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Survey Id"},"email":{"title":"Email","type":"string"},"reason":{"description":"Bounce/suppression reason, e.g. \"bounce\" or \"complaint\"","title":"Reason","type":"string"}},"required":["distribution_id","email","reason"],"title":"InviteBouncedData","type":"object"}}}}
```

## The InviteBouncedEvent object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InviteBouncedEvent":{"additionalProperties":false,"properties":{"event":{"const":"invite.bounced","title":"Event","type":"string"},"timestamp":{"description":"ISO-8601 UTC timestamp","title":"Timestamp","type":"string"},"data":{"$ref":"#/components/schemas/InviteBouncedData"}},"required":["event","timestamp","data"],"title":"InviteBouncedEvent","type":"object"},"InviteBouncedData":{"properties":{"distribution_id":{"title":"Distribution Id","type":"integer"},"survey_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Survey Id"},"email":{"title":"Email","type":"string"},"reason":{"description":"Bounce/suppression reason, e.g. \"bounce\" or \"complaint\"","title":"Reason","type":"string"}},"required":["distribution_id","email","reason"],"title":"InviteBouncedData","type":"object"}}}}
```

## The ErrorObject object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ErrorObject":{"description":"The inner ``error`` field of an error envelope.\n\nSchema name in the OpenAPI document: ``ErrorObject``.","properties":{"code":{"description":"Machine-readable error code drawn from ErrorCode enum","title":"Code","type":"string"},"message":{"description":"Human-readable error message, safe to display","title":"Message","type":"string"}},"required":["code","message"],"title":"ErrorObject","type":"object"}}}}
```

## The ErrorEnvelope object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ErrorEnvelope":{"description":"Top-level error response.\n\nSchema name in the OpenAPI document: ``ErrorEnvelope``.","properties":{"error":{"$ref":"#/components/schemas/ErrorObject"},"details":{"anyOf":[{},{"type":"null"}],"default":null,"description":"Optional structured details (e.g. validation field map)","title":"Details"}},"required":["error"],"title":"ErrorEnvelope","type":"object"},"ErrorObject":{"description":"The inner ``error`` field of an error envelope.\n\nSchema name in the OpenAPI document: ``ErrorObject``.","properties":{"code":{"description":"Machine-readable error code drawn from ErrorCode enum","title":"Code","type":"string"},"message":{"description":"Human-readable error message, safe to display","title":"Message","type":"string"}},"required":["code","message"],"title":"ErrorObject","type":"object"}}}}
```

## The ContentItem object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The QuestionContentPush object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"QuestionContentPush":{"properties":{"question_id":{"description":"Target question id (integer as string)","title":"Question Id","type":"string"},"content":{"description":"Feedback entries — bare strings or structured items with ingest metadata","items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentItem"}]},"minItems":1,"title":"Content","type":"array"}},"required":["question_id","content"],"title":"QuestionContentPush","type":"object"},"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The ContentPushRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ContentPushRequest":{"properties":{"survey_series_id":{"description":"Target survey series id","title":"Survey Series Id","type":"string"},"survey_id":{"description":"Target survey id within the series","title":"Survey Id","type":"string"},"question":{"$ref":"#/components/schemas/QuestionContentPush"},"source_reference":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Free-form identifier the customer attaches to the push for their own downstream tracking (e.g. an upstream ticket id).","title":"Source Reference"}},"required":["survey_series_id","survey_id","question"],"title":"ContentPushRequest","type":"object"},"QuestionContentPush":{"properties":{"question_id":{"description":"Target question id (integer as string)","title":"Question Id","type":"string"},"content":{"description":"Feedback entries — bare strings or structured items with ingest metadata","items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentItem"}]},"minItems":1,"title":"Content","type":"array"}},"required":["question_id","content"],"title":"QuestionContentPush","type":"object"},"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The ContentPushResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ContentPushResponse":{"description":"Success body of POST /api/input/content/push.","properties":{"status":{"const":"success","description":"Always 'success' on this path","title":"Status","type":"string"},"survey_series_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Series the resolved survey belongs to","title":"Survey Series Id"},"survey_id":{"description":"Resolved survey id where content landed","title":"Survey Id","type":"integer"},"question_id":{"description":"Resolved question id where content landed","title":"Question Id","type":"integer"},"inserted":{"description":"Number of content rows inserted","minimum":0,"title":"Inserted","type":"integer"},"rows_accepted":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Rows admitted for processing (inserted + skipped duplicates)","title":"Rows Accepted"},"aps_deducted":{"description":"Legacy alias of rows_accepted. Under token-based billing no APS is pre-deducted at push time — actual credit usage is metered during analysis, and test-environment keys are never charged. A fully-deduplicated retry still reports its admitted row count here.","minimum":0,"title":"Aps Deducted","type":"integer"},"skipped_duplicates":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Rows skipped because their (question, external_id) already existed","title":"Skipped Duplicates"},"duplicate_external_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"description":"External ids of the skipped rows (first 100)","title":"Duplicate External Ids"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Human-readable confirmation","title":"Message"}},"required":["status","survey_id","question_id","inserted","aps_deducted"],"title":"ContentPushResponse","type":"object"}}}}
```

## The FieldContentPush object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FieldContentPush":{"properties":{"field_id":{"description":"Target field id (integer as string)","title":"Field Id","type":"string"},"content":{"description":"Feedback items — bare strings or structured items with ingest metadata","items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentItem"}]},"minItems":1,"title":"Content","type":"array"}},"required":["field_id","content"],"title":"FieldContentPush","type":"object"},"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The FeedbackPushRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FeedbackPushRequest":{"properties":{"feedback_group_id":{"description":"Target feedback group id","title":"Feedback Group Id","type":"string"},"source_id":{"description":"Target source id within the group","title":"Source Id","type":"string"},"field":{"$ref":"#/components/schemas/FieldContentPush"},"source_reference":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Free-form identifier attached to the push for downstream tracking.","title":"Source Reference"}},"required":["feedback_group_id","source_id","field"],"title":"FeedbackPushRequest","type":"object"},"FieldContentPush":{"properties":{"field_id":{"description":"Target field id (integer as string)","title":"Field Id","type":"string"},"content":{"description":"Feedback items — bare strings or structured items with ingest metadata","items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentItem"}]},"minItems":1,"title":"Content","type":"array"}},"required":["field_id","content"],"title":"FieldContentPush","type":"object"},"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The FeedbackPushResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FeedbackPushResponse":{"properties":{"status":{"const":"success","title":"Status","type":"string"},"feedback_group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Feedback group the resolved source belongs to","title":"Feedback Group Id"},"source_id":{"description":"Resolved source id where feedback landed","title":"Source Id","type":"integer"},"field_id":{"description":"Resolved field id where feedback landed","title":"Field Id","type":"integer"},"inserted":{"minimum":0,"title":"Inserted","type":"integer"},"rows_accepted":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Rows admitted for processing (inserted + skipped duplicates)","title":"Rows Accepted"},"aps_deducted":{"description":"Legacy alias of rows_accepted. Under token-based billing no APS is pre-deducted at push time — actual credit usage is metered during analysis, and test-environment keys are never charged. A fully-deduplicated retry still reports its admitted row count here.","minimum":0,"title":"Aps Deducted","type":"integer"},"skipped_duplicates":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"title":"Skipped Duplicates"},"duplicate_external_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Duplicate External Ids"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"}},"required":["status","source_id","field_id","inserted","aps_deducted"],"title":"FeedbackPushResponse","type":"object"}}}}
```

## The BulkQuestionContentPush object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"BulkQuestionContentPush":{"properties":{"question_id":{"description":"Target question id","title":"Question Id","type":"string"},"content":{"description":"Feedback entries — bare strings or structured items","items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentItem"}]},"minItems":1,"title":"Content","type":"array"}},"required":["question_id","content"],"title":"BulkQuestionContentPush","type":"object"},"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The BulkContentPushRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"BulkContentPushRequest":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"string"},"survey_id":{"title":"Survey Id","type":"string"},"questions":{"description":"Up to 100 question-content pairs in a single batch","items":{"$ref":"#/components/schemas/BulkQuestionContentPush"},"maxItems":100,"minItems":1,"title":"Questions","type":"array"},"source_reference":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Source Reference"}},"required":["survey_series_id","survey_id","questions"],"title":"BulkContentPushRequest","type":"object"},"BulkQuestionContentPush":{"properties":{"question_id":{"description":"Target question id","title":"Question Id","type":"string"},"content":{"description":"Feedback entries — bare strings or structured items","items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentItem"}]},"minItems":1,"title":"Content","type":"array"}},"required":["question_id","content"],"title":"BulkQuestionContentPush","type":"object"},"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The BulkPushAccepted object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"BulkPushAccepted":{"description":"202 body of POST /api/input/content/push/bulk.","properties":{"status":{"const":"accepted","title":"Status","type":"string"},"task_id":{"title":"Task Id","type":"string"},"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"status_url":{"title":"Status Url","type":"string"}},"required":["status","task_id","survey_series_id","survey_id","status_url"],"title":"BulkPushAccepted","type":"object"}}}}
```

## The BulkFieldContentPush object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"BulkFieldContentPush":{"properties":{"field_id":{"title":"Field Id","type":"string"},"content":{"items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentItem"}]},"minItems":1,"title":"Content","type":"array"}},"required":["field_id","content"],"title":"BulkFieldContentPush","type":"object"},"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The BulkFeedbackPushRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"BulkFeedbackPushRequest":{"properties":{"feedback_group_id":{"title":"Feedback Group Id","type":"string"},"source_id":{"title":"Source Id","type":"string"},"fields":{"items":{"$ref":"#/components/schemas/BulkFieldContentPush"},"maxItems":100,"minItems":1,"title":"Fields","type":"array"},"source_reference":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Source Reference"}},"required":["feedback_group_id","source_id","fields"],"title":"BulkFeedbackPushRequest","type":"object"},"BulkFieldContentPush":{"properties":{"field_id":{"title":"Field Id","type":"string"},"content":{"items":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/ContentItem"}]},"minItems":1,"title":"Content","type":"array"}},"required":["field_id","content"],"title":"BulkFieldContentPush","type":"object"},"ContentItem":{"description":"Structured content entry with ingest metadata.\n\nContent arrays accept bare strings (the original shape) or these\nobjects. ``external_id`` is the customer-side id used for\nupsert-dedup on retries; ``occurred_at`` back-dates the item for\nperiod bucketing; the rest is stored as structured context.","properties":{"text":{"description":"The feedback text","minLength":1,"title":"Text","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Customer-side id of this item (ticket id, review id…). Items whose (question, external_id) already exist are skipped, so retries never create duplicates.","title":"External Id"},"customer_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"title":"Customer Id"},"channel":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"title":"Channel"},"language":{"anyOf":[{"maxLength":35,"type":"string"},{"type":"null"}],"default":null,"description":"BCP-47-ish language tag","title":"Language"},"rating":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Numeric score attached to the item (e.g. review stars)","title":"Rating"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 timestamp of when the feedback happened (defaults to push time)","title":"Occurred At"}},"required":["text"],"title":"ContentItem","type":"object"}}}}
```

## The BulkFeedbackPushAccepted object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"BulkFeedbackPushAccepted":{"properties":{"status":{"const":"accepted","title":"Status","type":"string"},"task_id":{"title":"Task Id","type":"string"},"feedback_group_id":{"title":"Feedback Group Id","type":"integer"},"source_id":{"title":"Source Id","type":"integer"},"status_url":{"title":"Status Url","type":"string"}},"required":["status","task_id","feedback_group_id","source_id","status_url"],"title":"BulkFeedbackPushAccepted","type":"object"}}}}
```

## The BulkPushStatus object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"BulkPushStatus":{"description":"200/202 body of GET /api/input/content/push/bulk/status/{task_id}.","properties":{"task_id":{"title":"Task Id","type":"string"},"status":{"enum":["pending","processing","completed","failed"],"title":"Status","type":"string"},"survey_series_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Survey Series Id"},"survey_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Survey Id"},"progress":{"default":0,"description":"Percent complete (0-100)","maximum":100,"minimum":0,"title":"Progress","type":"number"},"progress_message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Progress Message"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 UTC","title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 UTC","title":"Completed At"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Present on status=completed: {status, survey_series_id, survey_id, total_inserted, total_rows_accepted, total_aps_deducted, questions: [{question_id, inserted, status}, ...]}","title":"Result"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Error payload, present on status=failed","title":"Error"}},"required":["task_id","status"],"title":"BulkPushStatus","type":"object"}}}}
```

## The BulkFeedbackPushStatus object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"BulkFeedbackPushStatus":{"properties":{"task_id":{"title":"Task Id","type":"string"},"status":{"enum":["pending","processing","completed","failed"],"title":"Status","type":"string"},"feedback_group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Feedback Group Id"},"source_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Source Id"},"progress":{"default":0,"description":"Percent complete (0-100)","maximum":100,"minimum":0,"title":"Progress","type":"number"},"progress_message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Progress Message"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Completed At"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Present on status=completed: {status, feedback_group_id, source_id, total_inserted, total_rows_accepted, total_aps_deducted, fields: [{field_id, inserted, status}, ...]}","title":"Result"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Error"}},"required":["task_id","status"],"title":"BulkFeedbackPushStatus","type":"object"}}}}
```

## The CreateSurveySeriesRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateSurveySeriesRequest":{"properties":{"name":{"description":"Series display name","maxLength":255,"minLength":2,"title":"Name","type":"string"}},"required":["name"],"title":"CreateSurveySeriesRequest","type":"object"}}}}
```

## The CreatedSeriesMinimal object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreatedSeriesMinimal":{"properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"}},"required":["id","name"],"title":"CreatedSeriesMinimal","type":"object"}}}}
```

## The CreateSurveySeriesResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateSurveySeriesResponse":{"description":"200 (already exists) / 201 (created) body.","properties":{"status":{"const":"success","title":"Status","type":"string"},"created":{"description":"False when the series already existed","title":"Created","type":"boolean"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"},"survey_series":{"$ref":"#/components/schemas/CreatedSeriesMinimal"}},"required":["status","created","survey_series"],"title":"CreateSurveySeriesResponse","type":"object"},"CreatedSeriesMinimal":{"properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"}},"required":["id","name"],"title":"CreatedSeriesMinimal","type":"object"}}}}
```

## The CreateFeedbackGroupRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateFeedbackGroupRequest":{"properties":{"name":{"description":"Feedback group display name","maxLength":255,"minLength":2,"title":"Name","type":"string"}},"required":["name"],"title":"CreateFeedbackGroupRequest","type":"object"}}}}
```

## The CreatedFeedbackGroupMinimal object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreatedFeedbackGroupMinimal":{"properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"}},"required":["id","name"],"title":"CreatedFeedbackGroupMinimal","type":"object"}}}}
```

## The CreateFeedbackGroupResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateFeedbackGroupResponse":{"properties":{"status":{"const":"success","title":"Status","type":"string"},"created":{"description":"False when the group already existed","title":"Created","type":"boolean"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"},"feedback_group":{"$ref":"#/components/schemas/CreatedFeedbackGroupMinimal"}},"required":["status","created","feedback_group"],"title":"CreateFeedbackGroupResponse","type":"object"},"CreatedFeedbackGroupMinimal":{"properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"}},"required":["id","name"],"title":"CreatedFeedbackGroupMinimal","type":"object"}}}}
```

## The CreateSurveyQuestion object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateSurveyQuestion":{"description":"One question in the create-survey payload. Permissive on\nquestion_type to match the existing case-insensitive parser.","properties":{"question_title":{"maxLength":500,"minLength":1,"title":"Question Title","type":"string"},"question_type":{"description":"One of DEPTH_TEXT, TEXT, MCQ, SCQ, RATING, NPS, METADATA (case-insensitive; also accepts long_answer / short_answer).","title":"Question Type","type":"string"},"question_options":{"items":{"type":"string"},"maxItems":100,"title":"Question Options","type":"array"},"is_mandatory":{"default":false,"title":"Is Mandatory","type":"boolean"},"min_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min Value"},"max_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max Value"},"min_label":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Min Label"},"max_label":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Max Label"},"use_star_rating":{"default":false,"title":"Use Star Rating","type":"boolean"}},"required":["question_title","question_type"],"title":"CreateSurveyQuestion","type":"object"}}}}
```

## The CreateSurveyRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateSurveyRequest":{"properties":{"survey_series_id":{"title":"Survey Series Id","type":"string"},"survey_title":{"maxLength":100,"minLength":1,"title":"Survey Title","type":"string"},"survey_description":{"default":"","maxLength":1000,"title":"Survey Description","type":"string"},"feedback_type":{"default":"survey","description":"What kind of feedback this source collects: survey | call_transcript | app_review | support_ticket | chat | email | social_media | review | other. Open vocabulary — new types may be added without a version bump.","title":"Feedback Type","type":"string"},"questions":{"items":{"$ref":"#/components/schemas/CreateSurveyQuestion"},"title":"Questions","type":"array"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"EN | FR | ES (or full names; case-insensitive)","title":"Language"}},"required":["survey_series_id","survey_title"],"title":"CreateSurveyRequest","type":"object"},"CreateSurveyQuestion":{"description":"One question in the create-survey payload. Permissive on\nquestion_type to match the existing case-insensitive parser.","properties":{"question_title":{"maxLength":500,"minLength":1,"title":"Question Title","type":"string"},"question_type":{"description":"One of DEPTH_TEXT, TEXT, MCQ, SCQ, RATING, NPS, METADATA (case-insensitive; also accepts long_answer / short_answer).","title":"Question Type","type":"string"},"question_options":{"items":{"type":"string"},"maxItems":100,"title":"Question Options","type":"array"},"is_mandatory":{"default":false,"title":"Is Mandatory","type":"boolean"},"min_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min Value"},"max_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max Value"},"min_label":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Min Label"},"max_label":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Max Label"},"use_star_rating":{"default":false,"title":"Use Star Rating","type":"boolean"}},"required":["question_title","question_type"],"title":"CreateSurveyQuestion","type":"object"}}}}
```

## The CreatedQuestion object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreatedQuestion":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"description":"The normalized question type echoed back","title":"Type","type":"string"}},"required":["id","title","type"],"title":"CreatedQuestion","type":"object"}}}}
```

## The CreateSurveyResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateSurveyResponse":{"properties":{"status":{"const":"success","title":"Status","type":"string"},"survey_series_id":{"title":"Survey Series Id","type":"integer"},"survey_id":{"title":"Survey Id","type":"integer"},"feedback_type":{"default":"survey","title":"Feedback Type","type":"string"},"questions_created":{"title":"Questions Created","type":"integer"},"questions":{"items":{"$ref":"#/components/schemas/CreatedQuestion"},"title":"Questions","type":"array"},"message":{"title":"Message","type":"string"}},"required":["status","survey_series_id","survey_id","questions_created","questions","message"],"title":"CreateSurveyResponse","type":"object"},"CreatedQuestion":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"description":"The normalized question type echoed back","title":"Type","type":"string"}},"required":["id","title","type"],"title":"CreatedQuestion","type":"object"}}}}
```

## The CreateSourceField object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateSourceField":{"properties":{"field_title":{"maxLength":500,"minLength":1,"title":"Field Title","type":"string"},"field_type":{"description":"One of DEPTH_TEXT, TEXT, MCQ, SCQ, RATING, NPS, METADATA (case-insensitive; also accepts long_answer / short_answer).","title":"Field Type","type":"string"},"field_options":{"items":{"type":"string"},"maxItems":100,"title":"Field Options","type":"array"},"is_mandatory":{"default":false,"title":"Is Mandatory","type":"boolean"},"min_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min Value"},"max_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max Value"},"min_label":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Min Label"},"max_label":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Max Label"},"use_star_rating":{"default":false,"title":"Use Star Rating","type":"boolean"}},"required":["field_title","field_type"],"title":"CreateSourceField","type":"object"}}}}
```

## The CreateSourceRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateSourceRequest":{"properties":{"feedback_group_id":{"title":"Feedback Group Id","type":"string"},"source_title":{"maxLength":100,"minLength":1,"title":"Source Title","type":"string"},"source_description":{"default":"","maxLength":1000,"title":"Source Description","type":"string"},"feedback_type":{"default":"survey","description":"What kind of feedback this source collects: survey | call_transcript | app_review | support_ticket | chat | email | social_media | review | other. Open vocabulary.","title":"Feedback Type","type":"string"},"fields":{"items":{"$ref":"#/components/schemas/CreateSourceField"},"maxItems":100,"title":"Fields","type":"array"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"EN | FR | ES (case-insensitive)","title":"Language"}},"required":["feedback_group_id","source_title"],"title":"CreateSourceRequest","type":"object"},"CreateSourceField":{"properties":{"field_title":{"maxLength":500,"minLength":1,"title":"Field Title","type":"string"},"field_type":{"description":"One of DEPTH_TEXT, TEXT, MCQ, SCQ, RATING, NPS, METADATA (case-insensitive; also accepts long_answer / short_answer).","title":"Field Type","type":"string"},"field_options":{"items":{"type":"string"},"maxItems":100,"title":"Field Options","type":"array"},"is_mandatory":{"default":false,"title":"Is Mandatory","type":"boolean"},"min_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min Value"},"max_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max Value"},"min_label":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Min Label"},"max_label":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Max Label"},"use_star_rating":{"default":false,"title":"Use Star Rating","type":"boolean"}},"required":["field_title","field_type"],"title":"CreateSourceField","type":"object"}}}}
```

## The CreatedField object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreatedField":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"}},"required":["id","title","type"],"title":"CreatedField","type":"object"}}}}
```

## The CreateSourceResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateSourceResponse":{"properties":{"status":{"const":"success","title":"Status","type":"string"},"feedback_group_id":{"title":"Feedback Group Id","type":"integer"},"source_id":{"title":"Source Id","type":"integer"},"feedback_type":{"default":"survey","title":"Feedback Type","type":"string"},"fields_created":{"title":"Fields Created","type":"integer"},"fields":{"items":{"$ref":"#/components/schemas/CreatedField"},"title":"Fields","type":"array"},"message":{"title":"Message","type":"string"}},"required":["status","feedback_group_id","source_id","fields_created","fields","message"],"title":"CreateSourceResponse","type":"object"},"CreatedField":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"}},"required":["id","title","type"],"title":"CreatedField","type":"object"}}}}
```

## The PublishSurveyRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"PublishSurveyRequest":{"properties":{"survey_id":{"title":"Survey Id","type":"integer"},"survey_series_id":{"title":"Survey Series Id","type":"integer"}},"required":["survey_id","survey_series_id"],"title":"PublishSurveyRequest","type":"object"}}}}
```

## The PublishSurveyResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"PublishSurveyResponse":{"properties":{"status":{"const":"success","title":"Status","type":"string"},"survey_id":{"title":"Survey Id","type":"integer"},"survey_series_id":{"title":"Survey Series Id","type":"integer"},"mode":{"const":"ACCESSIBLE","title":"Mode","type":"string"},"message":{"title":"Message","type":"string"}},"required":["status","survey_id","survey_series_id","mode","message"],"title":"PublishSurveyResponse","type":"object"}}}}
```

## The PublishSourceRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"PublishSourceRequest":{"properties":{"source_id":{"title":"Source Id","type":"integer"},"feedback_group_id":{"title":"Feedback Group Id","type":"integer"}},"required":["source_id","feedback_group_id"],"title":"PublishSourceRequest","type":"object"}}}}
```

## The PublishSourceResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"PublishSourceResponse":{"properties":{"status":{"const":"success","title":"Status","type":"string"},"source_id":{"title":"Source Id","type":"integer"},"feedback_group_id":{"title":"Feedback Group Id","type":"integer"},"mode":{"const":"ACCESSIBLE","title":"Mode","type":"string"},"message":{"title":"Message","type":"string"}},"required":["status","source_id","feedback_group_id","mode","message"],"title":"PublishSourceResponse","type":"object"}}}}
```

## The ListPagination object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"ListPagination":{"description":"Series-level pagination echo on the surveys-list endpoints.\n\n``total_count`` is the number of series matching the filters, so\nclients page while ``offset + limit < total_count``.","properties":{"limit":{"title":"Limit","type":"integer"},"offset":{"title":"Offset","type":"integer"},"total_count":{"title":"Total Count","type":"integer"}},"required":["limit","offset","total_count"],"title":"ListPagination","type":"object"}}}}
```

## The QuestionListing object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"QuestionListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"},"accepts_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Accepts Content"},"content_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"One of text | numeric | single_choice | multi_choice","title":"Content Format"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max"}},"required":["id","title","type"],"title":"QuestionListing","type":"object"}}}}
```

## The SeriesListing object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SeriesListing":{"properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"},"surveys":{"items":{"$ref":"#/components/schemas/SurveyListing"},"title":"Surveys","type":"array"}},"required":["id","name"],"title":"SeriesListing","type":"object"},"SurveyListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mode"},"feedback_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"What kind of feedback this source collects (survey | call_transcript | …)","title":"Feedback Type"},"questions":{"items":{"$ref":"#/components/schemas/QuestionListing"},"title":"Questions","type":"array"}},"required":["id","title"],"title":"SurveyListing","type":"object"},"QuestionListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"},"accepts_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Accepts Content"},"content_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"One of text | numeric | single_choice | multi_choice","title":"Content Format"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max"}},"required":["id","title","type"],"title":"QuestionListing","type":"object"}}}}
```

## The SurveyListing object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SurveyListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mode"},"feedback_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"What kind of feedback this source collects (survey | call_transcript | …)","title":"Feedback Type"},"questions":{"items":{"$ref":"#/components/schemas/QuestionListing"},"title":"Questions","type":"array"}},"required":["id","title"],"title":"SurveyListing","type":"object"},"QuestionListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"},"accepts_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Accepts Content"},"content_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"One of text | numeric | single_choice | multi_choice","title":"Content Format"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max"}},"required":["id","title","type"],"title":"QuestionListing","type":"object"}}}}
```

## The SurveysListResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SurveysListResponse":{"description":"Body of GET /api/input/surveys and /api/input/surveys/list.\n\nThe `org_id` field is present on the API-key endpoint and omitted on\nthe Clerk endpoint — declare it Optional.","properties":{"survey_series":{"items":{"$ref":"#/components/schemas/SeriesListing"},"title":"Survey Series","type":"array"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/ListPagination"},{"type":"null"}],"default":null},"org_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Org Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"}},"title":"SurveysListResponse","type":"object"},"SeriesListing":{"properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"},"surveys":{"items":{"$ref":"#/components/schemas/SurveyListing"},"title":"Surveys","type":"array"}},"required":["id","name"],"title":"SeriesListing","type":"object"},"SurveyListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mode"},"feedback_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"What kind of feedback this source collects (survey | call_transcript | …)","title":"Feedback Type"},"questions":{"items":{"$ref":"#/components/schemas/QuestionListing"},"title":"Questions","type":"array"}},"required":["id","title"],"title":"SurveyListing","type":"object"},"QuestionListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"},"accepts_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Accepts Content"},"content_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"One of text | numeric | single_choice | multi_choice","title":"Content Format"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max"}},"required":["id","title","type"],"title":"QuestionListing","type":"object"},"ListPagination":{"description":"Series-level pagination echo on the surveys-list endpoints.\n\n``total_count`` is the number of series matching the filters, so\nclients page while ``offset + limit < total_count``.","properties":{"limit":{"title":"Limit","type":"integer"},"offset":{"title":"Offset","type":"integer"},"total_count":{"title":"Total Count","type":"integer"}},"required":["limit","offset","total_count"],"title":"ListPagination","type":"object"}}}}
```

## The FeedbackGroupListing object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FeedbackGroupListing":{"properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"},"sources":{"items":{"$ref":"#/components/schemas/SourceListing"},"title":"Sources","type":"array"}},"required":["id","name"],"title":"FeedbackGroupListing","type":"object"},"SourceListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mode"},"feedback_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"What kind of feedback this source collects (survey | call_transcript | …)","title":"Feedback Type"},"fields":{"items":{"$ref":"#/components/schemas/FieldListing"},"title":"Fields","type":"array"}},"required":["id","title"],"title":"SourceListing","type":"object"},"FieldListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"},"accepts_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Accepts Content"},"content_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"One of text | numeric | single_choice | multi_choice","title":"Content Format"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max"}},"required":["id","title","type"],"title":"FieldListing","type":"object"}}}}
```

## The FieldListing object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FieldListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"},"accepts_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Accepts Content"},"content_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"One of text | numeric | single_choice | multi_choice","title":"Content Format"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max"}},"required":["id","title","type"],"title":"FieldListing","type":"object"}}}}
```

## The SourceListing object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SourceListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mode"},"feedback_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"What kind of feedback this source collects (survey | call_transcript | …)","title":"Feedback Type"},"fields":{"items":{"$ref":"#/components/schemas/FieldListing"},"title":"Fields","type":"array"}},"required":["id","title"],"title":"SourceListing","type":"object"},"FieldListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"},"accepts_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Accepts Content"},"content_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"One of text | numeric | single_choice | multi_choice","title":"Content Format"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max"}},"required":["id","title","type"],"title":"FieldListing","type":"object"}}}}
```

## The SourcesListResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SourcesListResponse":{"description":"Body of GET /api/input/sources/list (partner-vocabulary variant).","properties":{"feedback_groups":{"items":{"$ref":"#/components/schemas/FeedbackGroupListing"},"title":"Feedback Groups","type":"array"},"pagination":{"anyOf":[{"$ref":"#/components/schemas/ListPagination"},{"type":"null"}],"default":null},"org_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Org Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"}},"title":"SourcesListResponse","type":"object"},"FeedbackGroupListing":{"properties":{"id":{"title":"Id","type":"integer"},"name":{"title":"Name","type":"string"},"sources":{"items":{"$ref":"#/components/schemas/SourceListing"},"title":"Sources","type":"array"}},"required":["id","name"],"title":"FeedbackGroupListing","type":"object"},"SourceListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mode"},"feedback_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"What kind of feedback this source collects (survey | call_transcript | …)","title":"Feedback Type"},"fields":{"items":{"$ref":"#/components/schemas/FieldListing"},"title":"Fields","type":"array"}},"required":["id","title"],"title":"SourceListing","type":"object"},"FieldListing":{"properties":{"id":{"title":"Id","type":"integer"},"title":{"title":"Title","type":"string"},"type":{"title":"Type","type":"string"},"options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"},"accepts_content":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Accepts Content"},"content_format":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"One of text | numeric | single_choice | multi_choice","title":"Content Format"},"min":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min"},"max":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Max"}},"required":["id","title","type"],"title":"FieldListing","type":"object"},"ListPagination":{"description":"Series-level pagination echo on the surveys-list endpoints.\n\n``total_count`` is the number of series matching the filters, so\nclients page while ``offset + limit < total_count``.","properties":{"limit":{"title":"Limit","type":"integer"},"offset":{"title":"Offset","type":"integer"},"total_count":{"title":"Total Count","type":"integer"}},"required":["limit","offset","total_count"],"title":"ListPagination","type":"object"}}}}
```

## The AnalysisFlag object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"AnalysisFlag":{"properties":{"name":{"title":"Name","type":"string"},"mentions":{"minimum":0,"title":"Mentions","type":"integer"},"avg_sentiment":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Avg Sentiment"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"scope":{"const":"survey_series","default":"survey_series","description":"Flags are monitored at feedback-group level; the list covers the whole group this survey belongs to.","title":"Scope","type":"string"}},"required":["name","mentions"],"title":"AnalysisFlag","type":"object"}}}}
```

## The AnalysisTheme object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"AnalysisTheme":{"properties":{"name":{"title":"Name","type":"string"},"mentions":{"minimum":0,"title":"Mentions","type":"integer"},"avg_sentiment":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"-1..1 average sentiment across mentions","title":"Avg Sentiment"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"}},"required":["name","mentions"],"title":"AnalysisTheme","type":"object"}}}}
```

## The SentimentDistribution object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SentimentDistribution":{"description":"5-tier mention-weighted sentiment distribution.","properties":{"veryPositive":{"default":0,"title":"Verypositive","type":"integer"},"positive":{"default":0,"title":"Positive","type":"integer"},"neutral":{"default":0,"title":"Neutral","type":"integer"},"negative":{"default":0,"title":"Negative","type":"integer"},"veryNegative":{"default":0,"title":"Verynegative","type":"integer"}},"title":"SentimentDistribution","type":"object"}}}}
```

## The SurveyAnalysisReadResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SurveyAnalysisReadResponse":{"description":"Processed analysis for one survey — the read half of the API.\n\n``analysis_status`` is 'available' once at least one analysis run has\nsettled; 'none' means no analysis exists yet (nothing pushed, or the\nfirst run is still in flight — subscribe to the `analysis.completed`\nwebhook instead of polling).\n\n``analysis_id`` names the source's all-time analysis run. A source whose\nfeedback group tracks trends over time is analyzed per period instead:\nit has no single run to name, so ``analysis_id`` is null while\n``analysis_status`` is 'available' and the figures aggregate every\nanalyzed period.","properties":{"survey_id":{"title":"Survey Id","type":"integer"},"survey_series_id":{"title":"Survey Series Id","type":"integer"},"feedback_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Feedback Type"},"analysis_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Analysis Id"},"analysis_status":{"enum":["available","none"],"title":"Analysis Status","type":"string"},"sentiment_distribution":{"$ref":"#/components/schemas/SentimentDistribution"},"themes":{"items":{"$ref":"#/components/schemas/AnalysisTheme"},"title":"Themes","type":"array"},"flags":{"items":{"$ref":"#/components/schemas/AnalysisFlag"},"title":"Flags","type":"array"}},"required":["survey_id","survey_series_id","analysis_status","sentiment_distribution"],"title":"SurveyAnalysisReadResponse","type":"object"},"SentimentDistribution":{"description":"5-tier mention-weighted sentiment distribution.","properties":{"veryPositive":{"default":0,"title":"Verypositive","type":"integer"},"positive":{"default":0,"title":"Positive","type":"integer"},"neutral":{"default":0,"title":"Neutral","type":"integer"},"negative":{"default":0,"title":"Negative","type":"integer"},"veryNegative":{"default":0,"title":"Verynegative","type":"integer"}},"title":"SentimentDistribution","type":"object"},"AnalysisTheme":{"properties":{"name":{"title":"Name","type":"string"},"mentions":{"minimum":0,"title":"Mentions","type":"integer"},"avg_sentiment":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"-1..1 average sentiment across mentions","title":"Avg Sentiment"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"}},"required":["name","mentions"],"title":"AnalysisTheme","type":"object"},"AnalysisFlag":{"properties":{"name":{"title":"Name","type":"string"},"mentions":{"minimum":0,"title":"Mentions","type":"integer"},"avg_sentiment":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Avg Sentiment"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"scope":{"const":"survey_series","default":"survey_series","description":"Flags are monitored at feedback-group level; the list covers the whole group this survey belongs to.","title":"Scope","type":"string"}},"required":["name","mentions"],"title":"AnalysisFlag","type":"object"}}}}
```

## The SourceAnalysisReadResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SourceAnalysisReadResponse":{"description":"Partner-vocabulary variant of SurveyAnalysisReadResponse.","properties":{"source_id":{"title":"Source Id","type":"integer"},"feedback_group_id":{"title":"Feedback Group Id","type":"integer"},"feedback_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Feedback Type"},"analysis_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Analysis Id"},"analysis_status":{"enum":["available","none"],"title":"Analysis Status","type":"string"},"sentiment_distribution":{"$ref":"#/components/schemas/SentimentDistribution"},"themes":{"items":{"$ref":"#/components/schemas/AnalysisTheme"},"title":"Themes","type":"array"},"flags":{"items":{"$ref":"#/components/schemas/AnalysisFlag"},"title":"Flags","type":"array"}},"required":["source_id","feedback_group_id","analysis_status","sentiment_distribution"],"title":"SourceAnalysisReadResponse","type":"object"},"SentimentDistribution":{"description":"5-tier mention-weighted sentiment distribution.","properties":{"veryPositive":{"default":0,"title":"Verypositive","type":"integer"},"positive":{"default":0,"title":"Positive","type":"integer"},"neutral":{"default":0,"title":"Neutral","type":"integer"},"negative":{"default":0,"title":"Negative","type":"integer"},"veryNegative":{"default":0,"title":"Verynegative","type":"integer"}},"title":"SentimentDistribution","type":"object"},"AnalysisTheme":{"properties":{"name":{"title":"Name","type":"string"},"mentions":{"minimum":0,"title":"Mentions","type":"integer"},"avg_sentiment":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"-1..1 average sentiment across mentions","title":"Avg Sentiment"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"}},"required":["name","mentions"],"title":"AnalysisTheme","type":"object"},"AnalysisFlag":{"properties":{"name":{"title":"Name","type":"string"},"mentions":{"minimum":0,"title":"Mentions","type":"integer"},"avg_sentiment":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Avg Sentiment"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Summary"},"scope":{"const":"survey_series","default":"survey_series","description":"Flags are monitored at feedback-group level; the list covers the whole group this survey belongs to.","title":"Scope","type":"string"}},"required":["name","mentions"],"title":"AnalysisFlag","type":"object"}}}}
```

## The KeyCreditsStatus object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"KeyCreditsStatus":{"additionalProperties":true,"description":"APS credit status of the calling key's org, as returned by\n``GET /api/input/me``. Extra keys may be added over time.","properties":{"plan_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Deprecated — plans no longer exist; always absent","title":"Plan Key"},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"APS quota for the current billing period","title":"Limit"},"used":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"APS consumed this period (fractional under token billing)","title":"Used"},"remaining":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"APS remaining this period","title":"Remaining"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 period start, null on the free plan","title":"Period Start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 period end, null on the free plan","title":"Period End"},"rate_tokens_per_aps":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Live token-to-APS conversion rate","title":"Rate Tokens Per Aps"}},"title":"KeyCreditsStatus","type":"object"}}}}
```

## The KeyRateLimits object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"KeyRateLimits":{"properties":{"per_key_per_minute":{"title":"Per Key Per Minute","type":"integer"},"per_org_per_minute":{"title":"Per Org Per Minute","type":"integer"},"per_ip_per_minute":{"title":"Per Ip Per Minute","type":"integer"},"window_seconds":{"title":"Window Seconds","type":"integer"}},"required":["per_key_per_minute","per_org_per_minute","per_ip_per_minute","window_seconds"],"title":"KeyRateLimits","type":"object"}}}}
```

## The KeySelfInfoResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"KeySelfInfoResponse":{"description":"GET /api/input/me — what the calling key can see about itself.","properties":{"key":{"additionalProperties":true,"description":"Public key fields (id, name, environment, permissions, …)","title":"Key","type":"object"},"org_id":{"title":"Org Id","type":"integer"},"rate_limits":{"$ref":"#/components/schemas/KeyRateLimits"},"credits":{"anyOf":[{"$ref":"#/components/schemas/KeyCreditsStatus"},{"type":"null"}],"default":null,"description":"APS credit status for the key's org"},"webhook_events":{"description":"Event types available for webhook subscriptions","items":{"type":"string"},"title":"Webhook Events","type":"array"}},"required":["key","org_id","rate_limits"],"title":"KeySelfInfoResponse","type":"object"},"KeyRateLimits":{"properties":{"per_key_per_minute":{"title":"Per Key Per Minute","type":"integer"},"per_org_per_minute":{"title":"Per Org Per Minute","type":"integer"},"per_ip_per_minute":{"title":"Per Ip Per Minute","type":"integer"},"window_seconds":{"title":"Window Seconds","type":"integer"}},"required":["per_key_per_minute","per_org_per_minute","per_ip_per_minute","window_seconds"],"title":"KeyRateLimits","type":"object"},"KeyCreditsStatus":{"additionalProperties":true,"description":"APS credit status of the calling key's org, as returned by\n``GET /api/input/me``. Extra keys may be added over time.","properties":{"plan_key":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Deprecated — plans no longer exist; always absent","title":"Plan Key"},"limit":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"APS quota for the current billing period","title":"Limit"},"used":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"APS consumed this period (fractional under token billing)","title":"Used"},"remaining":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"APS remaining this period","title":"Remaining"},"period_start":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 period start, null on the free plan","title":"Period Start"},"period_end":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 period end, null on the free plan","title":"Period End"},"rate_tokens_per_aps":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Live token-to-APS conversion rate","title":"Rate Tokens Per Aps"}},"title":"KeyCreditsStatus","type":"object"}}}}
```

## The FeedbackItem object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FeedbackItem":{"properties":{"id":{"description":"Cursor-orderable item id","title":"Id","type":"integer"},"source_id":{"title":"Source Id","type":"integer"},"field_id":{"title":"Field Id","type":"integer"},"type":{"description":"text | numeric | choice","title":"Type","type":"string"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"numeric":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Numeric"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Structured ingest metadata as pushed","title":"Metadata"},"source_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source Reference"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 event time","title":"Occurred At"}},"required":["id","source_id","field_id","type"],"title":"FeedbackItem","type":"object"}}}}
```

## The FeedbackListResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"FeedbackListResponse":{"description":"Cursor page of API-pushed feedback (partner vocabulary).","properties":{"items":{"items":{"$ref":"#/components/schemas/FeedbackItem"},"title":"Items","type":"array"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Pass back as ?cursor= to fetch the next page; null on the last page","title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"}},"title":"FeedbackListResponse","type":"object"},"FeedbackItem":{"properties":{"id":{"description":"Cursor-orderable item id","title":"Id","type":"integer"},"source_id":{"title":"Source Id","type":"integer"},"field_id":{"title":"Field Id","type":"integer"},"type":{"description":"text | numeric | choice","title":"Type","type":"string"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Text"},"numeric":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Numeric"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"description":"Structured ingest metadata as pushed","title":"Metadata"},"source_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source Reference"},"occurred_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO-8601 event time","title":"Occurred At"}},"required":["id","source_id","field_id","type"],"title":"FeedbackItem","type":"object"}}}}
```

## The EraseFeedbackRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"EraseFeedbackRequest":{"description":"Selector for a bulk erasure. Exactly one of external_ids /\ncustomer_id is required; feedback_group_id optionally narrows scope.","properties":{"external_ids":{"anyOf":[{"items":{"type":"string"},"maxItems":1000,"type":"array"},{"type":"null"}],"default":null,"title":"External Ids"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Erase every item whose ingest metadata carries this customer_id","title":"Customer Id"},"feedback_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Feedback Group Id"}},"title":"EraseFeedbackRequest","type":"object"}}}}
```

## The EraseFeedbackResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"EraseFeedbackResponse":{"properties":{"status":{"const":"success","title":"Status","type":"string"},"deleted":{"description":"Answer rows deleted","minimum":0,"title":"Deleted","type":"integer"},"sources_affected":{"minimum":0,"title":"Sources Affected","type":"integer"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"}},"required":["status","deleted","sources_affected"],"title":"EraseFeedbackResponse","type":"object"}}}}
```

## The InviteTemplateInfo object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InviteTemplateInfo":{"description":"GET /api/input/sources/{id}/invite-template — what an integration\nneeds to know before calling the send endpoint.","properties":{"configured":{"title":"Configured","type":"boolean"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"variables":{"description":"Column keys available as {{tokens}} in the template","items":{"type":"string"},"title":"Variables","type":"array"},"sender_domain_verified":{"default":false,"title":"Sender Domain Verified","type":"boolean"},"sending_enabled":{"description":"True when template + verified domain + published survey are all in place","title":"Sending Enabled","type":"boolean"},"daily_quota":{"default":0,"title":"Daily Quota","type":"integer"},"daily_quota_used":{"default":0,"title":"Daily Quota Used","type":"integer"}},"required":["configured","sending_enabled"],"title":"InviteTemplateInfo","type":"object"}}}}
```

## The InviteRecipient object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InviteRecipient":{"properties":{"email":{"maxLength":320,"title":"Email","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Your correlation id for this contact — echoed on the recipients listing.","title":"External Id"},"variables":{"additionalProperties":true,"description":"Values for the template's {{column_key}} tokens. Keys must match the respondent list's columns configured in the platform; unknown keys are rejected with the available column list.","title":"Variables","type":"object"}},"required":["email"],"title":"InviteRecipient","type":"object"}}}}
```

## The SendInvitesRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SendInvitesRequest":{"properties":{"recipients":{"items":{"$ref":"#/components/schemas/InviteRecipient"},"maxItems":1000,"minItems":1,"title":"Recipients","type":"array"},"resend":{"default":false,"description":"Re-invite addresses that already received this survey (default: they are skipped).","title":"Resend","type":"boolean"},"dry_run":{"default":false,"description":"Render previews for the first recipients and send nothing.","title":"Dry Run","type":"boolean"}},"required":["recipients"],"title":"SendInvitesRequest","type":"object"},"InviteRecipient":{"properties":{"email":{"maxLength":320,"title":"Email","type":"string"},"external_id":{"anyOf":[{"maxLength":255,"type":"string"},{"type":"null"}],"default":null,"description":"Your correlation id for this contact — echoed on the recipients listing.","title":"External Id"},"variables":{"additionalProperties":true,"description":"Values for the template's {{column_key}} tokens. Keys must match the respondent list's columns configured in the platform; unknown keys are rejected with the available column list.","title":"Variables","type":"object"}},"required":["email"],"title":"InviteRecipient","type":"object"}}}}
```

## The InvitePreview object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InvitePreview":{"properties":{"email":{"title":"Email","type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Body Html"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Error"}},"required":["email"],"title":"InvitePreview","type":"object"}}}}
```

## The SendInvitesDryRun object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SendInvitesDryRun":{"description":"200 body of a dry_run call — nothing was sent or persisted.","properties":{"status":{"const":"dry_run","title":"Status","type":"string"},"previews":{"items":{"$ref":"#/components/schemas/InvitePreview"},"title":"Previews","type":"array"},"would_accept":{"minimum":0,"title":"Would Accept","type":"integer"},"skipped_already_invited":{"items":{"type":"string"},"title":"Skipped Already Invited","type":"array"},"invalid":{"items":{"type":"string"},"title":"Invalid","type":"array"}},"required":["status","would_accept"],"title":"SendInvitesDryRun","type":"object"},"InvitePreview":{"properties":{"email":{"title":"Email","type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Subject"},"body_html":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Body Html"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Error"}},"required":["email"],"title":"InvitePreview","type":"object"}}}}
```

## The SendInvitesAccepted object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"SendInvitesAccepted":{"description":"202 body — the distribution was queued.","properties":{"status":{"const":"accepted","title":"Status","type":"string"},"distribution_id":{"title":"Distribution Id","type":"integer"},"task_id":{"title":"Task Id","type":"string"},"accepted":{"description":"Recipients queued for sending","minimum":0,"title":"Accepted","type":"integer"},"skipped_already_invited":{"items":{"type":"string"},"title":"Skipped Already Invited","type":"array"},"invalid":{"items":{"type":"string"},"title":"Invalid","type":"array"},"status_url":{"title":"Status Url","type":"string"}},"required":["status","distribution_id","task_id","accepted","status_url"],"title":"SendInvitesAccepted","type":"object"}}}}
```

## The InviteDistributionStatus object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InviteDistributionStatus":{"description":"GET /api/input/invites/{distribution_id}.","properties":{"distribution_id":{"title":"Distribution Id","type":"integer"},"survey_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Survey Id"},"status":{"enum":["pending","sending","sent","partial","failed","canceled"],"title":"Status","type":"string"},"total":{"default":0,"title":"Total","type":"integer"},"sent":{"default":0,"title":"Sent","type":"integer"},"failed":{"default":0,"title":"Failed","type":"integer"},"skipped":{"default":0,"title":"Skipped","type":"integer"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Finished At"}},"required":["distribution_id","status"],"title":"InviteDistributionStatus","type":"object"}}}}
```

## The InviteRecipientStatus object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InviteRecipientStatus":{"properties":{"id":{"description":"Cursor-orderable row id","title":"Id","type":"integer"},"email":{"title":"Email","type":"string"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Id"},"status":{"enum":["pending","sent","failed","skipped"],"title":"Status","type":"string"},"delivery_status":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ESP outcome: delivered | bounced | dropped | complained. Null until an event arrives.","title":"Delivery Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Error"}},"required":["id","email","status"],"title":"InviteRecipientStatus","type":"object"}}}}
```

## The InviteRecipientsPage object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"InviteRecipientsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InviteRecipientStatus"},"title":"Items","type":"array"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Next Cursor"},"has_more":{"default":false,"title":"Has More","type":"boolean"}},"title":"InviteRecipientsPage","type":"object"},"InviteRecipientStatus":{"properties":{"id":{"description":"Cursor-orderable row id","title":"Id","type":"integer"},"email":{"title":"Email","type":"string"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"External Id"},"status":{"enum":["pending","sent","failed","skipped"],"title":"Status","type":"string"},"delivery_status":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ESP outcome: delivered | bounced | dropped | complained. Null until an event arrives.","title":"Delivery Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Error"}},"required":["id","email","status"],"title":"InviteRecipientStatus","type":"object"}}}}
```

## The WebhookDict object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"WebhookDict":{"additionalProperties":true,"description":"Public representation of a configured webhook subscription.","properties":{"id":{"title":"Id","type":"integer"},"org_id":{"title":"Org Id","type":"integer"},"name":{"title":"Name","type":"string"},"url":{"title":"Url","type":"string"},"events":{"items":{"type":"string"},"title":"Events","type":"array"},"is_active":{"title":"Is Active","type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"},"last_delivery_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Last Delivery At"}},"required":["id","org_id","name","url","events","is_active"],"title":"WebhookDict","type":"object"}}}}
```

## The CreateWebhookRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateWebhookRequest":{"properties":{"name":{"maxLength":255,"minLength":1,"title":"Name","type":"string"},"url":{"description":"HTTPS endpoint to POST events to","title":"Url","type":"string"},"events":{"description":"One or more event types: content.pushed, survey.created, survey.published, series.created, analysis.completed, flag.raised, report.ready, invites.completed, invite.bounced","items":{"type":"string"},"minItems":1,"title":"Events","type":"array"}},"required":["name","url","events"],"title":"CreateWebhookRequest","type":"object"}}}}
```

## The CreateWebhookResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.3.0"},"components":{"schemas":{"CreateWebhookResponse":{"properties":{"webhook":{"$ref":"#/components/schemas/WebhookDict"},"secret":{"description":"HMAC secret shown once. Returned again only via regenerate-secret.","title":"Secret","type":"string"},"message":{"title":"Message","type":"string"}},"required":["webhook","secret","message"],"title":"CreateWebhookResponse","type":"object"},"WebhookDict":{"additionalProperties":true,"description":"Public representation of a configured webhook subscription.","properties":{"id":{"title":"Id","type":"integer"},"org_id":{"title":"Org Id","type":"integer"},"name":{"title":"Name","type":"string"},"url":{"title":"Url","type":"string"},"events":{"items":{"type":"string"},"title":"Events","type":"array"},"is_active":{"title":"Is Active","type":"boolean"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Created At"},"last_delivery_at":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Last Delivery At"}},"required":["id","org_id","name","url","events","is_active"],"title":"WebhookDict","type":"object"}}}}
```
