Skip to main content

About Calendly Community
New to Calendly Community? Find information on how to use this community and make the most of your experience.

Community Guidelines Asking Great Questions Get the Most from Community All Getting Started with Community Content

Get Started with Calendly
Just getting going with Calendly? Explore resources to help get you scheduling in no time.

Getting Started Guide Calendly for Administrators Calendly Integrations

Ask Questions. Find Answers.
Looking for knowledge? Got questions? You've come to the right place.

How Do I...?

Other Help Resources
Community is just one piece of Calendly knowledge. Find more at these amazing resources.

Help Center Resource Center

Find Ideas.
Looking for ideas? Find your inspiration here.

Featured Tips + Tricks

Other Inspiring Resources
We're definitely not running short on inspiration. Here are more resources to explore!

Calendly Blog Customer Stories

News + Updates
Wondering what's new around Calendly and Community? Find out here.

Calendly Product Updates What's New?
Solved

500 Internal Server Error – Create One-Off Event Type API


I am encountering a 500 Internal Server Error when attempting to create a one-off event type using the Calendly API. The response I receive is:

{
  "title": "Internal Server Error",
  "message": "The server encountered an unexpected condition that prevented it from fulfilling the request."
}

Here is the request payload and configuration I am using:

const data = {
  name: "My Meeting",
  host: uri,
  co_hosts: [],
  duration: 30,
  date_setting: {
    type: "date_range",
    start_date: "2025-2-6", 
    end_date: "2025-3-6", 
  },
  location: {
    kind: "physical",
    location: "Main Office",
    additional_info: "string",
  },
};

const options = {
  method: "POST",
  url: "https://api.calendly.com/one_off_event_types",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${accessToken}`,
  },
  data,
};

Any guidance or clarification would be greatly appreciated. Thank you!

Best answer by Claudio

I believe the issue is due to you passing an empty array as the value for the “co_hosts” field. Can you try removing that field instead of sending an empty array?

It also seems to me that your JSON may be invalid because of the additional commas after the values of “end_date” and “additional_info”. Please remove them.

It also doesn’t seem that you want to specify a real value for “additional_info”, so I’d remove that too.

Here is what I think your json payload should look like after the changes I recommended:

const data = {
  name: "My Meeting",
  host: uri,
  duration: 30,
  date_setting: {
    type: "date_range",
    start_date: "2025-2-6", 
    end_date: "2025-3-6"
  },
  location: {
    kind: "physical",
    location: "Main Office"
  },
};

I’m also assuming that “uri” was previously defined, so it has a valid value here.

View original
Did this topic help you find an answer to your question?

2 replies

  • Employee
  • 9 replies
  • Answer
  • March 6, 2025

I believe the issue is due to you passing an empty array as the value for the “co_hosts” field. Can you try removing that field instead of sending an empty array?

It also seems to me that your JSON may be invalid because of the additional commas after the values of “end_date” and “additional_info”. Please remove them.

It also doesn’t seem that you want to specify a real value for “additional_info”, so I’d remove that too.

Here is what I think your json payload should look like after the changes I recommended:

const data = {
  name: "My Meeting",
  host: uri,
  duration: 30,
  date_setting: {
    type: "date_range",
    start_date: "2025-2-6", 
    end_date: "2025-3-6"
  },
  location: {
    kind: "physical",
    location: "Main Office"
  },
};

I’m also assuming that “uri” was previously defined, so it has a valid value here.


  • Author
  • Community Member
  • 4 replies
  • March 7, 2025

Thank You for all the support!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings
Info Icon We're out for the weekend! All posts will be pre-moderated. Read more