X Enterprises
fastify-xwhatconverts

recordings.getUrl

Construct the WhatConverts recording API URL for a lead without making a network request.

recordings.getUrl

Synchronously construct the WhatConverts API URL for a lead's call recording. No network request is made. The URL requires Basic Auth credentials to access.

Signature

fastify.xwhatconverts.recordings.getUrl(leadId: string): string

Params

NameTypeRequiredDescription
leadIdstringYesThe WhatConverts lead ID.

Returns

A string — the full recording API URL (e.g. https://app.whatconverts.com/api/v1/recording?lead_id=123456).

Throws

  • [xWhatConverts] recordings.getUrl: leadId is required — called without leadId.

Examples

Basic — get the recording URL

const url = fastify.xwhatconverts.recordings.getUrl("123456");
console.log(url);
// https://app.whatconverts.com/api/v1/recording?lead_id=123456

Realistic — store URL in database for later retrieval

fastify.post("/leads/:id/save-recording-url", async (request, reply) => {
  const { id } = request.params;

  const recordingUrl = fastify.xwhatconverts.recordings.getUrl(id);

  await db.leads.update({
    where: { whatconvertsId: id },
    data: { recordingUrl },
  });

  return { recordingUrl };
});

See Also

AI Context

package: "@xenterprises/fastify-xwhatconverts"
method: fastify.xwhatconverts.recordings.getUrl(leadId)
use-when: Synchronously construct the WhatConverts recording API URL without making a network request — store URL in DB or pass to another service
params: leadId (string, required)
returns: string URL (requires Basic Auth to access)
Copyright © 2026