Skip to content

Phone Numbers RPC API

Service: numbering.api.enfonica.com

To call this service, we recommend that you use a supported Enfonica client library. If a client library is not available in your language or framework of choice, or if you need to write your own client, use the following information when you make API requests.

Service endpoint

Phone Numbers has the following service endpoint:

  • numbering.api.enfonica.com

Service: enfonica.numbering.v1beta1.PhoneNumberInstances

CreatePhoneNumberInstance
rpc CreatePhoneNumberInstance(CreatePhoneNumberInstanceRequest) returns (PhoneNumberInstance)

Creates a phone number instance. This provisions a phone number against a project.

The caller must have numbering.phoneNumberInstances.create permission on the project.
DeletePhoneNumberInstance
rpc DeletePhoneNumberInstance(DeletePhoneNumberInstanceRequest) returns (PhoneNumberInstance)

Deletes a phone number instance. This disconnects the phone number.

The caller must have numbering.phoneNumberInstances.delete permission on the project.
GetPhoneNumberInstance
rpc GetPhoneNumberInstance(GetPhoneNumberInstanceRequest) returns (PhoneNumberInstance)

Retrieves a phone number instance identified by the supplied resource name.

The caller must have numbering.phoneNumberInstances.get permission on the project.
ListPhoneNumberInstances
rpc ListPhoneNumberInstances(ListPhoneNumberInstancesRequest) returns (ListPhoneNumberInstancesResponse)

Lists all phone number instances.

List returns phone number instances sorted by create_time descending.

The caller must have numbering.phoneNumberInstances.list permission on the project.
MovePhoneNumberInstance
rpc MovePhoneNumberInstance(MovePhoneNumberInstanceRequest) returns (PhoneNumberInstance)

Moves the phone number instance to another project.

Warning: moving a phone number instance may cause the current configuration of the phone number instance to stop working. Any connected flows or SIP domains will need to be reconfigured in the destination project. Any programmable handler will need to accept the signing key of the destination project.

The caller must have numbering.phoneNumberInstances.move permission on both the source and destination projects.
SplitRange
rpc SplitRange(SplitRangeRequest) returns (SplitRangeResponse)

Splits a phone number range into two ranges.

To split a range, you specify how many numbers to keep in this range. These numbers are taken from the start of the range. The remaining numbers will be moved into a new range.

For example, if you have a range +61255501100-99 and you split it with a size of 20, then: - the original range will be modified to +61255501100-19 (size 20) - a new range will be created with +61255501120-99 (size 80)

The caller must have numbering.phoneNumberInstances.splitRange permission on the project.
UpdatePhoneNumberInstance
rpc UpdatePhoneNumberInstance(UpdatePhoneNumberInstanceRequest) returns (PhoneNumberInstance)

Updates a phone number instance.

The caller must have numbering.phoneNumberInstances.update permission on the project.

Service: enfonica.numbering.v1beta1.PhoneNumbers

SearchPhoneNumbers
rpc SearchPhoneNumbers(SearchPhoneNumbersRequest) returns (SearchPhoneNumbersResponse)

Searches available phone numbers with the specified filters.

Search returns phone numbers sorted by create_time descending.

The caller must be authenticated.

Service: enfonica.numbering.v1beta1.RegulatoryListings

CreateRegulatoryListing
rpc CreateRegulatoryListing(CreateRegulatoryListingRequest) returns (RegulatoryListing)

Creates a regulatory listing.

By creating a regulatory listing, you acknowledge that the person or entity located at the specified address is the only party that will be utilizing phone numbers associated with this regulatory listing. You acknowledge that Enfonica may process the information provided for the purpose of identity verification, and will share this information with local telecommunications providers or authorities where required by local law. You understand that Enfonica phone numbers may be taken out of service if inaccurate or false information has been provided.

The caller must have numbering.regulatoryListings.create permission on the project.
DeleteRegulatoryListing
rpc DeleteRegulatoryListing(DeleteRegulatoryListingRequest) returns (google.protobuf.Empty)

Deletes a regulatory listing. Regulatory listings that are associated with an active phone number instance cannot be deleted.

The caller must have numbering.regulatoryListings.delete permission on the project.
GetRegulatoryListing
rpc GetRegulatoryListing(GetRegulatoryListingRequest) returns (RegulatoryListing)

Retrieves a regulatory listing.

The caller must have numbering.regulatoryListings.get permission on the project.
ListRegulatoryListings
rpc ListRegulatoryListings(ListRegulatoryListingsRequest) returns (ListRegulatoryListingsResponse)

Lists all regulatory listings.

List returns regulatory listings sorted by create_time descending.

The caller must have numbering.regulatoryListings.list permission on the project.
SearchRegulatoryListings
rpc SearchRegulatoryListings(SearchRegulatoryListingsRequest) returns (SearchRegulatoryListingsResponse)

Searches all usable regulatory listings with the specified number type.

List returns regulatory listings sorted by create_time descending.

The caller must have numbering.regulatoryListings.list permission on the project.
UpdateRegulatoryListing
rpc UpdateRegulatoryListing(UpdateRegulatoryListingRequest) returns (RegulatoryListing)

Updates a regulatory listing.

The caller must have numbering.regulatoryListings.update permission on the project.