{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://auth.proudbase.com/schemas/events/organization.join_request.created.v1.json",
  "title": "organization.join_request.created (v1)",
  "description": "A user asked to join an organization. Emitted when a user submits a request to join an organization. Approval or denial of the request emits no event of its own (an approval produces authorization.role.assigned but not organization.membership.added).",
  "type": "object",
  "allOf": [
    {
      "$ref": "envelope.v1.json"
    }
  ],
  "properties": {
    "event_type": {
      "const": "organization.join_request.created"
    },
    "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": [
        "join_request_id"
      ],
      "properties": {
        "join_request_id": {
          "$ref": "envelope.v1.json#/$defs/join_request_id",
          "description": "The new join request."
        }
      },
      "additionalProperties": false
    },
    "org_id": {
      "description": "Always set for this event type."
    }
  },
  "required": [
    "org_id"
  ],
  "x-event-type": "organization.join_request.created",
  "x-subscribable": true,
  "x-emitted-by": [
    "internal/organization/groups.go: (*Service).RequestJoin"
  ],
  "x-org-scoped": "always",
  "examples": [
    {
      "event_id": "obx_01jbxy9ypqdb24x32gwfwrsp5d",
      "event_type": "organization.join_request.created",
      "event_version": 1,
      "occurred_at": "2026-10-10T12:10:00.123456789Z",
      "realm_id": "rlm_01jbxe2ktygrnsjxt1j8etsahj",
      "org_id": "org_01jb8wmw5drxrge3rmw4nf61x1",
      "data": {
        "join_request_id": "jrq_01jb84p6s6aev8behwvkhystsn"
      }
    }
  ]
}
