View as Markdown

SDK reference · Node SDK

prov.account.sendingNumber

prov.account.sendingNumber in Node SDK. One sending number, with its steps and timeline.

Signature

prov.account.sendingNumber(id: string): Promise<SendingNumber>

Parameters

idstringRequired

Request fields

idstringpathRequired
The sending number's id.

Returns

Promise<SendingNumber> The sending number, with events.

HTTP operation

GET /v1/account/sending_numbers/{id}: Get a sending number

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/sending_numbers`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "legal_name": "Pellowmarsh Clinics LLC",
    "business_type": "private_company",
    "tax_id": "12-3456789",
    "address": {
      "line1": "100 Sample Street",
      "city": "Springfield",
      "region": "IL",
      "postal_code": "62701",
      "country": "US"
    },
    "website": "https://pellowmarsh.example",
    "privacy_url": "https://pellowmarsh.example/privacy",
    "terms_url": "https://pellowmarsh.example/terms",
    "contact": {
      "name": "Mara Okonjo",
      "email": "mara@pellowmarsh.example",
      "phone": "+12175550118"
    },
    "monthly_volume": 1000,
    "consent": {
      "mode": "company",
      "method": "sign_up_form"
    }
  }),
})).json();
const snumId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/sending_numbers/${snumId}`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.