Managing Number Leases
Lease phone numbers to use as dedicated senders for your messages, improving deliverability and brand recognition.
Check Available Numbers
View available phone numbers that can be leased for your account.
const res = await contiguity . lease . available ();
Parameters
No parameters required.
Response
Indicates if there are numbers available for leasing.
Array of available phone numbers with their details.
Request metadata including ID, timestamp, and API version.
Get Number Details
Get detailed information about a specific phone number, including capabilities and pricing.
const res = await contiguity . lease . get ({
number: "+1234567890"
});
Parameters
The phone number to get details for, in E.164 format (e.g., “+1234567890”).
Response
Phone number details and formatting information. The formatted phone number string.
Array of supported capabilities for this number (e.g., [“sms”, “voice”]).
Pricing information for leasing this number.
Request metadata including ID, timestamp, and API version.
Lease a Number
Create a lease for a phone number to use it as a sender.
const res = await contiguity . lease . create ({
number: "+1234567890" ,
billing_method: "monthly" // or "service_contract"
});
You can also lease a number with default billing:
const res = await contiguity . lease . create ({
number: "+1234567890"
});
Parameters
The phone number to lease, in E.164 format (e.g., “+1234567890”).
The billing method for the lease. Options: "monthly"
for recurring monthly charges, "service_contract"
for contract-based billing.
Response
Unique identifier for the created lease.
Current status of the lease (e.g., “active”, “pending”).
Billing information and configuration for the lease.
Request metadata including ID, timestamp, and API version.
View Leased Numbers
Get a list of all numbers you currently have leased.
const res = await contiguity . lease . leased ();
Parameters
No parameters required.
Response
Indicates if any numbers are currently leased.
Array of currently leased phone numbers with their details.
Request metadata including ID, timestamp, and API version.
Get Lease Details
Get detailed information about a specific lease.
const res = await contiguity . lease . details ({
number: "+1234567890"
});
Parameters
The leased phone number to get details for, in E.164 format (e.g., “+1234567890”).
Response
Unique identifier for the lease.
Current status of the lease (e.g., “active”, “expired”, “terminated”).
Billing information and current charges for the lease.
Request metadata including ID, timestamp, and API version.
Terminate a Lease
End a lease for a phone number when you no longer need it.
const res = await contiguity . lease . terminate ({
number: "+1234567890"
});
Parameters
The leased phone number to terminate, in E.164 format (e.g., “+1234567890”).
Response
Unique identifier for the terminated lease.
Confirmation status of the termination (e.g., “terminated”).
ISO 8601 formatted timestamp of when the lease was terminated.
Request metadata including ID, timestamp, and API version.
Using Leased Numbers
Once you have a leased number, you can use it as the from
parameter in your messaging:
// Use leased number as sender for SMS
const res = await contiguity . text . send ({
to: "+1234567890" ,
message: "Hello from your dedicated number!" ,
from: "+15555555555" // your leased number
});
// Use leased number as sender for iMessage
const res = await contiguity . imessage . send ({
to: "+1234567890" ,
message: "Hello via iMessage!" ,
from: "+15555555555" // your leased number
});