X Enterprises
fastify-xwhatconverts

profiles.delete

Delete a WhatConverts profile by ID.

profiles.delete

Delete a profile by its WhatConverts ID. Also accessible as profiles.remove.

Signature

fastify.xwhatconverts.profiles.delete(profileId: string): Promise<object>

// alias
fastify.xwhatconverts.profiles.remove(profileId: string): Promise<object>

Params

NameTypeRequiredDescription
profileIdstringYesID of the profile to delete.

Returns

A WhatConverts deletion result object.

Throws

  • [xWhatConverts] profiles.delete: profileId is required — called without profileId.
  • [xWhatConverts] Network error: <message> — network-level failure.
  • [xWhatConverts] API error: <status> — non-2xx response; 404 if profile not found.

Examples

Basic — delete a profile

await fastify.xwhatconverts.profiles.delete("98765");

Realistic — clean up unused profiles

fastify.delete("/profiles/:profileId", async (request, reply) => {
  const { profileId } = request.params;

  try {
    await fastify.xwhatconverts.profiles.delete(profileId);
    return reply.status(204).send();
  } catch (err) {
    if (err.statusCode === 404) {
      return reply.status(404).send({ error: "Profile not found" });
    }
    throw err;
  }
});

See Also

AI Context

package: "@xenterprises/fastify-xwhatconverts"
method: fastify.xwhatconverts.profiles.delete(profileId)
use-when: Permanently delete a WhatConverts profile by ID
params: profileId (string, required)
returns: deletion confirmation object
Copyright © 2026