X Enterprises
fastify-xwhatconverts

profiles.update

Update a WhatConverts profile's name or URL.

profiles.update

Update an existing profile's name or URL.

Signature

fastify.xwhatconverts.profiles.update(
  profileId: string,
  params: {
    profileName?: string;
    profileUrl?: string;
  }
): Promise<object>

Params

NameTypeRequiredDescription
profileIdstringYesID of the profile to update.
params.profileNamestringNoNew display name for the profile.
params.profileUrlstringNoNew website URL for the profile.

Returns

The updated WhatConverts profile object.

Throws

  • [xWhatConverts] profiles.update: profileId is required — called without profileId.
  • [xWhatConverts] profiles.update: params object is required — called without a params object.
  • [xWhatConverts] Network error: <message> — network-level failure.
  • [xWhatConverts] API error: <status> — non-2xx response from WhatConverts.

Examples

Basic — rename a profile

const profile = await fastify.xwhatconverts.profiles.update("98765", {
  profileName: "Main Website (Updated)",
});
console.log(profile.profile_name);

Realistic — update profile URL on site migration

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

  const profile = await fastify.xwhatconverts.profiles.update(profileId, {
    profileUrl: newUrl,
  });

  return { profileId: profile.profile_id, url: profile.profile_url };
});

See Also

AI Context

package: "@xenterprises/fastify-xwhatconverts"
method: fastify.xwhatconverts.profiles.update(profileId, params)
use-when: Update a WhatConverts profile's name or settings
params: profileId (string, required), profileName (string, required)
returns: updated WhatConverts profile object
Copyright © 2026