{"record":{"id":"7ca9bf32dd5268a4","repo":"calcom/cal.diy","slug":"invalid-integration-location-integration","errorCode":null,"errorMessage":"Invalid integration: ${location.integration}","messagePattern":"Invalid integration: (.+?)","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"apps/api/v2/src/platform/bookings/2024-08-13/services/input.service.ts","lineNumber":315,"sourceCode":"      }\n\n      if (isPhoneNumber(location)) {\n        return {\n          value: \"phone\",\n          optionValue: location,\n        };\n      }\n\n      return {\n        value: \"somewhereElse\",\n        optionValue: location,\n      };\n    }\n\n    if (location.type === \"integration\") {\n      const integration = apiToInternalintegrationsMapping[location.integration];\n      if (!integration) {\n        throw new BadRequestException(`Invalid integration: ${location.integration}`);\n      }\n      return {\n        value: integration,\n        optionValue: \"\",\n      };\n    }\n\n    if (location.type === \"address\") {\n      return {\n        value: \"inPerson\",\n        optionValue: \"\",\n      };\n    }\n\n    if (location.type === \"attendeeAddress\") {\n      return {\n        value: \"attendeeInPerson\",\n        optionValue: location.address,","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/calcom/cal.diy/blob/176037d0afbe572f870a3c702985e7cd83fe6c0c/apps/api/v2/src/platform/bookings/2024-08-13/services/input.service.ts#L297-L333","documentation":"Thrown by InputBookingsService.transformLocation when location.type === 'integration' but location.integration is not a key in apiToInternalintegrationsMapping (locations.ts:14). BadRequestException (HTTP 400). The mapping covers the supportedIntegrations list (cal-video, google-meet, zoom, whereby-video, etc.); anything else is rejected.","triggerScenarios":"POST /v2/bookings with body.location = { type: 'integration', integration: <unsupported value> }. The class-validator IsIn(supportedIntegrations) on the DTO normally catches this earlier, but transformLocation re-checks defensively and throws if an unknown integration reaches it (e.g. validation bypassed, or a value present in no list).","commonSituations":"Sending a bare app name like 'zoom' is valid, but 'Zoom', 'zoom_video', 'zoom-video', or 'integrations:zoom' are not; using a slug from a different Cal API version; custom/legacy integration slugs that were renamed; client enum out of sync with supportedIntegrations.","solutions":["Use one of the exact supportedIntegrations values from location.input.ts (e.g. 'zoom', 'google-meet', 'cal-video').","Match casing and hyphenation exactly — values are lowercase-kebab.","If the desired integration is missing, request it be added rather than sending a custom slug.","Re-check the supported list after upgrading the platform-types package."],"exampleFix":"// before\nlocation: { type: 'integration', integration: 'Zoom' }\n\n// after\nlocation: { type: 'integration', integration: 'zoom' }","handlingStrategy":"type-guard","validationCode":"import { supportedIntegrations } from '@calcom/platform-types/bookings/2024-08-13/inputs/location.input';\nif (!supportedIntegrations.includes(body.location.integration)) throw new Error('unsupported integration slug');","typeGuard":"import { supportedIntegrations } from '@calcom/platform-types/bookings/2024-08-13/inputs/location.input';\nconst isSupportedIntegration = (s: string): s is typeof supportedIntegrations[number] =>\n  (supportedIntegrations as readonly string[]).includes(s);","tryCatchPattern":"try { await api.post('/v2/bookings', body); }\ncatch (e) {\n  if (e.response?.status === 400 && /Invalid integration/.test(e.response.data.message)) {\n    /* correct the integration slug to a supported value and retry */\n  } else throw e;\n}","preventionTips":["Use exact supportedIntegrations slugs (lowercase-kebab).","Share the supportedIntegrations enum between client and server builds.","Re-check the list after upgrading platform-types."],"tags":["api","bookings","location","integration","conferencing","validation","nestjs"],"backgroundTag":null,"analyzedSha":"176037d0afbe572f870a3c702985e7cd83fe6c0c","analyzedAt":"2026-08-12T19:12:41.464Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}