REST Resource: projects.phoneNumbers

Resource: PhoneNumber

Represents a phone number. PhoneNumber resources enable phone calls to be answered by Dialogflow services and are added to a project through a PhoneNumberOrder.

JSON representation
{
  "name": string,
  "phoneNumber": string,
  "conversationProfile": string,
  "lifecycleState": enum (LifecycleState),
  "purgeTime": string,

  // Union field inbound_restriction can be only one of the following:
  "allowedSipTrunks": {
    object (AllowedSipTrunks)
  }
  // End of list of possible types for union field inbound_restriction.
}
Fields
name

string

Optional. The unique identifier of this phone number. Required for PhoneNumbers.UpdatePhoneNumber method. Format: projects/<Project ID>/phoneNumbers/<PhoneNumber ID>. Format: projects/<Project ID>/locations/<Location ID>/phoneNumbers/<PhoneNumber ID>.

phoneNumber

string

Output only. Phone number in E.164 format. An example of a correctly formatted phone number: +15556767888.

conversationProfile

string

Optional. The conversation profile calls to this PhoneNumber should use. The project ID here should be the same as the one in name. Format: projects/<Project ID>/conversationProfiles/<ConversationProfile ID>. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<ConversationProfile ID>.

lifecycleState

enum (LifecycleState)

Output only. The state of the PhoneNumber. Defaults to ACTIVE. PhoneNumber objects set to DELETE_REQUESTED always decline incoming calls and can be removed completely within 30 days.

purgeTime

string (Timestamp format)

Output only. The time at which this resource will be purged.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

Union field inbound_restriction. Restricts inbound calls inbound_restriction can be only one of the following:
allowedSipTrunks

object (AllowedSipTrunks)

Optional. Only allow calls from the specified SIP trunks.

Methods

delete

Requests deletion of a PhoneNumber.

list

Returns the list of all phone numbers in the specified project.

patch

Updates the specified PhoneNumber.

undelete

Cancels the deletion request for a PhoneNumber.