{"record":{"id":"5628d9b3b3516f1a","repo":"calcom/cal.diy","slug":"event-type-with-id-eventtype-id-is-the-parent-m","errorCode":null,"errorMessage":"Event type with id=${eventType.id} is the parent managed event type that can't be booked. You have to provide the child event type id aka id of event type that has been assigned to one of the users.","messagePattern":"Event type with id=(.+?) is the parent managed event type that can't be booked\\. You have to provide the child event type id aka id of event type that has been assigned to one of the users\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"apps/api/v2/src/platform/bookings/2024-08-13/services/bookings.service.ts","lineNumber":128,"sourceCode":"  ) {}\n\n  async createBooking(request: Request, body: CreateBookingInput, authUser: AuthOptionalUser) {\n    let bookingTeamEventType = false;\n    try {\n      const eventType = await this.getBookedEventType(body);\n      if (eventType?.team) {\n        bookingTeamEventType = true;\n      }\n      if (!eventType) {\n        this.errorsBookingsService.handleEventTypeToBeBookedNotFound(body);\n      }\n      const userIsEventTypeAdminOrOwner = authUser\n        ? await this.eventTypeAccessService.userIsEventTypeAdminOrOwner(authUser, eventType)\n        : false;\n      await this.checkBookingRequiresAuthenticationSetting(eventType, authUser, userIsEventTypeAdminOrOwner);\n\n      if (eventType.schedulingType === \"MANAGED\") {\n        throw new BadRequestException(\n          `Event type with id=${eventType.id} is the parent managed event type that can't be booked. You have to provide the child event type id aka id of event type that has been assigned to one of the users.`\n        );\n      }\n\n      if (eventType.schedulingType === \"COLLECTIVE\" || eventType.schedulingType === \"ROUND_ROBIN\") {\n        await this.checkEventTypeHasHosts(eventType.id);\n      }\n\n      body.eventTypeId = eventType.id;\n\n      const isRecurring = !!eventType?.recurringEvent;\n      const isSeated = !!eventType?.seatsPerTimeSlot;\n\n      await this.hasRequiredBookingFieldsResponses(body, eventType);\n\n      if (isRecurring && isSeated) {\n        return await this.createRecurringSeatedBooking(request, body, eventType, userIsEventTypeAdminOrOwner);\n      }","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/apps/api/v2/src/platform/bookings/2024-08-13/services/bookings.service.ts#L110-L146","documentation":"Thrown in BookingsService.createBooking when the resolved event type has schedulingType === \"MANAGED\". Managed event types are parent containers in a team that assign members; they are not directly bookable. The caller must book one of the managed event type's child event types (assigned to individual users). HTTP 400.","triggerScenarios":"POST /v2/bookings with body.eventTypeId pointing at a team's MANAGED event type (the parent) rather than one of its assignable child event types.","commonSituations":"Copying the event type ID from the team's managed event type in the UI/API instead of a member's event type; misunderstanding managed event types as bookable; iterating event types and grabbing the parent id.","solutions":["Look up the managed event type's assigned users/children and POST with a child event type id.","Use the event types API to list assignable (non-managed) event types for the team/user and pick one.","If you book by username + eventTypeSlug instead, ensure the slug resolves to a non-managed event type."],"exampleFix":"// before\n{ eventTypeId: 123 }   // 123 is the MANAGED parent -> BadRequestException\n// after\n{ eventTypeId: 130 }    // 130 is a child event type assigned to a team member","handlingStrategy":"validation","validationCode":"// Before booking, ensure the eventTypeId is bookable (not a MANAGED parent).\nconst eventType = await api.get(`/v2/event-types/${eventTypeId}`);\nif (eventType.schedulingType === 'MANAGED') {\n  throw new Error(`Event type ${eventTypeId} is a managed parent; book a child event type id instead`);\n}","typeGuard":"function isBookableEventType(et: { schedulingType?: string } | null | undefined): boolean {\n  return !!et && et.schedulingType !== 'MANAGED';\n}","tryCatchPattern":"try {\n  await api.post('/v2/bookings', { eventTypeId });\n} catch (err) {\n  if (err.status === 400 && /parent managed event type/.test(err.message)) {\n    // fetch the managed event type's children and retry with a child eventTypeId\n  }\n  throw err;\n}","preventionTips":["Never POST the managed parent event type id; resolve and use a child.","List assignable event types per team/user before booking.","Prefer booking by eventTypeId once you have a confirmed bookable one."],"tags":["event-type","managed","team","booking","bad-request"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}