Skip to content

Fix Python SDK to match real Truelist API#1

Merged
coreyhaines31 merged 1 commit into
developmentfrom
fix/real-api
Feb 21, 2026
Merged

Fix Python SDK to match real Truelist API#1
coreyhaines31 merged 1 commit into
developmentfrom
fix/real-api

Conversation

@coreyhaines31

Copy link
Copy Markdown
Collaborator

Summary

  • Endpoint: POST /api/v1/verify_inline?email=... (query param, no body)
  • Account: GET /me with nested response
  • Removed form_validate, form_api_key, is_free_email
  • New fields: domain, canonical, mx_record, first_name, last_name, verified_at
  • States: ok/email_invalid/risky/accept_all/unknown

Test plan

  • All 47 tests pass
  • Lint passes

🤖 Generated with Claude Code

- Change validate endpoint from POST /api/v1/verify (JSON body) to POST /api/v1/verify_inline (query param)
- Change account endpoint from GET /api/v1/account to GET /me
- Remove form_validate method (endpoint does not exist)
- Update ValidationResult: remove free_email/role/disposable booleans, add domain/canonical/mx_record/first_name/last_name/verified_at fields
- Map API field names: address->email, email_state->state, email_sub_state->sub_state, did_you_mean->suggestion
- Parse response from emails array wrapper
- Update AccountInfo: replace plan/credits with name/uuid/time_zone/is_admin_role/payment_plan
- Add is_disposable and is_role convenience properties checking sub_state
- Update is_valid/is_invalid to check ok/email_invalid states
- Update all tests and README to match

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coreyhaines31 coreyhaines31 merged commit 51793c5 into development Feb 21, 2026
6 of 7 checks passed
@coreyhaines31 coreyhaines31 deleted the fix/real-api branch February 21, 2026 11:24
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