NowVoiceEndpoint structure - iOS

  • Release version: Zurich
  • Updated July 14, 2026
  • 1 minute to read
  • Describes a voice agent endpoint.

    A voice endpoint identifies the specific voice agent channel to connect to. Use NowVoiceService.configurations to obtain available NowVoiceEndpoints. Endpoints are retrieved from your ServiceNow instance's Mobile SDK settings. In most apps, there is a single endpoint.

    Table 1. Properties
    Name Type Description
    mobileChannelType String The mobile channel type for the endpoint.
    mobileChannelId String The mobile channel identifier.
    voiceServiceId String The unique identifier of the voice service.
    voiceWebHookURL String The WebSocket webhook URL for the voice agent.

    The following code example shows how to retrieve an instance of NowVoiceEndpoint from NowVoiceService.configurations.

    import NowVoice
    
    let instanceUrl = URL(string: "https://your-instance.service-now.com")!
    
    do {
        let voiceService = try await NowVoice.makeVoiceService(instanceUrl: instanceUrl) //creates a NowVoiceService
    } catch {
        // Handle NowServiceError
        print("Failed to create voice service: \(error)")
    }
    
    guard let endpoint = voiceService.configurations.first else {
        // No voice endpoints configured on this instance.
        return
    }