{"openapi":"3.1.0","info":{"title":"Semilattice API","description":"Plan and run simulations of how your users will react to your work, and read the results. Everything you create is saved in your Semilattice account, so it also appears in the app.\n\nAuthenticate with an API key from **Settings → API Keys** in the app, sent as `Authorization: Bearer <key>`.","contact":{"name":"Semilattice API","url":"https://semilattice.ai/","email":"support@semilattice.ai"},"version":"v1.0.0"},"servers":[{"url":"https://api.semilattice.ai"}],"paths":{"/v1/user-models":{"get":{"tags":["User Models"],"summary":"List user models","description":"List user models available to run simulations against, with accuracy\nand metadata. Use the ids as `user_model_ids`. owned_by_org is true for\nyour organisation's own models and false for public ones.","operationId":"list_user_models_route_v1_user_models_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user-models/{user_model_id}/attributes":{"get":{"tags":["User Models"],"summary":"List a user model's attributes","description":"List the attributes a user model's simulated users carry (age, location,\nincome...) with every stored value and how many simulated users hold it.\nValues are fixed tokens such as `east_midlands`, so read them here before\ncreating a segment. Only user models built with Anacreon can be segmented,\nand a segment can't be segmented again.","operationId":"list_attributes_route_v1_user_models__user_model_id__attributes_get","parameters":[{"name":"user_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Model Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user-models/{user_model_id}/segments":{"post":{"tags":["User Models"],"summary":"Create a segment","description":"Cut a segment out of a user model: the simulated users whose attributes\nmatch every filter. It joins your user models and runs like any other. A\nsegment needs at least 100 simulated users; when the filters match fewer,\nthe 400 says how many matched and nothing is created. It is shared with\nyour organisation, or only you without one.","operationId":"create_segment_route_v1_user_models__user_model_id__segments_post","parameters":[{"name":"user_model_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Model Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSegmentBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/user-models/{segment_id}":{"patch":{"tags":["User Models"],"summary":"Edit a segment","description":"Change a segment you created: its name, description or filters. Leave\nout what stays the same. New filters replace the old ones whole and still\nneed at least 100 simulated users. Once a simulation has used the segment\nits filters are locked, so that simulation's results still describe the\nsame people; you can still rename it.","operationId":"edit_segment_route_v1_user_models__segment_id__patch","parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Segment Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditSegmentBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/simulation-schema":{"get":{"tags":["Simulation Schema"],"summary":"Discover goals and inputs","description":"Return a mode's goal list when `goal` is omitted, or a single goal's\ninput schema when `goal` is given. `mode` is `research` (User Research: questions\nanswered on a scale) or `journey` (User Journey: simulated users go through\na page or a flow).","operationId":"get_simulation_schema_v1_simulation_schema_get","parameters":[{"name":"mode","in":"query","required":true,"schema":{"type":"string","title":"Mode"}},{"name":"goal","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Goal"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/simulations":{"get":{"tags":["Simulations"],"summary":"List simulations","description":"List the caller's simulations, newest first. Optionally filter by status\nor by project_id (projects group related simulations).","operationId":"list_simulations_route_v1_simulations_get","parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Filter"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Simulations"],"summary":"Create a simulation","description":"Create a simulation from mode + goal + inputs + user_model_ids.\n\nReturns immediately in status `planning`; the plan is generated in the\nbackground. Poll `GET /v1/simulations/{id}` until status is `planned` or\n`failed`.\n\nWith project_id it joins round_id, or the project's latest round. Refused\nwith 409 while the agent in the app is replying on that project.","operationId":"create_simulation_route_v1_simulations_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSimulationBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/simulations/{simulation_id}":{"get":{"tags":["Simulations"],"summary":"Get a simulation","description":"Fetch a simulation by id. Poll it while the simulation plans and runs:\nit returns progress while running, and the synthesis, a Markdown report\nand the results once completed.","operationId":"get_simulation_route_v1_simulations__simulation_id__get","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Simulation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Simulations"],"summary":"Move a simulation into a project","description":"Move a simulation into a project. Allowed only when the simulation has no\nproject yet; it joins the project's latest round (a first round is created\nfor an empty project). Anything else returns 409.","operationId":"move_simulation_route_v1_simulations__simulation_id__patch","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Simulation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveSimulationBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Simulations"],"summary":"Delete a simulation","description":"Delete a simulation you own, with its plan and results. This cannot be\nundone and discards a run the user paid for, so only call it on the user's\nexplicit yes for this simulation. Refused with 409 while it is planning or\nrunning.","operationId":"delete_simulation_route_v1_simulations__simulation_id__delete","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Simulation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/simulations/{simulation_id}/plan":{"patch":{"tags":["Simulations"],"summary":"Edit the plan","description":"Edit the generated plan while the simulation is in status `planned`.\n\nEither replace the whole question set with `survey_questions`, or change\nparticular questions with `question_edits`, `add_questions` and\n`delete_question_ids`, not both in one call. A replace reissues every\nquestion id and the response says so with `question_ids_reissued`.","operationId":"update_plan_route_v1_simulations__simulation_id__plan_patch","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Simulation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlanBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/simulations/{simulation_id}/run":{"post":{"tags":["Simulations"],"summary":"Run a simulation","description":"Run a `planned` simulation. It moves to `running` and runs in the\nbackground, taking from a few minutes to around half an hour. Poll\n`GET /v1/simulations/{id}` until it is `completed` or `failed`.","operationId":"run_simulation_route_v1_simulations__simulation_id__run_post","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Simulation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/simulations/{simulation_id}/share":{"post":{"tags":["Simulations"],"summary":"Make a simulation public","description":"Make a simulation publicly viewable and return its shareable URL.","operationId":"share_simulation_route_v1_simulations__simulation_id__share_post","parameters":[{"name":"simulation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Simulation Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects":{"get":{"tags":["Projects"],"summary":"List projects","description":"List projects visible to the caller, most recently active first.","operationId":"list_projects_route_v1_projects_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Projects"],"summary":"Create a project","description":"Create a project. Create one first when you plan to run several related\nsimulations, then pass its id as project_id when creating simulations. Its\nsimulations plan against context_id, or your default context if none is\ngiven.","operationId":"create_project_route_v1_projects_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectBody","default":{}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}":{"get":{"tags":["Projects"],"summary":"Get a project","description":"Fetch a project with its rounds. Each round carries what it is testing\n(artefact_name, artefact_type), its simulations, and its synthesis with\nsynthesis_status (\"generating\", \"completed\" or \"failed\"), synthesis_error,\nand synthesis_stale: true when completed simulations in the round are not\nyet covered by the synthesis.","operationId":"get_project_route_v1_projects__project_id__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Projects"],"summary":"Rename a project","description":"Rename a project you own.","operationId":"rename_project_route_v1_projects__project_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameProjectBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/rounds":{"post":{"tags":["Rounds"],"summary":"Start a round","description":"Start a new round, optionally titled. Refused while the latest round has\nno simulations: use that one instead.","operationId":"start_round_route_v1_projects__project_id__rounds_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartRoundBody","default":{}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/rounds/{round_id}":{"patch":{"tags":["Rounds"],"summary":"Rename a round","description":"Set a round's title. A title you set is kept; the automatic one only\nnames rounds that have none.","operationId":"rename_round_route_v1_projects__project_id__rounds__round_id__patch","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"round_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Round Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameRoundBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/rounds/{round_id}/artefact":{"post":{"tags":["Rounds"],"summary":"Attach a round's artefact","description":"Attach what this round is testing, as pasted text (name + text) or a\nURL. It replaces any artefact the round already has. Attaching only stores\nit: nothing is planned from it.","operationId":"attach_artefact_route_v1_projects__project_id__rounds__round_id__artefact_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"round_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Round Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachArtefactBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/rounds/{round_id}/artefact/file":{"post":{"tags":["Rounds"],"summary":"Upload a round's artefact","description":"Attach a document as what this round is testing. It replaces any\nartefact the round already has. Attaching only stores it: nothing is\nplanned from it.","operationId":"upload_artefact_route_v1_projects__project_id__rounds__round_id__artefact_file_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"round_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Round Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_artefact_route_v1_projects__project_id__rounds__round_id__artefact_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/projects/{project_id}/rounds/{round_id}/synthesis":{"post":{"tags":["Rounds"],"summary":"Regenerate a round's synthesis","description":"Rewrite the round's synthesis from every completed simulation in it.\nIt runs in the background: poll the project until synthesis_status is no\nlonger \"generating\". This replaces the synthesis entirely, including any\nedits made to it in the web app.","operationId":"regenerate_synthesis_route_v1_projects__project_id__rounds__round_id__synthesis_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Project Id"}},{"name":"round_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Round Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/context":{"get":{"tags":["Context"],"summary":"Get your default context","description":"Return the context new work is planned against when none is chosen: your\nmost recently updated one, else your organisation's. Returns\n{has_context: false} when there is none at all.","operationId":"get_context_route_v1_context_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contexts":{"get":{"tags":["Context"],"summary":"List contexts","description":"List the written contexts you can plan against, yours and your\norganisation's, most recently updated first. Pass an id as context_id when\ncreating a project or simulation to plan against it.","operationId":"list_contexts_route_v1_contexts_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Context"],"summary":"Create a context","description":"Create a context from a name and its text. It is attached to every\nsimulation planned against it, so simulation inputs need not repeat it.","operationId":"create_context_route_v1_contexts_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContextBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contexts/{context_id}":{"get":{"tags":["Context"],"summary":"Get a context","description":"Fetch one context with its full text.","operationId":"get_context_by_id_route_v1_contexts__context_id__get","parameters":[{"name":"context_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Context Id"}},{"name":"authorization","in":"header","required":false,"schema":{"type":"string","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AttachArtefactBody":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"A name for pasted text, e.g. 'Pricing page v2'"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"The artefact as pasted text"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A page to read the artefact from"}},"type":"object","title":"AttachArtefactBody"},"Body_upload_artefact_route_v1_projects__project_id__rounds__round_id__artefact_file_post":{"properties":{"file":{"type":"string","format":"binary","title":"File","description":"A pdf, docx, md or txt file, 10 MB max"}},"type":"object","required":["file"],"title":"Body_upload_artefact_route_v1_projects__project_id__rounds__round_id__artefact_file_post"},"CreateContextBody":{"properties":{"name":{"type":"string","title":"Name","description":"A short name, e.g. the product's name"},"body":{"type":"string","title":"Body","description":"Markdown describing the organisation or product: what it is, who uses it, what it competes with, how it is priced"}},"type":"object","required":["name","body"],"title":"CreateContextBody"},"CreateProjectBody":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional project name; defaults to 'New project'"},"context_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Context Id","description":"Context the project's simulations plan against (from /v1/contexts). Defaults to your most recently updated context, else your organisation's."}},"type":"object","title":"CreateProjectBody"},"CreateSegmentBody":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"A short name, e.g. 'Londoners 45-64'"},"description":{"type":"string","maxLength":2000,"title":"Description","default":""},"filters":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object","title":"Filters","description":"Each attribute mapped to the values to keep, using exact values from /v1/user-models/{id}/attributes, e.g. {\"age\": [\"45-54\", \"55-64\"], \"location\": [\"london\"]}. A simulated user is in the segment when their value is one of the listed values for every attribute given."}},"type":"object","required":["name","filters"],"title":"CreateSegmentBody"},"CreateSimulationBody":{"properties":{"mode":{"type":"string","title":"Mode","description":"'research' or 'journey'"},"goal":{"type":"string","title":"Goal","description":"Goal id within the mode (from /v1/simulation-schema)"},"inputs":{"additionalProperties":true,"type":"object","title":"Inputs","description":"Answers keyed by the goal's input ids (from /v1/simulation-schema)"},"user_model_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"User Model Ids","description":"One or more user-model ids to simulate against"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"A name for the simulation. Leave it out and it is named from what it asks."},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id","description":"Optional project to add this simulation to; it joins the project's latest round (round 1 is created if none exists)"},"survey_design":{"anyOf":[{"$ref":"#/components/schemas/SurveyDesign"},{"type":"null"}],"description":"Research mode only. Fixes which questions are asked: one per item in each item set plus one per custom question. The question writer only words them. Leave out to let it decide what to ask. A malformed survey_design is a 422 like any other malformed field; a well-formed one that cannot be used (journey mode, nothing to ask, too many questions) is a 400."},"context_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Context Id","description":"Context to plan against (from /v1/contexts). Defaults to your most recently updated context, else your organisation's. A simulation in a project plans against the project's context, so leave this out when passing project_id unless it names that same context."},"round_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Round Id","description":"Round of project_id to put this simulation in. Defaults to the project's latest round."}},"type":"object","required":["mode","goal","user_model_ids"],"title":"CreateSimulationBody"},"DesignCustomQuestion":{"properties":{"question_text":{"type":"string","minLength":1,"title":"Question Text","description":"The question, asked exactly as written. Respondents see only this text, so name what it asks about: 'Would you pay £45 a week for this meal kit?', not 'Would you buy this?'."},"answer_options":{"anyOf":[{"items":{"type":"string","minLength":1},"type":"array","maxItems":10,"minItems":2},{"type":"null"}],"title":"Answer Options","description":"Answer options, used exactly as given. Leave out to let the question writer supply them."}},"additionalProperties":false,"type":"object","required":["question_text"],"title":"DesignCustomQuestion"},"DesignItemSet":{"properties":{"ask":{"type":"string","minLength":1,"title":"Ask","description":"What is asked about every item in the set, e.g. 'How valuable would this feature be to you?'"},"items":{"items":{"type":"string","minLength":1},"type":"array","minItems":2,"title":"Items","description":"The things being compared. Each one gets its own question."},"scale":{"anyOf":[{"items":{"type":"string","minLength":1},"type":"array","maxItems":7,"minItems":2},{"type":"null"}],"title":"Scale","description":"Answer labels every question in the set uses, ordered from least to most favourable. Leave out to let the question writer pick one scale for the whole set."}},"additionalProperties":false,"type":"object","required":["ask","items"],"title":"DesignItemSet"},"EditSegmentBody":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"filters":{"anyOf":[{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},{"type":"null"}],"title":"Filters","description":"Replaces the segment's filters whole. Leave it out to keep them. Locked once a simulation has used the segment."}},"type":"object","title":"EditSegmentBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MoveSimulationBody":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project to move this simulation into. Only allowed when the simulation has no project yet; it joins the project's latest round."}},"type":"object","required":["project_id"],"title":"MoveSimulationBody"},"QuestionEditIn":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"The question's id, from `GET /v1/simulations/{id}`"},"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text","description":"The question, asked exactly as written"},"question_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Type","description":"How the question is answered: 'single_choice' picks one of answer_options"},"answer_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Answer Options","description":"The answers to choose from, in order, e.g. from 'Very unlikely' to 'Very likely'"},"insight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insight","description":"What the answers to this question tell you"},"variable_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable Name","description":"A short snake_case name for the question, e.g. 'likelihood_to_switch'"},"order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order","description":"The question's position in the plan, from 0"},"question_text_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text Local","description":"The question in the user model's own language, for a non-English user model. This is what respondents are asked; the English is kept alongside. Sent without question_text, the English is translated from it."},"answer_options_local":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Answer Options Local","description":"The answer options in the user model's own language, in the same order and the same count as answer_options."}},"type":"object","required":["id"],"title":"QuestionEditIn"},"RenameProjectBody":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"The project's new name"}},"type":"object","required":["name"],"title":"RenameProjectBody"},"RenameRoundBody":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title","description":"The round's new title, e.g. 'Pricing page v2'"}},"type":"object","required":["title"],"title":"RenameRoundBody"},"StartRoundBody":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"What the round is testing. Leave it out and the round is named from its simulations."}},"type":"object","title":"StartRoundBody"},"SurveyDesign":{"properties":{"stimulus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stimulus","description":"What is being tested: a concept, a message, a price. The question writer states it in every item set question. Custom questions are used as written and do not get it added."},"item_sets":{"items":{"$ref":"#/components/schemas/DesignItemSet"},"type":"array","title":"Item Sets","description":"Groups of items that each get their own question on one shared scale, so the items can be compared with each other."},"custom_questions":{"items":{"$ref":"#/components/schemas/DesignCustomQuestion"},"type":"array","title":"Custom Questions","description":"Individual questions asked as written."}},"additionalProperties":false,"type":"object","title":"SurveyDesign"},"SurveyQuestionIn":{"properties":{"question_text":{"type":"string","title":"Question Text","description":"The question, asked exactly as written"},"question_type":{"type":"string","title":"Question Type","description":"How the question is answered: 'single_choice' picks one of answer_options","default":"single_choice"},"answer_options":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Answer Options","description":"The answers to choose from, in order, e.g. from 'Very unlikely' to 'Very likely'"},"insight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insight","description":"What the answers to this question tell you"},"variable_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Variable Name","description":"A short snake_case name for the question, e.g. 'likelihood_to_switch'"},"question_text_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text Local","description":"The question in the user model's own language, for a non-English user model. This is what respondents are asked; the English is kept alongside."},"answer_options_local":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Answer Options Local","description":"The answer options in the user model's own language, in the same order and the same count as answer_options."}},"type":"object","required":["question_text"],"title":"SurveyQuestionIn"},"UpdatePlanBody":{"properties":{"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text","description":"The simulation's title"},"hypothesis_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hypothesis Text","description":"What you expect the answers to show"},"survey_questions":{"anyOf":[{"items":{"$ref":"#/components/schemas/SurveyQuestionIn"},"type":"array"},{"type":"null"}],"title":"Survey Questions","description":"Replaces the whole question set. Every question gets a new id, so ids from an earlier read are stale afterwards. Cannot be combined with question_edits, add_questions or delete_question_ids."},"question_edits":{"anyOf":[{"items":{"$ref":"#/components/schemas/QuestionEditIn"},"type":"array"},{"type":"null"}],"title":"Question Edits","description":"Change particular questions by id. Only the fields sent change; every other question keeps its id."},"add_questions":{"anyOf":[{"items":{"$ref":"#/components/schemas/SurveyQuestionIn"},"type":"array"},{"type":"null"}],"title":"Add Questions","description":"Questions appended after the existing ones."},"delete_question_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Delete Question Ids","description":"Ids of questions to delete."},"journey_task":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Journey Task","description":"Replaces the journey task. Its shape depends on the goal: see journey_task_shape on the goal in /v1/simulation-schema."}},"type":"object","title":"UpdatePlanBody"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"Simulations","description":"A simulation asks one or more user models questions (User Research) or sends their simulated users through a page or a flow (User Journey). It is planned first, then run once you have checked the plan."},{"name":"Projects","description":"A project groups the simulations about one piece of work, split into rounds."},{"name":"Rounds","description":"A round is one version of what you are testing: the document, page or file it tests, its simulations, and one synthesis across them."},{"name":"Context","description":"Your context is the background on your company or product that every simulation is planned against."},{"name":"User Models","description":"A user model is a simulated version of a specific group of people, built from real human data. Every simulation runs against one or more. A segment is a user model cut from another by its simulated users' attributes."},{"name":"Simulation Schema","description":"The goals each kind of simulation offers, and what each goal needs from you."}],"security":[{"BearerAuth":[]}]}