Skip to content

Fix React package to match real Truelist API - #1

Merged
coreyhaines31 merged 2 commits into
developmentfrom
fix/real-api
Feb 21, 2026
Merged

Fix React package to match real Truelist API#1
coreyhaines31 merged 2 commits into
developmentfrom
fix/real-api

Conversation

@coreyhaines31

Copy link
Copy Markdown
Collaborator

Summary

  • Endpoint: POST /api/v1/verify_inline?email=... (query param, no body)
  • Default rejectStates changed from ["invalid"] to ["email_invalid"]
  • New fields: domain, canonical, mxRecord, firstName, lastName, verifiedAt
  • Added risky to ValidationState type union
  • Removed freeEmail, role/disposable booleans, endpoint config

Test plan

  • TypeScript typecheck passes
  • ESLint passes

🤖 Generated with Claude Code

coreyhaines31 and others added 2 commits February 21, 2026 03:03
- Change verify endpoint from POST /api/v1/form_verify (JSON body) to
  POST /api/v1/verify_inline?email=... (query param, no body)
- Change account endpoint from GET /api/v1/account to GET /me
- Unwrap response from emails[] array wrapper
- Map API field names: address->email, email_state->state,
  email_sub_state->subState, did_you_mean->suggestion
- Add new fields: domain, canonical, mxRecord, firstName, lastName, verifiedAt
- Remove fields that dont exist in real API: freeEmail, role, disposable
- Update state values: valid->ok, invalid->email_invalid, new accept_all
- Update sub-state values: ok->email_ok, disposable_address->is_disposable,
  role_address->is_role, unknown->unknown_error, new failed_smtp_check
- Remove form_verify/verify endpoint option (single endpoint now)
- Update Zod and React Hook Form integrations
- Update README with correct API details

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coreyhaines31
coreyhaines31 merged commit d61ebb4 into development Feb 21, 2026
1 check passed
@coreyhaines31
coreyhaines31 deleted the fix/real-api branch February 21, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant