calcom/cal.diy · error · NotFoundException
Event type with id=${inputBooking.eventTypeId} is not a recu
Error message
Event type with id=${inputBooking.eventTypeId} is not a recurring event What it means
Thrown by transformInputCreateRecurringBooking when eventType.recurringEvent is falsy. NotFoundException (HTTP 404). A recurring booking can only be created against an event type that has a recurringEvent configuration; without one the recurring endpoint has no interval/count/freq to expand into multiple occurrences.
Source
Thrown at apps/api/v2/src/platform/bookings/2024-08-13/services/input.service.ts:428
} not valid for event type with id=${
dbEventType.id
}. The event type has following integrations: ${allowedIntegrations.join(
", "
)}, and only these integrations are allowed for booking location.`
);
}
}
return true;
}
async transformInputCreateRecurringBooking(
inputBooking: CreateRecurringBookingInput_2024_08_13,
eventType: EventTypeWithOwnerAndTeam,
platformClientId?: string
) {
if (!eventType.recurringEvent) {
throw new NotFoundException(`Event type with id=${inputBooking.eventTypeId} is not a recurring event`);
}
this.validateBookingLengthInMinutes(inputBooking, eventType);
const lengthInMinutes = inputBooking.lengthInMinutes ?? eventType.length;
const occurrence = recurringEventSchema.parse(eventType.recurringEvent);
const repeatsEvery = occurrence.interval;
if (inputBooking.recurrenceCount && inputBooking.recurrenceCount > occurrence.count) {
throw new BadRequestException(
"Provided recurrence count is higher than the event type's recurring event count."
);
}
const repeatsTimes = inputBooking.recurrenceCount || occurrence.count;
// note(Lauris): timeBetween 0=yearly, 1=monthly and 2=weekly
const timeBetween = occurrence.freq;
const events = [];View on GitHub (pinned to 176037d0af)
Solutions
- Use POST /v2/bookings (single) instead of POST /v2/bookings/recurring for non-recurring event types.
- Verify eventType.recurringEvent is set via GET /v2/event-types/{id} before calling the recurring endpoint.
- Configure recurring settings on the event type in the dashboard if recurring bookings are required.
- Branch client-side: call recurring only when the fetched event type has recurringEvent.
Example fix
// before
await api.post('/v2/bookings/recurring', { eventTypeId: 123, start, ... });
// after
const et = await api.get('/v2/event-types/123');
const url = et.data.recurringEvent ? '/v2/bookings/recurring' : '/v2/bookings';
await api.post(url, { eventTypeId: 123, start, ... }); Defensive patterns
Strategy: validation
Validate before calling
const et = await api.get(`/v2/event-types/${eventTypeId}`);
if (!et.data.recurringEvent) throw new Error('use the single-booking endpoint for non-recurring event types');
const url = et.data.recurringEvent ? '/v2/bookings/recurring' : '/v2/bookings'; Type guard
const isRecurringEventType = (et: { recurringEvent?: unknown }): boolean =>
Boolean(et.recurringEvent); Try / catch
try { await api.post('/v2/bookings/recurring', body); }
catch (e) {
if (e.response?.status === 404 && /not a recurring event/.test(e.response.data.message)) {
await api.post('/v2/bookings', body); // fall back to single booking
} else throw e;
} Prevention
- Branch the endpoint on whether the fetched event type has recurringEvent.
- Configure recurring settings on the event type before using the recurring endpoint.
- Do not default to the recurring endpoint for all bookings.
When it happens
Trigger: POST /v2/bookings/recurring with the eventTypeId of a plain (non-recurring) event type. The service checks eventType.recurringEvent and, finding none, throws. The caller should have used the plain POST /v2/bookings endpoint instead.
Common situations: Wrong endpoint used (recurring vs single); event type's recurring config was removed after the client cached its id; client defaulting to the recurring endpoint for all bookings; recurringEvent field null because the event type was cloned without recurring settings.
Related errors
- Event type with slug ${body.eventTypeSlug} belonging to user
- Event type with slug ${body.eventTypeSlug} belonging to user
- Event type with slug ${body.eventTypeSlug} belonging to team
- Event type with slug ${body.eventTypeSlug} belonging to team
- Event type with id ${body.eventTypeId} not found.
AI-assisted analysis of calcom/cal.diy@176037d0af (2026-08-12).
Data as JSON: /api/errors/a43942c071d4a955.
Report an issue: GitHub.