public PrepareResult deployApp(String applicationPath, PrepareParams.Builder paramsBuilder)  {
        String endpoints = """
                [
                  {
                    "clusterId": "container",
                    "names": [
                      "c.example.com"
                    ],
                    "scope": "zone",
                    "routingMethod": "exclusive"
                  }
                ]
                """;
        paramsBuilder.applicationId(applicationId)
                     .timeoutBudget(new TimeoutBudget(clock, Duration.ofSeconds(60)))
                     .containerEndpoints(endpoints);

        return applicationRepository.deploy(new File(applicationPath), paramsBuilder.build());
    }
Do the initial "deploy" with the existing API-less code as the deploy API doesn't support first deploys yet.
configserver/src/test/java/com/yahoo/vespa/config/server/deploy/DeployTester.java