> 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.0.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.0.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.0.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.0.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.0.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.0.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.0.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.0.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 ErrorObject object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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.0.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 ClerkWebhookResult object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.0"},"components":{"schemas":{"ClerkWebhookResult":{"additionalProperties":true,"description":"Body of POST /webhooks (after successful signature verification).\n\nThe 200 is intentional even on handler errors — see the route\ndocstring for the retry-storm rationale. The discriminating field is\n``status``, not the HTTP code.","properties":{"status":{"enum":["success","unhandled","error"],"title":"Status","type":"string"},"event_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The Clerk event type (e.g. user.created, organization.updated)","title":"Event Type"},"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Clerk's event ID","title":"Event Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Handler error message — only present on status=error","title":"Error"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Message"}},"required":["status"],"title":"ClerkWebhookResult","type":"object"}}}}
```

## The SupportedEventsResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.0"},"components":{"schemas":{"SupportedEventsResponse":{"properties":{"supported_events":{"description":"List of Clerk event types this server knows how to handle","items":{"type":"string"},"title":"Supported Events","type":"array"},"total_count":{"minimum":0,"title":"Total Count","type":"integer"}},"required":["supported_events","total_count"],"title":"SupportedEventsResponse","type":"object"}}}}
```

## The QuestionContentPush object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.0"},"components":{"schemas":{"QuestionContentPush":{"properties":{"question_id":{"description":"Target question id (integer as string)","title":"Question Id","type":"string"},"content":{"description":"Free-text responses, one per array entry","items":{"type":"string"},"minItems":1,"title":"Content","type":"array"}},"required":["question_id","content"],"title":"QuestionContentPush","type":"object"}}}}
```

## The ContentPushRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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":"Free-text responses, one per array entry","items":{"type":"string"},"minItems":1,"title":"Content","type":"array"}},"required":["question_id","content"],"title":"QuestionContentPush","type":"object"}}}}
```

## The ContentPushResponse object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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_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"},"aps_deducted":{"description":"APS units deducted from the org's quota","minimum":0,"title":"Aps Deducted","type":"integer"},"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 BulkQuestionContentPush object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.0"},"components":{"schemas":{"BulkQuestionContentPush":{"properties":{"question_id":{"description":"Target question id","title":"Question Id","type":"string"},"content":{"description":"Free-text responses","items":{"type":"string"},"minItems":1,"title":"Content","type":"array"}},"required":["question_id","content"],"title":"BulkQuestionContentPush","type":"object"}}}}
```

## The BulkContentPushRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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":"Free-text responses","items":{"type":"string"},"minItems":1,"title":"Content","type":"array"}},"required":["question_id","content"],"title":"BulkQuestionContentPush","type":"object"}}}}
```

## The BulkPushAccepted object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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 BulkPushStatus object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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":"0..1 fraction complete","maximum":1,"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":"Result payload mirroring ContentPushResponse, present on status=completed","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 CreateSurveySeriesRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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.0.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.0.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 CreateSurveyQuestion object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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"}},"required":["question_title","question_type"],"title":"CreateSurveyQuestion","type":"object"}}}}
```

## The CreateSurveyRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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"},"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"}},"required":["question_title","question_type"],"title":"CreateSurveyQuestion","type":"object"}}}}
```

## The CreatedQuestion object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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.0.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"},"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 PublishSurveyRequest object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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.0.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 QuestionListing object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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.0.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"},"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.0.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"},"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.0.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"},"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"},"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 WebhookDict object

```json
{"openapi":"3.1.0","info":{"title":"BAI Analytics API","version":"1.0.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.0.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 WebhookEventType values","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.0.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"}}}}
```
