SDK reference · Python SDK
prov.account.add_sending_number_consent_evidence
prov.account.add_sending_number_consent_evidence in Python SDK. An image (PNG or JPEG, up to 5 MB) of how people agree, for a number that needs a fix.
Signature
prov.account.add_sending_number_consent_evidence(number_id: str, image: bytes, content_type: str = …) -> AnyParameters
number_idstrRequiredimagebytesRequiredcontent_typestr
Request fields
idstringpathRequired- The sending number's id.
Returns
Any The image's unlisted link.
HTTP operation
POST /v1/account/sending_numbers/{id}/consent_evidence: Add an image of how people agree
Errors
- authentication_required
- consent_evidence_too_large
- insufficient_role
- parameter_invalid
- rate_limit_exceeded
- resource_missing
- sending_number_not_rejected
Example
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/sending_numbers/snum_4f2a9c0e7b1d3e5a6c8b/consent_evidence`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "image/png" },
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/account/sending_numbers/snum_4f2a9c0e7b1d3e5a6c8b/consent_evidence", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "image/png"}).json()