BIO.RE
Creator

Get DM Config

Read the creator's current DM type, price, and active flag. Owner-only.

GET /api/v1/creators/:creatorId/dm-config — 🔑 Bearer

Returns the calling creator's DM configuration: pricing type (FREE / SINGLE_PAY / PER_MESSAGE), the price (decimal, null when FREE), and the active flag. Ownership-checked — creatorId must match the bearer's CreatorProfile.id.

For a public read of just the DM-related fields (along with dmActive already adjusted for vacation mode), look at the dmType / dmPrice / dmActive fields on GET /bio/:username. This endpoint is the editor-side raw read.

Request

Path parameters

ParamTypeValidationNotes
creatorIdstring (UUID)ParseUUIDPipeMust match the bearer's CreatorProfile.id (otherwise 403)
HeaderRequiredNotes
Authorization: Bearer <accessToken>JWT from POST /auth/login

Response

200 OKApiResponseOf<DMConfigResponseDto>

{
  "success": true,
  "data": {
    "dmType": "SINGLE_PAY",
    "dmPrice": "5.00",
    "dmActive": true
  }
}
FieldTypeNotes
dmTypeenum | nullFREE / SINGLE_PAY / PER_MESSAGE, or null if never configured
dmPricestring | nullDecimal as string for precision; null when dmType === 'FREE' or unconfigured
dmActivebooleanRaw value from CreatorProfile.dmActive. The public-render dmActive (in GET /bio/:username) is computed as dmActive && !vacationMode — this endpoint returns the unadjusted raw flag.

Errors

HTTPcode / i18nKeyReason
400(validation)creatorId not a valid UUID
401(guard)Missing / invalid bearer token
403(verifyCreatorOwnership)creatorId does not belong to the bearer's user
404creator.dm.not_foundCreatorProfile row missing

Side effects

  1. Ownership checkverifyCreatorOwnership(creatorId, userId) → 403 on mismatch.
  2. prisma.creatorProfile.findUnique({ where: { id: creatorId }, select: { dmType, dmPrice, dmActive } }).
  3. Throw not_found if missing.
  4. Return the row. No mutations.

Code samples

curl https://api.bio.re/api/v1/creators/c1a2b3c4-d5e6-7890-abcd-ef1234567890/dm-config \
  -H "Authorization: Bearer $ACCESS_TOKEN"
type DMConfig = {
  dmType: 'FREE' | 'SINGLE_PAY' | 'PER_MESSAGE' | null;
  dmPrice: string | null;
  dmActive: boolean;
};

async function getDMConfig(accessToken: string, creatorId: string): Promise<DMConfig> {
  const res = await fetch(`https://api.bio.re/api/v1/creators/${creatorId}/dm-config`, {
    headers: { Authorization: `Bearer ${accessToken}` },
  });
  const json = await res.json();
  if (!res.ok || !json.success) {
    throw Object.assign(new Error(json?.error?.message ?? 'DM config fetch failed'), {
      code: json?.error?.code,
    });
  }
  return json.data;
}
import { useQuery } from '@tanstack/react-query';

export const creatorKeys = {
  dmConfig: (creatorId: string) => ['creators', creatorId, 'dm-config'] as const,
};

export function useDMConfig(creatorId: string) {
  return useQuery({
    queryKey: creatorKeys.dmConfig(creatorId),
    queryFn: async () => {
      const res = await fetch(`/api/v1/creators/${creatorId}/dm-config`);
      const json = await res.json();
      if (!res.ok || !json.success) {
        throw Object.assign(new Error(json?.error?.message ?? 'DM config fetch failed'), {
          code: json?.error?.code,
          i18nKey: json?.error?.i18nKey,
        });
      }
      return json.data as DMConfig;
    },
    enabled: Boolean(creatorId),
    staleTime: 30_000,
  });
}

Try it

GET
/api/v1/creators/{creatorId}/dm-config
AuthorizationBearer <token>

In: header

Path Parameters

creatorId*string

Response Body

application/json

application/json

application/json

curl -X GET "https://loading/api/v1/creators/string/dm-config"
{
  "success": true,
  "data": {
    "dmType": "FREE",
    "dmPrice": "5.00",
    "dmActive": true
  }
}
{
  "success": false,
  "error": {
    "code": "AUTH_UNAUTHORIZED",
    "message": "Invalid credentials",
    "i18nKey": "auth.login.invalid_credentials",
    "i18nVars": {
      "field": "email"
    },
    "details": [
      {
        "message": "email must be an email"
      }
    ],
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}
{
  "success": false,
  "error": {
    "code": "AUTH_UNAUTHORIZED",
    "message": "Invalid credentials",
    "i18nKey": "auth.login.invalid_credentials",
    "i18nVars": {
      "field": "email"
    },
    "details": [
      {
        "message": "email must be an email"
      }
    ],
    "correlationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}

Source

SourcePathLines
Controllerapps/api-core/src/modules/creator/creator.controller.ts203–211 (getDMConfig)
DTO (response)apps/api-core/src/modules/creator/dto/creator-client-response.dto.ts460–469 (DMConfigResponseDto)
Serviceapps/api-core/src/modules/creator/creator.service.ts565–572 (getDMConfig)
Prisma modelpackages/prisma/prisma/schema.prismaCreatorProfile.dmType, CreatorProfile.dmPrice, CreatorProfile.dmActive

On this page