cal.com
cal.com copied to clipboard
[CAL-3742] smsReminderNumber throws error
Issue Summary
Using smsReminderNumber throws error
{
"message": "Legacy Props: smsReminderNumber. They can't be used with `responses`"
}
Steps to Reproduce:
Please use this curl to reproduce.
curl -X POST https://api.cal.com/v1/bookings?apiKey={apikey}
-H "Content-Type: application/json"
-d '{
"eventTypeId": 4,
"start": "2024-05-17T14:00:00-04:00",
"responses": {
"name": "John",
"email": "[email protected]",
"location": "Calcom HQ"
},
"metadata": {
"phone": "+1234334235"
},
"timeZone": "America/Chicago",
"language": "en",
"title": "Debug - sean",
"description": "bdcbdib",
"smsReminderNumber": "+14159076135"
}'
The error you're encountering is because smsReminderNumber is considered a legacy property and cannot be used together with the responses field in your API request to Cal.com. To fix this issue, you should either remove the smsReminderNumber from your request when using responses or avoid using responses if you need to include legacy properties like smsReminderNumber.
The smsReminderNumber is intended for sending SMS reminders and should be handled differently with the new API structure. If you're looking to include SMS reminder functionality with the responses field, the system now looks for an attendee match based on the email provided in responses for sending SMS reminders, rather than directly using smsReminderNumber.
For more detailed handling of SMS reminders with the new API structure, you might need to adjust your implementation to align with how Cal.com now processes booking data and attendee information for SMS reminders.
Details
Sources
- packages/features/bookings/lib/getBookingDataSchemaForApi.ts
- packages/features/bookings/lib/getBookingFields.ts
- packages/prisma/zod-utils.ts
- packages/features/bookings/lib/getCalEventResponses.ts
- packages/features/ee/workflows/lib/reminders/smsReminderManager.ts
- packages/features/bookings/lib/getBookingResponsesSchema.ts
- apps/api/v1/pages/api/bookings/_post.ts
About Dosu This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
then please change your api reference to show these changes and explain how to add attendees with phone numbers etc. Thanks