# Finish interview sitting

Source: https://musicnerd-docs.vercel.app/api-reference/interview/finish-session

Finish interview sitting

## POST /api/artist/{id}/interview/session/{sessionId}/finish

Full OpenAPI specification: https://musicnerd-docs.vercel.app/spec/interview-sessions.json

## Authentication

This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification.

[Authentication guide](https://musicnerd-docs.vercel.app/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Durable interview sessions",
    "version": "0.1.0",
    "description": "Draft fifth-slice contract; not released."
  },
  "servers": [
    {
      "url": "https://musicnerd-api.vercel.app"
    }
  ],
  "paths": {
    "/api/artist/{id}/interview/session/{sessionId}/finish": {
      "post": {
        "summary": "Finish interview sitting",
        "description": "Explicitly closes a sitting, skips an unanswered offer and queues an existing durable Lore refresh for its answers in the same transaction. Repeated finish is idempotent. It never runs a detached model call. Current claimant or administrator only. Private/no-store. Requires staging-verified migrations 0041 and 0042 before deployment. Draft; not released.",
        "security": [
          {
            "PrivyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Exact saved state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "ok"
                    },
                    "session": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "sitting": {
                          "type": "integer"
                        },
                        "state": {
                          "type": "string",
                          "enum": [
                            "active",
                            "finished"
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "closedAt": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time"
                        },
                        "questions": {
                          "type": "array",
                          "maxItems": 3,
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid"
                              },
                              "questionKey": {
                                "type": "string"
                              },
                              "question": {
                                "type": "string"
                              },
                              "answer": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "state": {
                                "type": "string",
                                "enum": [
                                  "offered",
                                  "answered",
                                  "skipped"
                                ]
                              },
                              "revision": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "sitting": {
                                "type": "integer"
                              },
                              "offeredAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "answerUpdatedAt": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "ordinal": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "references": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "required": [
                                    "kind",
                                    "revision",
                                    "start",
                                    "end",
                                    "quote"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "original",
                                        "answer"
                                      ]
                                    },
                                    "sourceId": {
                                      "type": "string",
                                      "description": "Required for original evidence: full vault/social source identity."
                                    },
                                    "entryId": {
                                      "type": "string",
                                      "description": "Required for answer evidence: full answer identity."
                                    },
                                    "revision": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "start": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "description": "UTF-16 offset."
                                    },
                                    "end": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "quote": {
                                      "type": "string",
                                      "minLength": 8,
                                      "maxLength": 1600
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "legacyOffers": {
                      "type": "array",
                      "maxItems": 3,
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid"
                          },
                          "questionKey": {
                            "type": "string"
                          },
                          "question": {
                            "type": "string"
                          },
                          "answer": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "type": "string",
                            "enum": [
                              "offered",
                              "answered",
                              "skipped"
                            ]
                          },
                          "revision": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          "sitting": {
                            "type": "integer"
                          },
                          "offeredAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "answerUpdatedAt": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "ordinal": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "references": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "required": [
                                "kind",
                                "revision",
                                "start",
                                "end",
                                "quote"
                              ],
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "original",
                                    "answer"
                                  ]
                                },
                                "sourceId": {
                                  "type": "string",
                                  "description": "Required for original evidence: full vault/social source identity."
                                },
                                "entryId": {
                                  "type": "string",
                                  "description": "Required for answer evidence: full answer identity."
                                },
                                "revision": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "start": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "description": "UTF-16 offset."
                                },
                                "end": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "quote": {
                                  "type": "string",
                                  "minLength": 8,
                                  "maxLength": 1600
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid bounded request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "error"
                    },
                    "code": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not signed in.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "error"
                    },
                    "code": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Current ownership required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "error"
                    },
                    "code": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Artist/session/offer unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "error"
                    },
                    "code": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "State, memory or original evidence changed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "error"
                    },
                    "code": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Supported limits exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "error"
                    },
                    "code": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Persistence unavailable; retry without assuming an empty session.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "const": "error"
                    },
                    "code": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [],
                "properties": {}
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PrivyAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```
