{
  "openapi": "3.1.2",
  "info": {
    "title": "FormRoost Submission API",
    "version": "1.0.0"
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "requestId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "format": "uri-reference"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable error code."
          },
          "detail": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    }
  },
  "paths": {
    "/s/v1/{environment}/{submissionId}": {
      "post": {
        "parameters": [
          {
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "sandbox"
                  ]
                },
                {
                  "type": "string",
                  "enum": [
                    "production"
                  ]
                }
              ]
            },
            "in": "path",
            "name": "environment",
            "required": true
          },
          {
            "schema": {
              "minLength": 12,
              "maxLength": 80,
              "type": "string"
            },
            "in": "path",
            "name": "submissionId",
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": false,
                  "type": "object",
                  "required": [
                    "receiptId",
                    "acceptedAt",
                    "environment",
                    "requestId",
                    "replay"
                  ],
                  "properties": {
                    "receiptId": {
                      "type": "string"
                    },
                    "acceptedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "environment": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "sandbox"
                          ]
                        },
                        {
                          "type": "string",
                          "enum": [
                            "production"
                          ]
                        }
                      ]
                    },
                    "requestId": {
                      "type": "string"
                    },
                    "replay": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "303": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    }
  }
}
