{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/choozle/main/json-schema/authorization-request.json",
  "title": "AuthorizationRequest",
  "description": "Request body for the Choozle POST /api/auth endpoint. Field definitions transcribed from https://app.choozle.com/apidoc/api_data.json.",
  "type": "object",
  "required": [
    "email",
    "timestamp",
    "signature"
  ],
  "properties": {
    "email": {
      "type": "string",
      "format": "email",
      "description": "The API profile user's email."
    },
    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Current datetime in ISO 8601 format, e.g. 2015-05-04T11:34:02-06:00. Must be within five minutes of the server's current time."
    },
    "signature": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$",
      "description": "HMAC-SHA256 digest, lowercase hex, of the concatenated email and timestamp, keyed with the API private key. Not uppercase hex and not base64."
    }
  },
  "additionalProperties": false
}