@getdial/sdk - v0.46.0
    Preparing search index...

    Interface PhoneNumber

    interface PhoneNumber {
        accountId: string;
        avatarUrl: string | null;
        callingEnabled: boolean;
        capabilities: ("imessage" | "whatsapp" | "sms" | "call")[];
        country: string;
        createdAt: string;
        firstName: string | null;
        forwardTo: string | null;
        id: string;
        inboundCallPolicy: InboundCallPolicy | null;
        inboundInstruction: string | null;
        inboundLanguage: string | null;
        inboundVoiceGender: "male" | "female" | null;
        lastName: string | null;
        maxCallDurationSeconds: number | null;
        nickname: string | null;
        number: string;
        profileResults?: ProfileResults;
        replacedAt?: string | null;
        replacedBy?: { id: string; number: string } | null;
        replaces?: { id: string; number: string; replacedAt: string }[];
        setupError: string | null;
        setupStatus: "provisioning" | "ready" | "failed";
        whatsapp?:
            | {
                error: string
                | null;
                retryAvailableAt: string | null;
                status:
                    | "provisioning"
                    | "warming_up"
                    | "ready"
                    | "failed"
                    | "banned"
                    | "paused";
            }
            | null;
        whatsappAvatarUrl: string
        | null;
        whatsappName: string | null;
    }
    Index
    accountId: string
    avatarUrl: string | null

    Dial-hosted URL of the number's iMessage avatar photo; null when unset or not an iMessage number.

    callingEnabled: boolean

    Whether calling is switched on for this number, in both directions. false means inbound calls aren't connected (the caller is never answered) and placing a call from the number is refused with 409 calling_disabled; messaging is unaffected either way.

    Separate from PhoneNumber.capabilities, which reports what the line was provisioned to do and does not change when this is flipped — so a messaging-only number still lists "call" there. A call can be placed from this number right now only when capabilities contains "call", setupStatus is "ready", and this is true.

    capabilities: ("imessage" | "whatsapp" | "sms" | "call")[]

    Channels the number supports: ["sms","call"], ["sms","call","imessage"], or that plus "whatsapp" once a WhatsApp registration on the line is live.

    "whatsapp" appears only when the channel actually works — while it's still being set up, watch PhoneNumber.whatsapp instead.

    country: string
    createdAt: string
    firstName: string | null

    iMessage display first name; always null on numbers without iMessage.

    forwardTo: string | null

    E.164 number inbound calls to this number are forwarded to instead of the AI voice agent answering; null (the default) → the AI voice agent answers. Ignored while callingEnabled is false.

    id: string
    inboundCallPolicy: InboundCallPolicy | null

    The allow list screening inbound calls on this number (its own, else the account-wide one), or null when every caller rings through. Always null on numbers that can't take calls.

    inboundInstruction: string | null

    System prompt the AI voice agent uses on inbound calls; null for legacy numbers.

    inboundLanguage: string | null

    BCP-47 language tag pinning inbound calls to one language; null → detected from the caller's country prefix on each call.

    inboundVoiceGender: "male" | "female" | null

    Voice gender for inbound calls ("male"/"female"); null → female (the default).

    lastName: string | null

    iMessage display last name; always null on numbers without iMessage.

    maxCallDurationSeconds: number | null

    Per-number call-length cap in seconds; null → no cap at this level.

    nickname: string | null

    Human-readable label for the number; null when unset.

    number: string
    profileResults?: ProfileResults

    Only on the result of DialClient.setNumberProperties, when the update targeted a display profile: each targeted channel's outcome, updated or failed. A failed channel was left unchanged while the other channel and the rest of the update were saved — check it after a profile update, fix the cause, and retry just that channel.

    replacedAt?: string | null

    When this number was replaced; null for a live number.

    replacedBy?: { id: string; number: string } | null

    On a replaced number, the live number it routes to; null for a live number.

    replaces?: { id: string; number: string; replacedAt: string }[]

    Numbers this one replaced, newest first. Dial can move a number onto a new line: the id and settings stay, number becomes the new E.164, and the old E.164 is listed as a replaced number. A replaced number's id still works anywhere a number is named; its old E.164 no longer works.

    setupError: string | null

    Human-readable reason when setupStatus is failed; null otherwise.

    setupStatus: "provisioning" | "ready" | "failed"

    Whether the number is ready to use. SMS/call numbers are always ready; iMessage numbers may be provisioning until set up, or failed on error.

    whatsapp?:
        | {
            error: string
            | null;
            retryAvailableAt: string | null;
            status:
                | "provisioning"
                | "warming_up"
                | "ready"
                | "failed"
                | "banned"
                | "paused";
        }
        | null

    The WhatsApp channel's own setup state, or null when the number has no WhatsApp registration at all.

    Independent of setupStatus: they're separate tracks on one line, so voice caller-ID can be ready while WhatsApp is failed, and the other way round.

    Type Declaration

    • {
          error: string | null;
          retryAvailableAt: string | null;
          status:
              | "provisioning"
              | "warming_up"
              | "ready"
              | "failed"
              | "banned"
              | "paused";
      }
      • error: string | null

        Human-readable reason when status is failed, banned or paused; null otherwise.

      • retryAvailableAt: string | null

        ISO-8601: when WhatsApp will accept another verification attempt, or null. Set only on a failed track, and only while still in the future — a retry is refused until it lifts.

      • status: "provisioning" | "warming_up" | "ready" | "failed" | "banned" | "paused"

        warming_up: a number you connected is registered and warming up (about 6 hours) before first use. banned: WhatsApp withdrew a line that was working; permanent. paused: Dial temporarily paused WhatsApp sending on the line; it returns to ready on its own.

    • null
    whatsappAvatarUrl: string | null

    Dial-hosted URL of the number's WhatsApp avatar; null when unset.

    whatsappName: string | null

    WhatsApp display name; null on numbers without a WhatsApp track.