@getdial/sdk - v0.38.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;
        inboundInstruction: string | null;
        inboundLanguage: string | null;
        inboundVoiceGender: "male" | "female" | null;
        lastName: string | null;
        maxCallDurationSeconds: number | null;
        nickname: string | null;
        number: string;
        setupError: string | null;
        setupStatus: "provisioning" | "ready" | "failed";
        whatsapp?:
            | {
                error: string
                | null;
                retryAvailableAt: string | null;
                status: "provisioning" | "warming_up" | "ready" | "failed" | "banned";
            }
            | 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
    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
    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";
        }
        | 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";
      }
      • error: string | null

        Human-readable reason when status is failed or banned; 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"

        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.

    • 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.