{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmattered/json-schema/getmattered-indeed-connection-response-schema.json",
  "title": "IndeedConnectionResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getmattered-integrations-api-openapi.yml#/components/schemas/IndeedConnectionResponse",
  "type": "object",
  "properties": {
    "access": {
      "$ref": "#/$defs/IntegrationsAccess"
    },
    "connection": {
      "$ref": "#/$defs/IndeedConnectionView"
    },
    "deckLine": {
      "$ref": "#/$defs/IndeedDeckLine"
    },
    "signInMailbox": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "email": {
          "type": "string"
        },
        "provider": {
          "type": "string",
          "enum": [
            "gmail",
            "outlook"
          ],
          "description": "Connected user mailbox provider"
        }
      },
      "required": [
        "email",
        "provider"
      ]
    },
    "signInMailboxOptions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "provider": {
            "type": "string",
            "enum": [
              "gmail",
              "outlook"
            ],
            "description": "Connected user mailbox provider"
          }
        },
        "required": [
          "email",
          "provider"
        ]
      }
    },
    "stats": {
      "type": "object",
      "properties": {
        "applications": {
          "type": "integer",
          "minimum": 0
        },
        "deckJobs": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "applications",
        "deckJobs"
      ]
    },
    "suggestedSite": {
      "type": "string",
      "enum": [
        "US",
        "IN",
        "GB",
        "CA",
        "AU",
        "IE",
        "DE",
        "FR",
        "NL",
        "ES",
        "IT",
        "SG",
        "AE",
        "NZ",
        "ZA",
        "PH",
        "MY",
        "PK",
        "BR",
        "MX",
        "JP"
      ],
      "description": "The Indeed site the user has an account on, as an ISO 3166-1 alpha-2 country code"
    }
  },
  "required": [
    "access",
    "connection",
    "signInMailbox",
    "signInMailboxOptions",
    "stats",
    "suggestedSite"
  ],
  "$defs": {
    "IndeedConnectionView": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "connectedAt": {
          "type": [
            "integer",
            "null"
          ]
        },
        "email": {
          "type": "string"
        },
        "lastError": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "blocked_by_indeed",
            "browser_unavailable",
            "code_rejected",
            "email_code_missing",
            "mailbox_unreadable",
            "no_account",
            "phone_code_missing",
            "phone_number_required",
            "sign_in_refused",
            "sign_in_stopped",
            "session_not_saved",
            "timed_out",
            "unexpected_page",
            null
          ],
          "description": "Why the last Indeed sign-in attempt failed"
        },
        "phoneHint": {
          "type": [
            "string",
            "null"
          ]
        },
        "site": {
          "type": "string",
          "enum": [
            "US",
            "IN",
            "GB",
            "CA",
            "AU",
            "IE",
            "DE",
            "FR",
            "NL",
            "ES",
            "IT",
            "SG",
            "AE",
            "NZ",
            "ZA",
            "PH",
            "MY",
            "PK",
            "BR",
            "MX",
            "JP"
          ],
          "description": "The Indeed site the user has an account on, as an ISO 3166-1 alpha-2 country code"
        },
        "stage": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "opening_indeed",
            "checking_account",
            "waiting_for_email_code",
            "entering_code",
            "saving_session",
            null
          ],
          "description": "The step a running Indeed sign-in reached: opening Indeed, checking the address has an account, waiting for Indeed's email code, typing it, saving the session"
        },
        "startedAt": {
          "type": [
            "integer",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "signing_in",
            "waiting_for_phone_code",
            "connected",
            "needs_reconnect",
            "failed"
          ],
          "description": "Where the Indeed sign-in stands: a run is signing in, it waits for the SMS code the user types, the session is stored, the stored session stopped working, or the last attempt failed"
        },
        "updatedAt": {
          "type": "integer"
        }
      },
      "required": [
        "connectedAt",
        "email",
        "lastError",
        "phoneHint",
        "site",
        "stage",
        "startedAt",
        "status",
        "updatedAt"
      ]
    },
    "IndeedDeckLine": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "jobs": {
              "type": "integer",
              "exclusiveMinimum": 0
            },
            "kind": {
              "type": "string",
              "enum": [
                "jobs"
              ]
            }
          },
          "required": [
            "jobs",
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "none_new"
              ]
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "none_this_week"
              ]
            },
            "role": {
              "type": "string"
            },
            "site": {
              "type": "string",
              "enum": [
                "US",
                "IN",
                "GB",
                "CA",
                "AU",
                "IE",
                "DE",
                "FR",
                "NL",
                "ES",
                "IT",
                "SG",
                "AE",
                "NZ",
                "ZA",
                "PH",
                "MY",
                "PK",
                "BR",
                "MX",
                "JP"
              ],
              "description": "The Indeed site the user has an account on, as an ISO 3166-1 alpha-2 country code"
            }
          },
          "required": [
            "kind",
            "role",
            "site"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "no_role"
              ]
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "checking"
              ]
            }
          },
          "required": [
            "kind"
          ]
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "IntegrationsAccess": {
      "type": "object",
      "properties": {
        "allowed": {
          "type": "boolean"
        },
        "requiredTier": {
          "type": "string",
          "enum": [
            "job_seeker",
            "hired_in_30",
            "hired_yesterday"
          ],
          "description": "Subscription plan tier level"
        },
        "state": {
          "type": "string",
          "enum": [
            "included",
            "plan_required",
            "beta_request",
            "beta_pending",
            "beta_denied"
          ],
          "description": "Whether integrations are open: included, the plan is missing, or the beta request is not made, pending or denied"
        }
      },
      "required": [
        "allowed",
        "requiredTier",
        "state"
      ]
    }
  }
}