{
  "openapi": "3.1.0",
  "info": {
    "title": "Mercera agent access API",
    "version": "1.0.0",
    "description": "Lets an AI assistant request a demo or a free CX audit on behalf of a user who asked it to. We only contact the email address supplied."
  },
  "servers": [
    {
      "url": "https://mercera.co"
    }
  ],
  "paths": {
    "/api/agent-access": {
      "post": {
        "operationId": "requestDemoOrAudit",
        "summary": "Request a demo or free CX audit for a user",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "store_url",
                  "request_type"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "User's name"
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "User's work email; the only address we will contact"
                  },
                  "company": {
                    "type": "string"
                  },
                  "store_url": {
                    "type": "string",
                    "description": "The user's store URL"
                  },
                  "request_type": {
                    "type": "string",
                    "enum": [
                      "demo",
                      "cx_audit"
                    ]
                  },
                  "monthly_tickets": {
                    "type": "string",
                    "description": "Approximate support tickets per month"
                  },
                  "helpdesk": {
                    "type": "string",
                    "description": "e.g. Gorgias, Zendesk, Kustomer"
                  },
                  "notes": {
                    "type": "string",
                    "description": "What the user wants to achieve"
                  },
                  "agent_name": {
                    "type": "string",
                    "description": "Name of the AI assistant making the request"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Received",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "reference": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}