feat: add internal flag to Endpoint create params (VT-9534) - #317
Closed
revanth-plivo wants to merge 2 commits into
Closed
feat: add internal flag to Endpoint create params (VT-9534)#317revanth-plivo wants to merge 2 commits into
revanth-plivo wants to merge 2 commits into
Conversation
Adds an optional internal kwarg to Endpoints.create so callers can mark newly created SIP endpoints as internal at creation time. Enables Plivo CX (Contacto) to flag auto-created browser-SDK endpoints so the Endpoint listing API's existing internal filter can hide them from customer consoles. Backwards-compatible: internal defaults to None and is dropped by to_param_dict, so existing callers see identical wire behavior. Only callers that explicitly pass internal=True opt into the new path.
revanth-plivo
force-pushed
the
VT-9534-add-internal-endpoint-flag
branch
from
July 27, 2026 12:32
2637abe to
62a0d81
Compare
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
Adds an optional
internalargument to the Endpointcreatemethod so callers can mark newly created SIP endpoints as internal at creation time.Why
Plivo CX (Contacto) auto-creates a SIP endpoint per AOM during user invite for browser-SDK playback. These internal endpoints currently leak into the customer's Endpoints tab in the console (Pylon #2460), causing confusion, prod alerts, and a security concern. The trace service already supports an
internalcolumn on the endpoint model + defaults the List API to exclude internal endpoints. What's missing is the ability for the auto-create call (Hodor) to actually mark endpoints asinternal=trueat creation time. This SDK change unblocks that.Change
plivo/resources/endpoints.py— added optionalinternalkwarg toEndpoints.create, forwarded to the request body when set (serialized as JSON keyinternal).setup.py,plivo/version.py,CHANGELOG.md— patch version bump (4.61.0 -> 4.61.1).Backwards-compatibility
When
internalis unset (defaultNone),to_param_dictdrops it and the wire payload is unchanged. Only callers that explicitly setinternal=Trueopt into the new path.Test plan
python -m py_compile plivo/resources/endpoints.pycleanapi.plivo.comcreate endpoint withinternal=trueand verifysubscriber.internal = trueon the row (validated separately by the CX team's integration)Related