X Enterprises
fastify-xwhatconverts

recordings.get

Fetch the MP3 call recording for a WhatConverts lead as an ArrayBuffer.

recordings.get

Fetch the MP3 call recording for a lead and return it as an ArrayBuffer. For a Node.js Buffer, use recordings.getBuffer instead.

Signature

fastify.xwhatconverts.recordings.get(leadId: string): Promise<ArrayBuffer>

Params

NameTypeRequiredDescription
leadIdstringYesThe WhatConverts lead ID with an associated call recording.

Returns

An ArrayBuffer containing the MP3 audio data.

Throws

  • [xWhatConverts] recordings.get: leadId is required — called without leadId.
  • [xWhatConverts] Network error: <message> — network-level failure.
  • [xWhatConverts] API error: <status> — non-2xx response; 404 if no recording exists.

Examples

Basic — fetch recording as ArrayBuffer

const arrayBuffer = await fastify.xwhatconverts.recordings.get("123456");
console.log(arrayBuffer.byteLength); // size in bytes

Realistic — stream recording to browser

fastify.get("/leads/:id/recording", async (request, reply) => {
  const arrayBuffer = await fastify.xwhatconverts.recordings.get(request.params.id);
  const buffer = Buffer.from(arrayBuffer);

  return reply
    .header("Content-Type", "audio/mpeg")
    .header("Content-Length", buffer.byteLength)
    .send(buffer);
});

See Also

AI Context

package: "@xenterprises/fastify-xwhatconverts"
method: fastify.xwhatconverts.recordings.get(leadId)
use-when: Fetch a WhatConverts call recording as an ArrayBuffer — use getBuffer() if you need a Node.js Buffer
params: leadId (string, required)
returns: ArrayBuffer containing MP3 audio data
Copyright © 2026