{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://auth.proudbase.com/schemas/events/organization.reactivated.v1.json",
  "title": "organization.reactivated (v1)",
  "description": "An organization was set back to active. Emitted when an administrator sets an organization (suspended or archived) back to \"active\". Previously revoked grants are not restored. Emitted by every successful call, even when the organization was already in that state. org_id equals data.organization_id.",
  "type": "object",
  "allOf": [
    {
      "$ref": "envelope.v1.json"
    }
  ],
  "properties": {
    "event_type": {
      "const": "organization.reactivated"
    },
    "event_version": {
      "const": 1
    },
    "data": {
      "type": "object",
      "description": "Event data. All members are identifiers or state, so the minimal and standard payload forms are identical.",
      "required": [
        "organization_id",
        "state"
      ],
      "properties": {
        "organization_id": {
          "$ref": "envelope.v1.json#/$defs/organization_id",
          "description": "The organization."
        },
        "state": {
          "type": "string",
          "const": "active",
          "description": "The new organization state."
        }
      },
      "additionalProperties": false
    },
    "org_id": {
      "description": "Always set for this event type."
    }
  },
  "required": [
    "org_id"
  ],
  "x-event-type": "organization.reactivated",
  "x-subscribable": true,
  "x-emitted-by": [
    "internal/organization/organization.go: (*Service).SetState"
  ],
  "x-org-scoped": "always",
  "examples": [
    {
      "event_id": "obx_01jbj9nxg8tfrvyapa32qfqqyj",
      "event_type": "organization.reactivated",
      "event_version": 1,
      "occurred_at": "2026-10-10T12:10:00.123456789Z",
      "realm_id": "rlm_01jbxe2ktygrnsjxt1j8etsahj",
      "org_id": "org_01jb8wmw5drxrge3rmw4nf61x1",
      "data": {
        "organization_id": "org_01jb8wmw5drxrge3rmw4nf61x1",
        "state": "active"
      }
    }
  ]
}
