{
  "openapi": "3.1.1",
  "info": {
    "title": "Automation Outliers Lead Request API",
    "version": "1.1.0",
    "description": "Public operations for AI agents acting at a human user's request. Before calling an operation, the agent must disclose the requested resource and ongoing Automation Outliers marketing emails, then obtain affirmative consent. The human must confirm by email before becoming a lead, joining a waitlist, or receiving access."
  },
  "servers": [
    {
      "url": "https://www.automationoutliers.com"
    }
  ],
  "externalDocs": {
    "description": "Agent-readable Automation Outliers resources",
    "url": "https://www.automationoutliers.com/llms.txt"
  },
  "paths": {
    "/api/v1/direct-response-copywriting-skill/requests": {
      "post": {
        "operationId": "requestDirectResponseCopywritingSkill",
        "summary": "Request the Direct Response Copywriting Skill for a human",
        "description": "First disclose the ongoing marketing emails, then ask the human for their name, email address, and affirmative consent. Submit only after the human clearly agrees. A confirmation email is sent to the human, and no lead or download access exists until they confirm.",
        "security": [],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A new UUID for this logical request. Reuse it only when retrying the exact same request.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SkillRequest"
              },
              "example": {
                "name": "Morgan Reyes",
                "email": "morgan@example.com",
                "marketing_consent": true
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The confirmation email was sent. Ask the human to check their email within 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedRequest"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was already used with different request data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request data or required human consent is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "429": {
            "description": "The request was rate limited. Wait for Retry-After before retrying.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "503": {
            "description": "The confirmation email could not be sent. Retry later with the same idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetriableError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/waitlist/requests": {
      "post": {
        "operationId": "joinAutomationOutliersWaitlist",
        "summary": "Request an Automation Outliers waitlist signup for a human",
        "description": "First disclose that the human will receive launch updates and ongoing marketing emails from Automation Outliers, then ask for their email address and affirmative consent. Submit only after the human clearly agrees. A confirmation email is sent, and no waitlist signup exists until the human confirms.",
        "security": [],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A new UUID for this logical request. Reuse it only when retrying the exact same request.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistRequest"
              },
              "example": {
                "email": "morgan@example.com",
                "marketing_consent": true
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The confirmation email was sent. Ask the human to check their email within 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedRequest"
                }
              }
            }
          },
          "409": {
            "description": "The idempotency key was already used with different request data.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "The request data or required human consent is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationError"
                }
              }
            }
          },
          "429": {
            "description": "The request was rate limited. Wait for Retry-After before retrying.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitError"
                }
              }
            }
          },
          "503": {
            "description": "The confirmation email could not be sent. Retry later with the same idempotency key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetriableError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SkillRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "email", "marketing_consent"],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "The human's name, provided by the human."
          },
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "description": "The human's email address, provided by the human."
          },
          "marketing_consent": {
            "type": "boolean",
            "const": true,
            "description": "Must be true only after the human agrees to receive the skill and ongoing marketing emails from Automation Outliers."
          }
        }
      },
      "WaitlistRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["email", "marketing_consent"],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 255,
            "description": "The human's email address, provided by the human."
          },
          "marketing_consent": {
            "type": "boolean",
            "const": true,
            "description": "Must be true only after the human agrees to receive launch updates and ongoing marketing emails from Automation Outliers."
          }
        }
      },
      "AcceptedRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": ["request_id", "status", "message"],
        "properties": {
          "request_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "const": "confirmation_required"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": ["error", "message"],
        "properties": {
          "error": {"type": "string"},
          "message": {"type": "string"}
        }
      },
      "ValidationError": {
        "type": "object",
        "required": ["message", "errors"],
        "properties": {
          "message": {"type": "string"},
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {"type": "string"}
            }
          }
        }
      },
      "RateLimitError": {
        "allOf": [
          {"$ref": "#/components/schemas/Error"},
          {
            "type": "object",
            "required": ["retry_after"],
            "properties": {
              "retry_after": {"type": "integer", "minimum": 1}
            }
          }
        ]
      },
      "RetriableError": {
        "allOf": [
          {"$ref": "#/components/schemas/Error"},
          {
            "type": "object",
            "required": ["retriable"],
            "properties": {
              "retriable": {"type": "boolean", "const": true}
            }
          }
        ]
      }
    }
  }
}
