BIO.RE
Creator

Resend Confirmation Email

Generate a fresh confirmation token and re-dispatch the email via the active email provider. Always returns the same safe message — no enumeration leak.

POST /api/v1/creators/subscribe/resend — 🌐 Public · Rate limit: 3 req / hour

If an unconfirmed subscription exists for the submitted email, generates a new confirmToken and re-sends the confirmation email through the active email provider (admin-managed via external.email.active_provider). Always returns the same safe message — successfully or not — so the endpoint can't be abused for email enumeration.

No enumeration possible. Whether the email is registered, confirmed, or unknown, the response is identical. Don't try to disambiguate states client-side.

Request

Body — ResendConfirmationDto

FieldTypeRequiredValidationNotes
emailstringIsEmail()The email to resend to. Server lowercases + trims.

No headers required.

Response

200 OKApiResponseOf<MessageResponseDto>

{
  "success": true,
  "data": {
    "message": "If an unconfirmed subscription exists, a confirmation email has been sent."
  }
}
FieldTypeNotes
messagestringAlways the same safe phrase, regardless of whether anything was sent.

Errors

HTTPcode / i18nKeyReason
400(DTO validation)Email format failure
429(throttle)Rate limit exceeded (3 req/hour)

Side effects

  1. Normalize email: .toLowerCase().trim().
  2. Lookup BioEmailSubscriber where email = normalizedEmail AND confirmed = false.
  3. If absent — return the safe message. No mutations, no email sent.
  4. If found:
    • Generate newToken = randomUUID().
    • bioEmailSubscriber.update({ where: { id }, data: { confirmToken: newToken } }).
    • Build confirm URL with the new token (<seo.canonical_base_url>/subscribe/confirm?token=<newToken>).
    • Fire-and-forget dispatch via notificationService.send({ eventKey: 'email_subscription_confirm', userId: 'system', variables: { confirmUrl, email } }). Failure is logged.
    • Return the safe message.

Code samples

curl -X POST https://api.bio.re/api/v1/creators/subscribe/resend \
  -H 'Content-Type: application/json' \
  -d '{"email": "[email protected]"}'
async function resendSubscriptionConfirmation(email: string): Promise<string> {
  const res = await fetch('https://api.bio.re/api/v1/creators/subscribe/resend', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ email }),
  });
  const json = await res.json();
  if (!res.ok || !json.success) {
    throw Object.assign(new Error(json?.error?.message ?? 'Resend failed'), {
      code: json?.error?.code,
    });
  }
  return json.data.message as string;
}
import { useMutation } from '@tanstack/react-query';

export function useResendSubscriptionConfirmation() {
  return useMutation({
    mutationFn: async (email: string) => {
      const res = await fetch('/api/v1/creators/subscribe/resend', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ email }),
      });
      const json = await res.json();
      if (!res.ok || !json.success) {
        throw Object.assign(new Error(json?.error?.message ?? 'Resend failed'), {
          code: json?.error?.code,
          i18nKey: json?.error?.i18nKey,
        });
      }
      return json.data.message as string;
    },
  });
}

Try it

POST
/api/v1/creators/subscribe/resend
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://loading/api/v1/creators/subscribe/resend" \  -H "Content-Type: application/json" \  -d '{    "email": "[email protected]"  }'
{
  "success": true,
  "data": {
    "message": "Operation completed successfully"
  }
}

Source

SourcePathLines
Controllerapps/api-core/src/modules/creator/creator.controller.ts319–327 (resendSubscriptionConfirmation)
DTO (request)apps/api-core/src/modules/creator/dto/resend-confirmation.dto.ts4–8 (ResendConfirmationDto)
DTO (response)apps/api-core/src/common/dto/common-response.dto.tsMessageResponseDto
Serviceapps/api-core/src/modules/creator/creator.service.ts679–712 (resendSubscriptionConfirmation)
Email provider(admin-managed)external.email.active_provider
Configapps/api-core/src/modules/config/config.service.tsseo.canonical_base_url (admin-managed)
Prisma modelpackages/prisma/prisma/schema.prismaBioEmailSubscriber.confirmToken, BioEmailSubscriber.confirmed

On this page