{
  "openapi": "3.1.0",
  "info": {
    "title": "Matte Instruments public forms",
    "version": "1.0.0",
    "description": "Submit only the action and contact details authorized by your user. Public write-only forms."
  },
  "servers": [
    {
      "url": "https://matteinstruments.com"
    }
  ],
  "paths": {
    "/api/access": {
      "post": {
        "operationId": "requestBetaAccess",
        "summary": "Request private beta access",
        "description": "Only email is required. The studio reviews requests. Retrying a normalized email does not create a second request or overwrite the original details.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254,
                    "description": "The email authorized by the person you represent."
                  },
                  "studio": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "project": {
                    "type": "string",
                    "maxLength": 600
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Submission received. Repeats produce the same receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result",
                    "receipt",
                    "message"
                  ],
                  "properties": {
                    "result": {
                      "const": "received"
                    },
                    "receipt": {
                      "type": "string",
                      "pattern": "^MATTE-B-[a-f0-9]{16}$"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    },
    "/api/contact": {
      "post": {
        "operationId": "sendContactEnquiry",
        "summary": "Send a contact enquiry",
        "description": "Send the approved message to the studio. Generate one UUID for this enquiry and reuse it with the identical payload on retry.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "message",
                  "receipt"
                ],
                "additionalProperties": false,
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 254,
                    "description": "The email authorized by the person you represent."
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "receipt": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Caller-generated UUID for this enquiry."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Submission received. Repeats produce the same receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result",
                    "receipt",
                    "message"
                  ],
                  "properties": {
                    "result": {
                      "const": "received"
                    },
                    "receipt": {
                      "type": "string",
                      "pattern": "^MATTE-C-[a-fA-F0-9-]{36}$"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "413": {
            "$ref": "#/components/responses/Error413"
          },
          "415": {
            "$ref": "#/components/responses/Error415"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Error400": {
        "description": "Malformed request body.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error403": {
        "description": "Browser origin does not match this site.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error413": {
        "description": "Body too large.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error415": {
        "description": "Unsupported content type.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error422": {
        "description": "Invalid fields. Correct the request before submitting again.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error503": {
        "description": "Temporary submission failure. Retry with the same identity and payload.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Error429": {
        "description": "Submission limit reached. Wait for Retry-After before retrying.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
