{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0.0",
    "title": "DigitalBox Ask Write API"
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "requestBodies": {
      "CreateTemplate": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "title",
                "categoryId",
                "ownerId",
                "availableTo",
                "items"
              ],
              "additionalProperties": false,
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "categoryId": {
                  "type": "string",
                  "enum": [
                    "tax",
                    "finance",
                    "social_security",
                    "accounting",
                    "contract",
                    "corporate",
                    "tax_relief",
                    "other"
                  ]
                },
                "ownerId": {
                  "type": "string",
                  "format": "uuid"
                },
                "availableTo": {
                  "type": "string",
                  "enum": [
                    "owner",
                    "managed"
                  ]
                },
                "items": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 50,
                  "items": {
                    "oneOf": [
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "isRequired"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "input"
                            ]
                          },
                          "format": {
                            "type": "string",
                            "enum": [
                              "text",
                              "number",
                              "date",
                              "currency"
                            ],
                            "nullable": true
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "hint": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "nullable": true
                          },
                          "isRequired": {
                            "type": "boolean"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "isRequired"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "file"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "hint": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "nullable": true
                          },
                          "isRequired": {
                            "type": "boolean"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "isRequired"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "boolean"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "hint": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "nullable": true
                          },
                          "isRequired": {
                            "type": "boolean"
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "isRequired",
                          "choices"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "radio"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "hint": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "nullable": true
                          },
                          "isRequired": {
                            "type": "boolean"
                          },
                          "choices": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "minItems": 1,
                            "maxItems": 10
                          }
                        }
                      },
                      {
                        "type": "object",
                        "required": [
                          "type",
                          "label",
                          "isRequired",
                          "choices"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "checkbox"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255
                          },
                          "hint": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 255,
                            "nullable": true
                          },
                          "isRequired": {
                            "type": "boolean"
                          },
                          "choices": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "minItems": 1,
                            "maxItems": 10
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      },
      "CreateSurvey": {
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "type": "object",
                  "required": [
                    "templateId",
                    "requesterId",
                    "recipients"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "templateId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "requesterId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "recipients": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 100,
                      "items": {
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    }
                  }
                },
                {
                  "type": "object",
                  "required": [
                    "template",
                    "requesterId",
                    "recipients"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "requesterId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "recipients": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 100,
                      "items": {
                        "type": "object",
                        "required": [
                          "id"
                        ],
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          }
                        }
                      }
                    },
                    "template": {
                      "type": "object",
                      "required": [
                        "title",
                        "categoryId",
                        "items"
                      ],
                      "additionalProperties": false,
                      "properties": {
                        "title": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "categoryId": {
                          "type": "string",
                          "enum": [
                            "tax",
                            "finance",
                            "social_security",
                            "accounting",
                            "contract",
                            "corporate",
                            "tax_relief",
                            "other"
                          ]
                        },
                        "items": {
                          "type": "array",
                          "minItems": 1,
                          "maxItems": 50,
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "label",
                                  "isRequired"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "input"
                                    ]
                                  },
                                  "format": {
                                    "type": "string",
                                    "enum": [
                                      "text",
                                      "number",
                                      "date",
                                      "currency"
                                    ],
                                    "nullable": true
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "hint": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255,
                                    "nullable": true
                                  },
                                  "isRequired": {
                                    "type": "boolean"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "label",
                                  "isRequired"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "file"
                                    ]
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "hint": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255,
                                    "nullable": true
                                  },
                                  "isRequired": {
                                    "type": "boolean"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "label",
                                  "isRequired"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "boolean"
                                    ]
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "hint": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255,
                                    "nullable": true
                                  },
                                  "isRequired": {
                                    "type": "boolean"
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "label",
                                  "isRequired",
                                  "choices"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "radio"
                                    ]
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "hint": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255,
                                    "nullable": true
                                  },
                                  "isRequired": {
                                    "type": "boolean"
                                  },
                                  "choices": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "minItems": 1,
                                    "maxItems": 10
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "required": [
                                  "type",
                                  "label",
                                  "isRequired",
                                  "choices"
                                ],
                                "additionalProperties": false,
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "checkbox"
                                    ]
                                  },
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255
                                  },
                                  "hint": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 255,
                                    "nullable": true
                                  },
                                  "isRequired": {
                                    "type": "boolean"
                                  },
                                  "choices": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    },
                                    "minItems": 1,
                                    "maxItems": 10
                                  }
                                }
                              }
                            ]
                          }
                        }
                      }
                    },
                    "draftId": {
                      "type": "string",
                      "format": "uuid"
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "CreateAnswer": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "templateId",
                "requesterId",
                "recipientId",
                "isCompleted",
                "items"
              ],
              "additionalProperties": true,
              "properties": {
                "templateId": {
                  "type": "string",
                  "format": "uuid"
                },
                "requesterId": {
                  "type": "string",
                  "format": "uuid"
                },
                "recipientId": {
                  "type": "string",
                  "format": "uuid"
                },
                "isCompleted": {
                  "type": "boolean"
                },
                "items": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 50,
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      },
      "CreateDraft": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "template",
                "requesterId"
              ],
              "additionalProperties": false,
              "properties": {
                "requesterId": {
                  "type": "string",
                  "format": "uuid"
                },
                "recipients": {
                  "type": "array",
                  "maxItems": 100,
                  "items": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                },
                "template": {
                  "type": "object",
                  "required": [
                    "title",
                    "categoryId",
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "categoryId": {
                      "type": "string",
                      "enum": [
                        "tax",
                        "finance",
                        "social_security",
                        "accounting",
                        "contract",
                        "corporate",
                        "tax_relief",
                        "other"
                      ]
                    },
                    "availableTo": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "managed"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 50,
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "input"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "number",
                                  "date",
                                  "currency"
                                ],
                                "nullable": true
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "file"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "boolean"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired",
                              "choices"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "radio"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "choices": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "minItems": 1,
                                "maxItems": 10
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired",
                              "choices"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "checkbox"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "choices": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "minItems": 1,
                                "maxItems": 10
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "UpdateAnswer": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "recipientId",
                "isCompleted",
                "items"
              ],
              "additionalProperties": true,
              "properties": {
                "recipientId": {
                  "type": "string",
                  "format": "uuid"
                },
                "isCompleted": {
                  "type": "boolean"
                },
                "items": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 50,
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      },
      "UpdateDraft": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "template",
                "requesterId"
              ],
              "additionalProperties": false,
              "properties": {
                "requesterId": {
                  "type": "string",
                  "format": "uuid"
                },
                "recipients": {
                  "type": "array",
                  "maxItems": 100,
                  "items": {
                    "type": "object",
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uuid"
                      }
                    }
                  }
                },
                "template": {
                  "type": "object",
                  "required": [
                    "title",
                    "categoryId",
                    "items"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "title": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "categoryId": {
                      "type": "string",
                      "enum": [
                        "tax",
                        "finance",
                        "social_security",
                        "accounting",
                        "contract",
                        "corporate",
                        "tax_relief",
                        "other"
                      ]
                    },
                    "availableTo": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "managed"
                      ]
                    },
                    "items": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 50,
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "input"
                                ]
                              },
                              "format": {
                                "type": "string",
                                "enum": [
                                  "text",
                                  "number",
                                  "date",
                                  "currency"
                                ],
                                "nullable": true
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "file"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "boolean"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired",
                              "choices"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "radio"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "choices": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "minItems": 1,
                                "maxItems": 10
                              }
                            }
                          },
                          {
                            "type": "object",
                            "required": [
                              "type",
                              "label",
                              "isRequired",
                              "choices"
                            ],
                            "additionalProperties": false,
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "checkbox"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255
                              },
                              "hint": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 255,
                                "nullable": true
                              },
                              "isRequired": {
                                "type": "boolean"
                              },
                              "choices": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "minItems": 1,
                                "maxItems": 10
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ViewedProperty": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "itemId",
                "isViewed"
              ],
              "additionalProperties": true,
              "properties": {
                "itemId": {
                  "type": "string",
                  "format": "uuid",
                  "description": "TS Digital item id that is updating the attribute"
                },
                "isViewed": {
                  "type": "boolean",
                  "description": "Viewed property value"
                }
              }
            }
          }
        }
      },
      "UploadToDbox": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "recipientId",
                "senderId",
                "partitaIva",
                "codiceFiscale"
              ],
              "additionalProperties": false,
              "properties": {
                "destination": {
                  "type": "string",
                  "description": "Identifier of document destination"
                },
                "recipientId": {
                  "type": "string",
                  "description": "Identifier of recipient"
                },
                "senderId": {
                  "type": "string",
                  "description": "Identifier of sender"
                },
                "partitaIva": {
                  "type": "string",
                  "description": ""
                },
                "codiceFiscale": {
                  "type": "string",
                  "description": ""
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  },
  "paths": {
    "/answers": {
      "post": {
        "description": "Create a new answer from a shared template",
        "parameters": [
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateAnswer"
        },
        "responses": {
          "202": {
            "description": "Create answer request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/answers/{id}": {
      "put": {
        "description": "Update an answer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Answer id to update",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateAnswer"
        },
        "responses": {
          "202": {
            "description": "Update answer request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Read only. Modification rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Delete an existing answer",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Answer id to delete",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Answer delete request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Answer identifier."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/answers/{id}/viewed": {
      "patch": {
        "description": "Set answer 'viewed' property",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Answer id to patch the 'viewed' property",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ViewedProperty"
        },
        "responses": {
          "202": {
            "description": "Answer patch 'viewed' property request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "409": {
            "description": "Read only. Modification rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/answers/{id}/remind": {
      "put": {
        "description": "Send a notification to the recipient of the answer.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Answer id to remind",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Answer remind request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/answers/{answerId}/documents/{documentId}/move": {
      "put": {
        "description": "Upload a dms document to dbox",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "description": "Survey document identifier",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "answerId",
            "in": "path",
            "required": true,
            "description": "Survey document identifier",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UploadToDbox"
        },
        "responses": {
          "202": {
            "description": "Upload a dms document to dbox.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/surveys": {
      "post": {
        "description": "Create a new survey",
        "parameters": [
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateSurvey"
        },
        "responses": {
          "202": {
            "description": "Create survey request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/drafts": {
      "post": {
        "description": "Create a new draft survey",
        "parameters": [
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateDraft"
        },
        "responses": {
          "202": {
            "description": "Create survey draft request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/drafts/{id}": {
      "put": {
        "description": "Update an existing survey draft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Draft id to update",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateDraft"
        },
        "responses": {
          "202": {
            "description": "Update survey draft request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Delete an existing survey draft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Survey draft id to delete",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Survey draft delete request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Survey draft identifier."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/templates": {
      "post": {
        "description": "Create a new template",
        "parameters": [
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateTemplate"
        },
        "responses": {
          "202": {
            "description": "Create template request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/templates/{id}": {
      "delete": {
        "description": "Delete an existing template",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Template id to delete",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "User agent string (e.g. Lynfa/5.0 (Windows NT x.y; rv:10.0) Paghe/1.0)",
            "name": "User-Agent",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application name (e.g. TS000)",
            "name": "X-App-Name",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "Caller application version (e.g. 1.0.2)",
            "name": "X-App-Version",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Unique request identifier (e.g. cjqqbbezk139w08878awoj1p0)",
            "name": "X-Request-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 36
            }
          },
          {
            "description": "Multiple x-request-id correlation identifier (e.g 6a83ff97-ac20-47c8-bbe3-1f3319cf9aa6)",
            "name": "X-Correlation-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "description": "Identifier of the local TSDigital user making the request",
            "name": "X-User-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "description": "TSDigital registry item identifier that made the request",
            "name": "X-Item-Id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "description": "TSDigital registry item identifier that manages the one provided in x-item-id",
            "name": "X-Manager-Id",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Template delete request accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Template identifier."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          },
          "500": {
            "description": "Unexpected Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  }
}