Repository navigation
fix: match what the live API accepts (every endpoint called live) - #30
Merged
Merged
Conversation
Every SDK method was called against the live API (both clients, every
endpoint, success or failure). Where the API and the docs disagree, the SDK
now follows the API:
- validate_batch: timeout is sent as a string. As a JSON number the API
rejected the whole batch with "Invalid API Key or your account ran out of
credits".
- send_evaluated_file(file_id): takes the list evaluator's file_id. The docs
describe a file upload, which the API rejects ("file_id: This field is
required"). Verified: the evaluator's id starts a validation job.
- S3 / SFTP jobs require return_url (the API answers "Provided return URL is
not permitted: None" without one) and validate_sftpfile requires file_name.
With them, every job passes payload validation and stops only at the
account's missing AWS / SFTP setup.
- ZeroBounceWarmup.check_domain_dmarc takes an email address; the API rejects
a bare domain ("Please provide a valid email address").
- A JSON-list error body (["In-progress tests cannot be deleted."]) reads as
its first message.
- ZBApiException.status_code is set by the main client too (403 from
Cloudflare, 400/404 from the API).
Docs, AGENTS.md (new "live API wins over the docs" rule with the known cases)
and CHANGELOG updated. 130 offline tests on Python 3.12 and 3.9; all 63 doc
examples run offline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every SDK method was called against the live API: the validation-API client and
ZeroBounceWarmup, every endpoint, successful or not, to check field names, types and response shapes. Where the live API and the docs disagree, the SDK now follows the API.Fixed
validate_batch(timeout=…)timeoutis sent as a stringsend_evaluated_filefile_idstarts a validation jobsend_evaluated_file(file_id)return_url: "Provided return URL is not permitted: None";validateSFTPfilewithoutfile_name: "This field is required"check_domain_dmarc["In-progress tests cannot be deleted."])ZBApiException.status_codeset (403 Cloudflare, 400/404 API)Verified live (no change needed)
validateoption (GET and POST), batch, credits, usage, activity, scoring, email finder, domain search,guess_format, filters (add → visible after propagation → delete → "does not exist").API issues to report (not SDK bugs)
test-smtp-configurationreturns HTTP 500 for any failed SMTP login (documented as a failure message).send-evaluated-file, S3/SFTPreturn_url,validateSFTPfilefile_name,check-domain-dmarcandvalidatebatchtimeoutdescribe what the API rejects.file_idvalues on bulkapi instead of an API error.Test plan
ruff check,compileall,pytest— 130 passed on Python 3.12 and 3.9🤖 Generated with Claude Code