{
    "openapi": "3.1.0",
    "info": {
        "title": "undrstand API",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https:\/\/api.undrstand.com\/api"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/correlations\/{correlation}": {
            "patch": {
                "operationId": "correlations.update",
                "tags": [
                    "Correlations"
                ],
                "parameters": [
                    {
                        "name": "correlation",
                        "in": "path",
                        "required": true,
                        "description": "The correlation UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/CorrelationUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`CorrelationResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/CorrelationResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/documents": {
            "get": {
                "operationId": "documents.index",
                "tags": [
                    "Documents"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 1000
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "maxLength": 255
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `DocumentResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/DocumentResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            },
            "post": {
                "operationId": "documents.store",
                "tags": [
                    "Documents"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/DocumentStoreRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "`DocumentResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/DocumentResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/documents\/{document}": {
            "get": {
                "operationId": "documents.show",
                "tags": [
                    "Documents"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`DocumentResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/DocumentResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "segments"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "delete": {
                "operationId": "documents.destroy",
                "tags": [
                    "Documents"
                ],
                "parameters": [
                    {
                        "name": "document",
                        "in": "path",
                        "required": true,
                        "description": "The document UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "204": {
                        "description": "No content"
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/measurements": {
            "get": {
                "operationId": "measurements.index",
                "tags": [
                    "Measurements"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "metrics[]",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "array",
                            "items": {
                                "$ref": "#\/components\/schemas\/Metric"
                            }
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `MeasurementResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/MeasurementResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/observations": {
            "get": {
                "operationId": "observations.index",
                "tags": [
                    "Observations"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 1000
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `ObservationResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ObservationResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/observations\/{observation}": {
            "get": {
                "operationId": "observations.show",
                "tags": [
                    "Observations"
                ],
                "parameters": [
                    {
                        "name": "observation",
                        "in": "path",
                        "required": true,
                        "description": "The observation UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`ObservationResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/ObservationResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/patterns": {
            "get": {
                "operationId": "patterns.index",
                "tags": [
                    "Patterns"
                ],
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 1000
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Paginated set of `PatternResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/PatternResource"
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "prev": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last",
                                                "prev",
                                                "next"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "from": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "minimum": 1
                                                },
                                                "last_page": {
                                                    "type": "integer",
                                                    "minimum": 1
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "description": "Generated paginator links.",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ],
                                                    "description": "Base path for paginator generated URLs."
                                                },
                                                "per_page": {
                                                    "type": "integer",
                                                    "description": "Number of items shown per page.",
                                                    "minimum": 0
                                                },
                                                "to": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ],
                                                    "description": "Number of the last item in the slice.",
                                                    "minimum": 1
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "description": "Total number of items being paginated.",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/patterns\/{pattern}": {
            "get": {
                "operationId": "patterns.show",
                "tags": [
                    "Patterns"
                ],
                "parameters": [
                    {
                        "name": "pattern",
                        "in": "path",
                        "required": true,
                        "description": "The pattern UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`PatternResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/PatternResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "documents",
                                                        "correlations",
                                                        "flows",
                                                        "triggers"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            },
            "patch": {
                "operationId": "patterns.update",
                "tags": [
                    "Patterns"
                ],
                "parameters": [
                    {
                        "name": "pattern",
                        "in": "path",
                        "required": true,
                        "description": "The pattern UUID",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/PatternUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "`PatternResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "allOf": [
                                                {
                                                    "$ref": "#\/components\/schemas\/PatternResource"
                                                },
                                                {
                                                    "type": "object",
                                                    "required": [
                                                        "documents",
                                                        "correlations",
                                                        "flows",
                                                        "triggers"
                                                    ]
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "404": {
                        "$ref": "#\/components\/responses\/ModelNotFoundException"
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    },
                    "403": {
                        "$ref": "#\/components\/responses\/AuthorizationException"
                    }
                }
            }
        },
        "\/search": {
            "get": {
                "operationId": "search.index",
                "tags": [
                    "Search"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "maxLength": 1000
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "format": "date"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": [
                                "integer",
                                "null"
                            ],
                            "minimum": 1,
                            "maximum": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `SearchHitResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/SearchHitResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/timeline": {
            "get": {
                "operationId": "timeline.index",
                "tags": [
                    "Timeline"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Array of `TimelineDayResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/TimelineDayResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/settings\/me": {
            "get": {
                "operationId": "userSettings.index",
                "tags": [
                    "UserSettings"
                ],
                "responses": {
                    "200": {
                        "description": "Array of `SettingResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/SettingResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "put": {
                "operationId": "userSettingsBulk.update",
                "tags": [
                    "UserSettingsBulk"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UserSettingBulkUpdateRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Array of `SettingResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/SettingResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/settings\/me\/{key}": {
            "put": {
                "operationId": "userSettings.update",
                "summary": "One setting, named by the client, with create-or-update semantics: the web\napplication changes one at a time. The bulk controller is what the mobile\napp writes with",
                "tags": [
                    "UserSettings"
                ],
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "`SettingResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SettingResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "CorrelationResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "tag": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "type": {
                                "$ref": "#\/components\/schemas\/TagType"
                            },
                            "name": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "id",
                            "type",
                            "name"
                        ]
                    },
                    "impact": {
                        "$ref": "#\/components\/schemas\/Impact"
                    },
                    "amount": {
                        "type": "integer"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/CorrelationStatus"
                    }
                },
                "required": [
                    "id",
                    "tag",
                    "impact",
                    "amount",
                    "status"
                ],
                "title": "CorrelationResource"
            },
            "CorrelationStatus": {
                "type": "string",
                "description": "Whether the user has reviewed a correlation. Detected is what counting found; accepted and rejected are the user's word. A rejected one is never counted again.\n",
                "enum": [
                    "detected",
                    "accepted",
                    "rejected"
                ],
                "title": "CorrelationStatus"
            },
            "CorrelationUpdateRequest": {
                "type": "object",
                "description": "The user's review of a correlation: accepted or rejected. Detected is\nwhat counting says, never what a client may set.",
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": [
                            "accepted",
                            "rejected"
                        ]
                    }
                },
                "required": [
                    "status"
                ],
                "title": "CorrelationUpdateRequest"
            },
            "DocumentOrigin": {
                "type": "string",
                "description": "Where a document's text came from. Each origin is an ingestion adapter that turns its source into `original`; only raw text exists so far.\n",
                "enum": [
                    "text"
                ],
                "title": "DocumentOrigin"
            },
            "DocumentResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "original": {
                        "type": "string"
                    },
                    "excerpt": {
                        "type": "string"
                    },
                    "translated": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "language": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "origin": {
                        "$ref": "#\/components\/schemas\/DocumentOrigin"
                    },
                    "source": {
                        "anyOf": [
                            {
                                "type": "null"
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "const": "oauth"
                                    },
                                    "id": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "type",
                                    "id",
                                    "name"
                                ]
                            },
                            {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string"
                                    },
                                    "id": {
                                        "type": "string"
                                    },
                                    "name": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "type",
                                    "id",
                                    "name"
                                ]
                            }
                        ]
                    },
                    "occurred_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/DocumentStatus"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "segments": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/SegmentResource"
                        }
                    }
                },
                "required": [
                    "id",
                    "original",
                    "translated",
                    "language",
                    "origin",
                    "source",
                    "occurred_at",
                    "status",
                    "created_at"
                ],
                "title": "DocumentResource"
            },
            "DocumentStatus": {
                "type": "string",
                "description": "Where a document is in the pipeline. A client posts text, then polls this until it is `processed` and the segments are there to read.\n",
                "enum": [
                    "waiting",
                    "queued",
                    "processing",
                    "processed",
                    "failed"
                ],
                "title": "DocumentStatus"
            },
            "DocumentStoreRequest": {
                "type": "object",
                "properties": {
                    "original": {
                        "type": "string",
                        "maxLength": 50000
                    },
                    "occurred_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "app": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    }
                },
                "required": [
                    "original"
                ],
                "title": "DocumentStoreRequest"
            },
            "DocumentSummaryResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "occurred_at": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "status",
                    "occurred_at"
                ],
                "title": "DocumentSummaryResource"
            },
            "DocumentTagResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "type": {
                        "$ref": "#\/components\/schemas\/TagType"
                    },
                    "name": {
                        "type": "string"
                    },
                    "category": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "type",
                    "name",
                    "category"
                ],
                "title": "DocumentTagResource"
            },
            "FlowResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "segment_id": {
                        "type": "string"
                    },
                    "trigger": {
                        "type": "string"
                    },
                    "feeling": {
                        "type": "string"
                    },
                    "behaviour": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "segment_id",
                    "trigger",
                    "feeling",
                    "behaviour"
                ],
                "title": "FlowResource"
            },
            "Impact": {
                "type": "string",
                "description": "How often a pattern shows up: the weight of its combination against the detection thresholds. Low is \"sometimes\", moderate \"regularly\", high \"often\".\n",
                "enum": [
                    "low",
                    "moderate",
                    "high"
                ],
                "title": "Impact"
            },
            "MeasurementResource": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string"
                    },
                    "metric": {
                        "type": "string"
                    },
                    "value": {
                        "type": "number"
                    },
                    "unit": {
                        "type": "string",
                        "enum": [
                            "minutes",
                            "percent",
                            "ms",
                            "bpm",
                            "score",
                            "count"
                        ]
                    },
                    "provider": {
                        "type": "string"
                    }
                },
                "required": [
                    "date",
                    "metric",
                    "value",
                    "unit",
                    "provider"
                ],
                "title": "MeasurementResource"
            },
            "Metric": {
                "type": "string",
                "description": "What a wearable measured, in undrstand's own names (docs\/plan.md \u00a720). Each is one value per day: a night's sleep counts for the morning it ends. A provider fills the ones it knows.\n",
                "enum": [
                    "sleep_duration",
                    "sleep_efficiency",
                    "hrv",
                    "resting_heart_rate",
                    "readiness",
                    "strain",
                    "steps"
                ],
                "title": "Metric"
            },
            "ObservationKind": {
                "type": "string",
                "description": "What an observation is about: the things a look looks for (docs\/plan.md \u00a722).\n",
                "enum": [
                    "pattern",
                    "return",
                    "correlation",
                    "body",
                    "progress",
                    "echo",
                    "look_back",
                    "silence",
                    "opening"
                ],
                "title": "ObservationKind"
            },
            "ObservationReaction": {
                "type": "string",
                "description": "What the person made of an observation.\n",
                "enum": [
                    "useful",
                    "not_useful"
                ],
                "title": "ObservationReaction"
            },
            "ObservationResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "kind": {
                        "$ref": "#\/components\/schemas\/ObservationKind"
                    },
                    "notice": {
                        "type": "string"
                    },
                    "body": {
                        "type": "string"
                    },
                    "subjects": {
                        "type": "object",
                        "properties": {
                            "patterns": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            },
                            "documents": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        "required": [
                            "patterns",
                            "documents"
                        ]
                    },
                    "trigger": {
                        "$ref": "#\/components\/schemas\/ObservationTrigger"
                    },
                    "conversation_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "reaction": {
                        "anyOf": [
                            {
                                "$ref": "#\/components\/schemas\/ObservationReaction"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "kind",
                    "notice",
                    "body",
                    "subjects",
                    "trigger",
                    "conversation_id",
                    "reaction",
                    "created_at"
                ],
                "title": "ObservationResource"
            },
            "ObservationTrigger": {
                "type": "string",
                "description": "What set off the look an observation came out of.\n",
                "enum": [
                    "document",
                    "morning",
                    "opened"
                ],
                "title": "ObservationTrigger"
            },
            "PatternResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "locked": {
                        "type": "boolean"
                    },
                    "name": {
                        "type": "string"
                    },
                    "sentiment": {
                        "$ref": "#\/components\/schemas\/Sentiment"
                    },
                    "impact": {
                        "$ref": "#\/components\/schemas\/Impact"
                    },
                    "urgent": {
                        "type": "boolean"
                    },
                    "status": {
                        "$ref": "#\/components\/schemas\/PatternStatus"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "feelings": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "name"
                            ]
                        }
                    },
                    "documents_count": {
                        "type": "integer",
                        "description": "Every loader counts them (PatternService); no fallback query here."
                    },
                    "last_detected_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "closed_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    },
                    "documents": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/DocumentSummaryResource"
                        }
                    },
                    "correlations": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/CorrelationResource"
                        }
                    },
                    "flows": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/FlowResource"
                        }
                    },
                    "triggers": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "name": {
                                    "type": "string"
                                },
                                "count": {
                                    "type": "integer"
                                },
                                "feelings": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "name": {
                                                "type": "string"
                                            },
                                            "count": {
                                                "type": "integer"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "name",
                                            "count"
                                        ]
                                    }
                                }
                            },
                            "required": [
                                "id",
                                "name",
                                "count",
                                "feelings"
                            ]
                        }
                    },
                    "correlations_count": {
                        "type": "integer"
                    },
                    "flows_count": {
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "locked",
                    "name",
                    "sentiment",
                    "impact",
                    "urgent",
                    "status",
                    "documents_count",
                    "last_detected_at",
                    "closed_at",
                    "created_at"
                ],
                "title": "PatternResource"
            },
            "PatternStatus": {
                "type": "string",
                "description": "What the user has said about a pattern. Detected until they review it; a rejected pattern is never detected again and its category is kept out of extraction.\n",
                "enum": [
                    "detected",
                    "accepted",
                    "rejected"
                ],
                "title": "PatternStatus"
            },
            "PatternSummaryResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "locked": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "sentiment": {
                        "type": "string"
                    },
                    "impact": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "locked",
                    "name",
                    "sentiment",
                    "impact"
                ],
                "title": "PatternSummaryResource"
            },
            "PatternUpdateRequest": {
                "type": "object",
                "description": "The user's review of a pattern: accepted or rejected. Detected is what\nthe analysis says, never what a client may set.",
                "properties": {
                    "status": {
                        "type": "string",
                        "enum": [
                            "accepted",
                            "rejected"
                        ]
                    }
                },
                "required": [
                    "status"
                ],
                "title": "PatternUpdateRequest"
            },
            "SearchHitResource": {
                "type": "object",
                "properties": {
                    "similarity": {
                        "type": "string"
                    },
                    "segment": {
                        "$ref": "#\/components\/schemas\/SegmentResource"
                    },
                    "document": {
                        "$ref": "#\/components\/schemas\/DocumentSummaryResource"
                    },
                    "patterns": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/PatternSummaryResource"
                        }
                    },
                    "flows": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/FlowResource"
                        }
                    }
                },
                "required": [
                    "similarity",
                    "segment",
                    "document",
                    "patterns",
                    "flows"
                ],
                "title": "SearchHitResource"
            },
            "SegmentResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "position": {
                        "type": "integer"
                    },
                    "text": {
                        "type": "string"
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/DocumentTagResource"
                        }
                    }
                },
                "required": [
                    "id",
                    "position",
                    "text"
                ],
                "title": "SegmentResource"
            },
            "Sentiment": {
                "type": "string",
                "enum": [
                    "positive",
                    "negative"
                ],
                "title": "Sentiment"
            },
            "SettingResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "type": {},
                    "value": {},
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "date-time"
                    }
                },
                "required": [
                    "id",
                    "type",
                    "value",
                    "created_at"
                ],
                "title": "SettingResource"
            },
            "TagType": {
                "type": "string",
                "description": "What a tag is. The three the engine counts on (trigger, feeling, behaviour) are the method-neutral shape every method reads; the rest give a pattern its context. Fixed: user-defined types are out of v1.\n",
                "enum": [
                    "trigger",
                    "positive_feeling",
                    "negative_feeling",
                    "good_behaviour",
                    "bad_behaviour",
                    "person",
                    "location",
                    "activity"
                ],
                "title": "TagType"
            },
            "TimelineDayResource": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string"
                    },
                    "documents": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/DocumentSummaryResource"
                        }
                    },
                    "patterns": {
                        "type": "array",
                        "items": {
                            "$ref": "#\/components\/schemas\/PatternSummaryResource"
                        }
                    }
                },
                "required": [
                    "date",
                    "documents",
                    "patterns"
                ],
                "title": "TimelineDayResource"
            },
            "UserSettingBulkUpdateRequest": {
                "type": "object",
                "properties": {
                    "timezone": {
                        "type": "string"
                    },
                    "app_locale": {
                        "type": "string",
                        "enum": [
                            "en",
                            "nl"
                        ]
                    },
                    "send_app_reminder_notifications": {
                        "type": "boolean"
                    },
                    "observer": {
                        "type": "boolean"
                    },
                    "send_observation_notifications": {
                        "type": "boolean"
                    },
                    "send_app_update_notifications": {
                        "type": "boolean"
                    },
                    "send_credit_notifications": {
                        "type": "boolean"
                    },
                    "observer_sound": {
                        "type": "boolean"
                    },
                    "observer_sound_on_silent": {
                        "type": "boolean"
                    },
                    "ai_consent": {
                        "type": "boolean"
                    },
                    "app_last_used_or_dismissed_at": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "audience": {
                        "type": "string",
                        "enum": [
                            "user",
                            "seller"
                        ]
                    },
                    "start_screen": {
                        "type": "string",
                        "enum": [
                            "mindspace",
                            "share",
                            "insights"
                        ]
                    },
                    "observer_sound_board": {
                        "type": "string",
                        "enum": [
                            "breath",
                            "soft",
                            "sunny",
                            "glass",
                            "deep"
                        ]
                    },
                    "triggered_reminder_time": {
                        "type": "string"
                    },
                    "document_app": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    },
                    "document_overview_app": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uuid"
                    }
                },
                "title": "UserSettingBulkUpdateRequest"
            }
        },
        "responses": {
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "ModelNotFoundException": {
                "description": "Not found",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            },
            "AuthorizationException": {
                "description": "Authorization error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}