{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-create-candidate-response-schema.json",
  "title": "CreateCandidateResponse",
  "description": "Result of a synchronous candidate create or upsert. The returned profile is a skeleton; heavy processing (CV parsing, enrichment) continues asynchronously after the row exists.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-candidates-api-openapi.yml#/components/schemas/CreateCandidateResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Always true on success."
    },
    "mode": {
      "type": "string",
      "enum": [
        "SYNC"
      ],
      "description": "Echoes the processing mode."
    },
    "created": {
      "type": "boolean",
      "description": "true when a new profile was created (201); false when an existing profile was upserted (200)."
    },
    "candidate": {
      "type": "object",
      "description": "The created or updated candidate profile skeleton.",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Candidate profile id."
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Caller-supplied external id, when set."
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "description": "Processing status of the profile."
        },
        "createdAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the profile was created (ISO 8601). Present when a new profile was created."
        },
        "updatedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the profile was last updated (ISO 8601)."
        }
      },
      "required": [
        "id"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "ok",
    "mode",
    "created",
    "candidate"
  ],
  "additionalProperties": false
}