feat: add compliance_application_id param to numbers.buy()#314
Merged
koushiksk-plivo (koushiksk-plivo) merged 1 commit intoJun 12, 2026
Merged
Conversation
Adds an optional compliance_application_id parameter to the phone-number buy method, sent as the compliance_application_id wire param. Lets regulated numbers (e.g. India) be purchased with an approved regulatory compliance application linked at purchase time. Backward-compatible trailing optional kwarg. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
revanth-plivo
approved these changes
Jun 12, 2026
989c589
into
master
7 of 12 checks passed
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.
What
Adds an optional
compliance_application_idparameter tonumbers.buy()(the phone-number purchase method). It is forwarded as thecompliance_application_idwire parameter on the POST request. Also bumps the SDK version to4.61.0with a matching CHANGELOG entry and adds test coverage.Why
Regulated numbers (e.g. India) require an approved regulatory compliance application to be linked at purchase time. Previously
buy()only sentapp_id/cnam_lookup/ha_enable(andverification_info), with no way to associate a compliance application during the buy call.The new parameter is a trailing optional argument, so the change is fully backward-compatible — existing callers are unaffected.
Testing
The full
tests/resources/test_numbers.pysuite passes (10/10), including the newtest_create_with_compliance_application_idwhich asserts the param is serialized onto the request body.🤖 Generated with Claude Code