{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/neuron-ng/json-schema/neuron-ng-ad-request-schema.json",
  "title": "AdRequest",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/neuron-ng-openapi.json#/components/schemas/AdRequest",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "orgId": {
      "type": "string",
      "format": "uuid"
    },
    "createdBy": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "message": {
      "type": "string"
    },
    "messageType": {
      "type": "string"
    },
    "mediaUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "targetDemographics": {
      "type": "object"
    },
    "targetingMode": {
      "type": "string",
      "enum": [
        "auto",
        "manual"
      ]
    },
    "targetType": {
      "type": "string",
      "enum": [
        "contacts",
        "groups"
      ]
    },
    "targetGoal": {
      "type": "integer"
    },
    "budget": {
      "type": "integer"
    },
    "spent": {
      "type": "integer"
    },
    "totalDeliveries": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "pending_review",
        "approved",
        "rejected",
        "active",
        "paused",
        "completed"
      ]
    },
    "rejectionReason": {
      "type": [
        "string",
        "null"
      ]
    },
    "approvedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "fundedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "completedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}