API Version: 2025-08-20

In response to user feedback, we have made changes to the default API response format.

Now, API responses will return objects (or an array of objects) directly for every request. No more unpacking deeply nested structures. This lets developers write much less boilerplate code, whether they're using the SDKs or fetching data directly from the API with fetch/requests.

It also makes things more predictable. Either the data is present, or an error is thrown.


2025-08-20 is the new default API version.


Previous Example:

try {
  const response = await ittybit.files.get("file_abcdefgh1234")
  const error = response.error
  if (error) {
    // handle error gracefully
    console.error(error);
  }
  const file = response.data
  console.log(file?.id);
} catch (error) {
  // handle error gracefully
  console.error(error);
}

New Example:

try {
  const file = await ittybit.files.get("file_abcdefgh1234")
  console.log(file.id);
} catch (error) {
  console.error(error);
}
api
2025-08-20