didit-sdk 2.34.0 → 2.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,26 @@ module Didit
5
5
  module Resources
6
6
  # The +phone+ resource.
7
7
  class Phone < Didit::Resource
8
+ # @return [Didit::Resources::Phone::Factors]
9
+ def factors
10
+ @factors ||= Factors.new(@client)
11
+ end
12
+
13
+ # @return [Didit::Resources::Phone::Network]
14
+ def network
15
+ @network ||= Network.new(@client)
16
+ end
17
+
18
+ # @return [Didit::Resources::Phone::SdkKeys]
19
+ def sdk_keys
20
+ @sdk_keys ||= SdkKeys.new(@client)
21
+ end
22
+
23
+ # @return [Didit::Resources::Phone::Silent]
24
+ def silent
25
+ @silent ||= Silent.new(@client)
26
+ end
27
+
8
28
  # Risk-score a phone number
9
29
  #
10
30
  # Resolve a phone number and return carrier, line-type, porting, disposable-number, cross-session match, and
@@ -19,7 +39,12 @@ module Didit
19
39
  # `phone.enrichment`. Both keys are absent when no usable intelligence data was returned.
20
40
  #
21
41
  # **Billing.** Live calls use Phone Risk API pricing. The request is billable once the lookup starts, even when
22
- # some best-effort fields are unavailable.
42
+ # some best-effort fields are unavailable. Phone Risk, including the optional `enable_social` add-on, is Phone
43
+ # usage: the free credit pays it only up to $1 a month, shared with phone verification codes, messages and the
44
+ # other Phone lookups. On the Free plan, what the $1 does not cover is paid from your top-up balance; Growth and
45
+ # Scale included credit pays for Phone in full. The request is refused with `403` only when the credit available
46
+ # to Phone, including the add-on, cannot cover it. Phone Risk has no first-top-up requirement; a top-up is
47
+ # needed only when the credit available to Phone (the free $1 or paid credit) cannot cover the lookup.
23
48
  #
24
49
  # **Sandbox.** Sandbox keys validate the request and return deterministic approved data without sending an OTP,
25
50
  # consuming credits, creating a session, or contributing to Networks.
@@ -301,6 +326,737 @@ module Didit
301
326
  request_options: request_options
302
327
  )
303
328
  end
329
+
330
+ # The +phone.factors+ resource.
331
+ class Factors < Didit::Resource
332
+ # Enroll a TOTP factor
333
+ #
334
+ # Enroll a TOTP factor for one of your users, so they confirm a verification with an authenticator app instead
335
+ # of a code. `type` is `totp` and `user_id` is your id for the user.
336
+ #
337
+ # The answer carries `totp.uri`, the `otpauth://` URI to show as a QR code; the authenticator app scans it and
338
+ # starts producing codes.
339
+ #
340
+ # **State.** A new factor is `unverified` until its first code passes `POST /v3/phone/check/`, then
341
+ # `verified`.
342
+ #
343
+ # **One of each type.** A user holds at most one factor: a second one answers `409 factor_exists`.
344
+ #
345
+ # **Authentication.** Send your application's API key in `x-api-key`.
346
+ #
347
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
348
+ #
349
+ # +POST /v3/phone/factors/+
350
+ #
351
+ # @param type [String] The factor to enroll: `totp`, for an authenticator app.
352
+ # @param user_id [String] Your id for the user the factor belongs to; a check names the factor and the user.
353
+ # @param friendly_name [String] Shown in the authenticator app and in the factor list.
354
+ # @param metadata [Hash{String => String}] Up to 10 keys and values of your own, returned with the factor.
355
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
356
+ # @return [Didit::Types::PhoneFactorsCreateResponse]
357
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
358
+ def create(type:, user_id:, friendly_name: OMIT, metadata: OMIT, request_options: nil)
359
+ @client.deprecated("phone.factors.create", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
360
+ @client.request(
361
+ :post,
362
+ "/v3/phone/factors/",
363
+ body: {
364
+ "type" => type,
365
+ "user_id" => user_id,
366
+ "friendly_name" => friendly_name,
367
+ "metadata" => metadata
368
+ },
369
+ response: Types::PhoneFactorsCreateResponse,
370
+ request_options: request_options
371
+ )
372
+ end
373
+
374
+ # Remove a factor
375
+ #
376
+ # Delete an enrolled factor. The factor is deleted at once: its `factor_id` stops working and the TOTP secret
377
+ # it held stop verifying, and the deletion cannot be undone. Verifications the factor already completed stay
378
+ # verified, and the user's other factors are not affected.
379
+ #
380
+ # Enroll the user again with `POST /v3/phone/factors/` to give them a new factor.
381
+ #
382
+ # **Authentication.** Send your application's API key in `x-api-key`.
383
+ #
384
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
385
+ #
386
+ # +DELETE /v3/phone/factors/{factor_id}/+
387
+ #
388
+ # @param factor_id [String] The factor to delete.
389
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
390
+ # @return [nil]
391
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
392
+ def delete(factor_id, request_options: nil)
393
+ @client.deprecated("phone.factors.delete", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
394
+ @client.request(
395
+ :delete,
396
+ "/v3/phone/factors/{factor_id}/",
397
+ path_params: { "factor_id" => factor_id },
398
+ request_options: request_options
399
+ )
400
+ end
401
+
402
+ # List a user's enrolled factors
403
+ #
404
+ # List the factors enrolled for one of your users, so your app can show them and let the user pick the one to
405
+ # check with. `user_id` is required; `type` and `status` narrow the list.
406
+ #
407
+ # The answer is a page: `count`, `next`, `previous` and `results`, each result a factor as Retrieve returns
408
+ # it.
409
+ #
410
+ # **Export.** `format: csv` answers every row that matches the filters as a CSV file.
411
+ #
412
+ # **Paging.** `limit` is 20 by default and 100 at most.
413
+ #
414
+ # **Authentication.** Send your application's API key in `x-api-key`.
415
+ #
416
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
417
+ #
418
+ # +GET /v3/phone/factors/+
419
+ #
420
+ # @param user_id [String] The user whose factors to list: required.
421
+ # @param type [String] Only factors of this type.
422
+ # @param status [String] Only factors in this state.
423
+ # @param limit [Integer] Page size: 20 by default, 100 at most.
424
+ # @param offset [Integer] Zero-based index of the first row. Prefer following `next`.
425
+ # @param format [String] `json` (default) for a page, or `csv` to export every row that matches the filters as
426
+ # CSV.
427
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
428
+ # @return [Didit::Page<Didit::Types::PhoneFactorsListResponseResults>]
429
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
430
+ def list(user_id:, type: OMIT, status: OMIT, limit: OMIT, offset: OMIT, format: OMIT, request_options: nil)
431
+ @client.deprecated("phone.factors.list", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
432
+ @client.request(
433
+ :get,
434
+ "/v3/phone/factors/",
435
+ query: {
436
+ "user_id" => user_id,
437
+ "type" => type,
438
+ "status" => status,
439
+ "limit" => limit,
440
+ "offset" => offset,
441
+ "format" => format
442
+ },
443
+ page: Types::PhoneFactorsListResponseResults,
444
+ request_options: request_options
445
+ )
446
+ end
447
+
448
+ # Retrieve one enrolled factor
449
+ #
450
+ # One enrolled factor: its type, state, user, name, metadata and when it was last used. Read it to show a
451
+ # factor's state after a check changed it, or after it was disabled, without reading the whole list.
452
+ #
453
+ # **Authentication.** Send your application's API key in `x-api-key`.
454
+ #
455
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
456
+ #
457
+ # +GET /v3/phone/factors/{factor_id}/+
458
+ #
459
+ # @param factor_id [String] The factor.
460
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
461
+ # @return [Didit::Types::PhoneFactorsRetrieveResponse]
462
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
463
+ def retrieve(factor_id, request_options: nil)
464
+ @client.deprecated("phone.factors.retrieve", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
465
+ @client.request(
466
+ :get,
467
+ "/v3/phone/factors/{factor_id}/",
468
+ path_params: { "factor_id" => factor_id },
469
+ response: Types::PhoneFactorsRetrieveResponse,
470
+ request_options: request_options
471
+ )
472
+ end
473
+
474
+ # Change a factor's name, metadata or state
475
+ #
476
+ # Change a factor without enrolling it again: rename it (`friendly_name`), replace your `metadata`, or disable
477
+ # it or turn it back on (`status`). The answer is the factor as it now stands.
478
+ #
479
+ # `disabled` stops the factor's checks and `verified` turns a disabled factor back on. A factor that was never
480
+ # verified cannot be turned on: finish its first check instead, or the call answers `409 factor_unverified`.
481
+ #
482
+ # `metadata` replaces the keys and values you sent before: up to 10 keys, each value at most 500 characters,
483
+ # or the call answers `400 invalid_metadata`.
484
+ #
485
+ # **Authentication.** Send your application's API key in `x-api-key`.
486
+ #
487
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
488
+ #
489
+ # +PATCH /v3/phone/factors/{factor_id}/+
490
+ #
491
+ # @param factor_id [String] The factor to change.
492
+ # @param friendly_name [String] A new name for the authenticator app.
493
+ # @param metadata [Hash{String => String}] Replaces your keys and values with these, up to 10.
494
+ # @param status [String] `disabled` stops the factor's checks; `verified` turns a disabled factor back on.
495
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
496
+ # @return [Didit::Types::PhoneFactorsUpdateResponse]
497
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
498
+ def update(factor_id, friendly_name: OMIT, metadata: OMIT, status: OMIT, request_options: nil)
499
+ @client.deprecated("phone.factors.update", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
500
+ @client.request(
501
+ :patch,
502
+ "/v3/phone/factors/{factor_id}/",
503
+ path_params: { "factor_id" => factor_id },
504
+ body: {
505
+ "friendly_name" => friendly_name,
506
+ "metadata" => metadata,
507
+ "status" => status
508
+ },
509
+ response: Types::PhoneFactorsUpdateResponse,
510
+ request_options: request_options
511
+ )
512
+ end
513
+ end
514
+
515
+ # The +phone.network+ resource.
516
+ class Network < Didit::Resource
517
+ # @return [Didit::Resources::Phone::Network::Registrations]
518
+ def registrations
519
+ @registrations ||= Registrations.new(@client)
520
+ end
521
+
522
+ # The +phone.network.registrations+ resource.
523
+ class Registrations < Didit::Resource
524
+ # @return [Didit::Resources::Phone::Network::Registrations::TestNumbers]
525
+ def test_numbers
526
+ @test_numbers ||= TestNumbers.new(@client)
527
+ end
528
+
529
+ # Ask the networks to approve a network feature
530
+ #
531
+ # Ask the mobile networks to approve a network feature for one country, so your application can use it for
532
+ # production traffic there: `feature` (`silent_verification`, `sim_swap` or `number_verification`),
533
+ # `country`, `use_case`, `company_name` and the `website` where the flow runs, plus optionally the
534
+ # `networks` to ask, a `purpose` shown to them and your expected `monthly_volume`.
535
+ #
536
+ # The answer is the registration with each network's decision (`networks[].status`) and the overall
537
+ # `status`: `submitted`, `in_review`, `approved`, `partly_approved` or `rejected`.
538
+ #
539
+ # **Test access.** While the networks review, `test_access` is `on`: the feature answers for the
540
+ # registration's verified test numbers and marks those answers `test: true`. Add up to 5 with `POST
541
+ # /v3/phone/network/registrations/{registration_id}/test-numbers/`. It turns `off` once the registration is
542
+ # approved or rejected.
543
+ #
544
+ # **One per feature, use case and country.** The same three again while one is open answers `409
545
+ # registration_exists`.
546
+ #
547
+ # **Authentication.** Send your application's API key in `x-api-key`.
548
+ #
549
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
550
+ #
551
+ # +POST /v3/phone/network/registrations/+
552
+ #
553
+ # @param feature [String] The network feature to ask approval for.
554
+ # @param country [String] The ISO 3166-1 alpha-2 country it runs in.
555
+ # @param use_case [String] What you use the feature for.
556
+ # @param company_name [String] Your legal company name, as the networks see it.
557
+ # @param website [String] Where the flow runs, so the networks can review it.
558
+ # @param networks [Array<String>] Only these mobile networks; left out, every network in the country.
559
+ # @param purpose [String] Why the flow needs the feature, shown to the networks.
560
+ # @param monthly_volume [Integer] Expected requests a month.
561
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
562
+ # @return [Didit::Types::PhoneNetworkRegistrationsCreateResponse]
563
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
564
+ def create(
565
+ feature:,
566
+ country:,
567
+ use_case:,
568
+ company_name:,
569
+ website:,
570
+ networks: OMIT,
571
+ purpose: OMIT,
572
+ monthly_volume: OMIT,
573
+ request_options: nil
574
+ )
575
+ @client.deprecated("phone.network.registrations.create", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
576
+ @client.request(
577
+ :post,
578
+ "/v3/phone/network/registrations/",
579
+ body: {
580
+ "feature" => feature,
581
+ "country" => country,
582
+ "use_case" => use_case,
583
+ "company_name" => company_name,
584
+ "website" => website,
585
+ "networks" => networks,
586
+ "purpose" => purpose,
587
+ "monthly_volume" => monthly_volume
588
+ },
589
+ response: Types::PhoneNetworkRegistrationsCreateResponse,
590
+ request_options: request_options
591
+ )
592
+ end
593
+
594
+ # List your network feature registrations
595
+ #
596
+ # List your network feature registrations, newest first, with each one's feature, country, use case and
597
+ # status. `feature`, `country` and `status` narrow the list, and `format: csv` exports every row that
598
+ # matches the filters instead of a page. Read one in full with `GET
599
+ # /v3/phone/network/registrations/{registration_id}/`.
600
+ #
601
+ # **Paging.** `limit` is 20 by default and 100 at most.
602
+ #
603
+ # **Authentication.** Send your application's API key in `x-api-key`.
604
+ #
605
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
606
+ #
607
+ # +GET /v3/phone/network/registrations/+
608
+ #
609
+ # @param feature [String] Only registrations of this network feature.
610
+ # @param country [String] Only this ISO 3166-1 alpha-2 country.
611
+ # @param status [String] Only rows in this state.
612
+ # @param limit [Integer] Page size: 20 by default, 100 at most.
613
+ # @param offset [Integer] Zero-based index of the first row. Prefer following `next`.
614
+ # @param format [String] `json` (default) for a page, or `csv` to export every row that matches the filters
615
+ # as CSV.
616
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
617
+ # @return [Didit::Page<Didit::Types::PhoneNetworkRegistrationsListResponseResults>]
618
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
619
+ def list(
620
+ feature: OMIT,
621
+ country: OMIT,
622
+ status: OMIT,
623
+ limit: OMIT,
624
+ offset: OMIT,
625
+ format: OMIT,
626
+ request_options: nil
627
+ )
628
+ @client.deprecated("phone.network.registrations.list", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
629
+ @client.request(
630
+ :get,
631
+ "/v3/phone/network/registrations/",
632
+ query: {
633
+ "feature" => feature,
634
+ "country" => country,
635
+ "status" => status,
636
+ "limit" => limit,
637
+ "offset" => offset,
638
+ "format" => format
639
+ },
640
+ page: Types::PhoneNetworkRegistrationsListResponseResults,
641
+ request_options: request_options
642
+ )
643
+ end
644
+
645
+ # Track a feature approval, network by network
646
+ #
647
+ # Track one feature approval, network by network: the feature, country and use case you submitted, the
648
+ # overall `status`, each mobile network's decision (`status`, `decided_at` and, when it rejected the
649
+ # request, `reason`), `live_at` once the feature is live for you in the country, and the `test_numbers` that
650
+ # answer it while `test_access` is `on`.
651
+ #
652
+ # **Authentication.** Send your application's API key in `x-api-key`.
653
+ #
654
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
655
+ #
656
+ # +GET /v3/phone/network/registrations/{registration_id}/+
657
+ #
658
+ # @param registration_id [String] The network feature registration.
659
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
660
+ # @return [Didit::Types::PhoneNetworkRegistrationsRetrieveResponse]
661
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
662
+ def retrieve(registration_id, request_options: nil)
663
+ @client.deprecated("phone.network.registrations.retrieve", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
664
+ @client.request(
665
+ :get,
666
+ "/v3/phone/network/registrations/{registration_id}/",
667
+ path_params: { "registration_id" => registration_id },
668
+ response: Types::PhoneNetworkRegistrationsRetrieveResponse,
669
+ request_options: request_options
670
+ )
671
+ end
672
+
673
+ # The +phone.network.registrations.test_numbers+ resource.
674
+ class TestNumbers < Didit::Resource
675
+ # Add a test number while the networks review
676
+ #
677
+ # Add a number you hold as a test number while the networks review a registration, so you can try the
678
+ # feature before it is approved: send it in E.164 (`phone_number`).
679
+ #
680
+ # Didit sends it a code and answers with `verification_id` and `status: code_sent`; check the code with
681
+ # `POST /v3/phone/check/` and the number. Once the code is checked the number is `verified`, and the
682
+ # feature answers for it under test access, marked `test: true`.
683
+ #
684
+ # **Limits.** A registration takes up to 5 test numbers (`409 too_many_test_numbers`), and test access
685
+ # ends when the networks decide (`409 review_finished`).
686
+ #
687
+ # **Authentication.** Send your application's API key in `x-api-key`.
688
+ #
689
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
690
+ #
691
+ # +POST /v3/phone/network/registrations/{registration_id}/test-numbers/+
692
+ #
693
+ # @param registration_id [String] The network feature registration.
694
+ # @param phone_number [String] A number you hold, in E.164. Didit sends it a code to confirm it.
695
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
696
+ # @return [Didit::Types::PhoneNetworkRegistrationsTestNumbersCreateResponse]
697
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
698
+ def create(registration_id, phone_number:, request_options: nil)
699
+ @client.deprecated("phone.network.registrations.test_numbers.create", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
700
+ @client.request(
701
+ :post,
702
+ "/v3/phone/network/registrations/{registration_id}/test-numbers/",
703
+ path_params: { "registration_id" => registration_id },
704
+ body: {
705
+ "phone_number" => phone_number
706
+ },
707
+ response: Types::PhoneNetworkRegistrationsTestNumbersCreateResponse,
708
+ request_options: request_options
709
+ )
710
+ end
711
+
712
+ # Remove a test number
713
+ #
714
+ # Remove a test number from a registration: it is deleted at once, the feature stops answering for it, and
715
+ # the number can be added again while test access is on.
716
+ #
717
+ # The number is in the path in E.164, URL-encoded: `+34600000012` becomes `%2B34600000012`.
718
+ #
719
+ # **Authentication.** Send your application's API key in `x-api-key`.
720
+ #
721
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
722
+ #
723
+ # +DELETE /v3/phone/network/registrations/{registration_id}/test-numbers/{phone_number}/+
724
+ #
725
+ # @param registration_id [String] The network feature registration.
726
+ # @param phone_number [String] The test number, in E.164 and URL-encoded.
727
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
728
+ # @return [nil]
729
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
730
+ def delete(registration_id, phone_number, request_options: nil)
731
+ @client.deprecated("phone.network.registrations.test_numbers.delete", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
732
+ @client.request(
733
+ :delete,
734
+ "/v3/phone/network/registrations/{registration_id}/test-numbers/{phone_number}/",
735
+ path_params: { "registration_id" => registration_id, "phone_number" => phone_number },
736
+ request_options: request_options
737
+ )
738
+ end
739
+ end
740
+ end
741
+ end
742
+
743
+ # The +phone.sdk_keys+ resource.
744
+ class SdkKeys < Didit::Resource
745
+ # Issue a publishable key for a client SDK
746
+ #
747
+ # Issue a publishable key for the iOS, Android or web build of your app: `platform`, the `app_ids` it may run
748
+ # in (bundle ids, package names or `https` origins) and an optional `name` shown in API keys. The answer
749
+ # carries `publishable_key`, which is safe to ship inside the app because it can only start the client SDK's
750
+ # checks.
751
+ #
752
+ # **Rotation.** To replace a key in an app that is already installed, rotate it (`POST
753
+ # /v3/phone/sdk-keys/{key_id}/rotate/`) rather than issuing a second one: the old value keeps working while
754
+ # your update ships.
755
+ #
756
+ # **Permissions.** Only an Owner or Admin API key may issue a publishable key.
757
+ #
758
+ # **Authentication.** Send your application's API key in `x-api-key`.
759
+ #
760
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
761
+ #
762
+ # +POST /v3/phone/sdk-keys/+
763
+ #
764
+ # @param platform [String] The platform the key is for: `ios`, `android` or `web`.
765
+ # @param app_ids [Array<String>] The bundle ids, package names or `https` origins the key works for.
766
+ # @param name [String] Shown in API keys.
767
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
768
+ # @return [Didit::Types::PhoneSdkKeysCreateResponse]
769
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
770
+ def create(platform:, app_ids:, name: OMIT, request_options: nil)
771
+ @client.deprecated("phone.sdk_keys.create", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
772
+ @client.request(
773
+ :post,
774
+ "/v3/phone/sdk-keys/",
775
+ body: {
776
+ "platform" => platform,
777
+ "app_ids" => app_ids,
778
+ "name" => name
779
+ },
780
+ response: Types::PhoneSdkKeysCreateResponse,
781
+ request_options: request_options
782
+ )
783
+ end
784
+
785
+ # List the publishable keys of your client SDKs
786
+ #
787
+ # List the key ID, platform and status of each client SDK key for your application.
788
+ #
789
+ # `platform` narrows the list to one platform.
790
+ #
791
+ # **Permissions.** Only an Owner or Admin API key may read publishable keys.
792
+ #
793
+ # **Authentication.** Send your application's API key in `x-api-key`.
794
+ #
795
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
796
+ #
797
+ # +GET /v3/phone/sdk-keys/+
798
+ #
799
+ # @param platform [String] Only keys for this platform.
800
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
801
+ # @return [Didit::Types::PhoneSdkKeysListResponse]
802
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
803
+ def list(platform: OMIT, request_options: nil)
804
+ @client.deprecated("phone.sdk_keys.list", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
805
+ @client.request(
806
+ :get,
807
+ "/v3/phone/sdk-keys/",
808
+ query: {
809
+ "platform" => platform
810
+ },
811
+ response: Types::PhoneSdkKeysListResponse,
812
+ request_options: request_options
813
+ )
814
+ end
815
+
816
+ # Revoke a publishable key
817
+ #
818
+ # Revoke a publishable key at once: it stops starting the client SDK's checks immediately, its status becomes
819
+ # `revoked`, and it can neither be restored nor rotated. Apps that still ship it fail until they are updated,
820
+ # so issue the replacement first (`POST /v3/phone/sdk-keys/`).
821
+ #
822
+ # **Permissions.** Only an Owner or Admin API key may revoke a publishable key.
823
+ #
824
+ # **Authentication.** Send your application's API key in `x-api-key`.
825
+ #
826
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
827
+ #
828
+ # +DELETE /v3/phone/sdk-keys/{key_id}/+
829
+ #
830
+ # @param key_id [String] The publishable key to revoke.
831
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
832
+ # @return [nil]
833
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
834
+ def revoke(key_id, request_options: nil)
835
+ @client.deprecated("phone.sdk_keys.revoke", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
836
+ @client.request(
837
+ :delete,
838
+ "/v3/phone/sdk-keys/{key_id}/",
839
+ path_params: { "key_id" => key_id },
840
+ request_options: request_options
841
+ )
842
+ end
843
+
844
+ # Rotate a publishable key with an overlap
845
+ #
846
+ # Rotate a publishable key without breaking the app versions already installed: Didit issues a new value and
847
+ # keeps the old one working for `overlap_hours` (0 to 168), long enough for your update to ship. The answer is
848
+ # the key with its new `publishable_key`, and `previous_expires_at` is when the value it replaced stops
849
+ # working.
850
+ #
851
+ # Ship the new value, then let the overlap end. A revoked key cannot be rotated: the call answers `409
852
+ # revoked`.
853
+ #
854
+ # **Permissions.** Only an Owner or Admin API key may rotate a publishable key.
855
+ #
856
+ # **Authentication.** Send your application's API key in `x-api-key`.
857
+ #
858
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
859
+ #
860
+ # +POST /v3/phone/sdk-keys/{key_id}/rotate/+
861
+ #
862
+ # @param key_id [String] The publishable key to rotate.
863
+ # @param overlap_hours [Integer] How long the value being replaced keeps working, from 0 to 168 hours, while
864
+ # the app update ships.
865
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
866
+ # @return [Didit::Types::PhoneSdkKeysRotateResponse]
867
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
868
+ def rotate(key_id, overlap_hours: OMIT, request_options: nil)
869
+ @client.deprecated("phone.sdk_keys.rotate", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
870
+ @client.request(
871
+ :post,
872
+ "/v3/phone/sdk-keys/{key_id}/rotate/",
873
+ path_params: { "key_id" => key_id },
874
+ body: {
875
+ "overlap_hours" => overlap_hours
876
+ },
877
+ response: Types::PhoneSdkKeysRotateResponse,
878
+ request_options: request_options
879
+ )
880
+ end
881
+ end
882
+
883
+ # The +phone.silent+ resource.
884
+ class Silent < Didit::Resource
885
+ # @return [Didit::Resources::Phone::Silent::Registrations]
886
+ def registrations
887
+ @registrations ||= Registrations.new(@client)
888
+ end
889
+
890
+ # List where silent verification runs
891
+ #
892
+ # Where silent verification runs: every country where at least one mobile network can run the check, and per
893
+ # country the networks that can. Read this instead of hardcoding a list, because coverage grows as networks
894
+ # approve the feature.
895
+ #
896
+ # `approval` says whether a network answers for production traffic (`live`) or only while it approves
897
+ # production use (`test`), in which case it answers for the verified test numbers of a registration. `wifi`
898
+ # says whether the SIM check also runs over Wi-Fi, so a device without mobile data can still complete it.
899
+ #
900
+ # **Narrowing.** `country` answers for one ISO 3166-1 alpha-2 country.
901
+ #
902
+ # **Before you start.** `POST /v3/phone/silent/eligibility/` answers for one number, and a silent check that
903
+ # cannot run falls back to the verification's code channels.
904
+ #
905
+ # **Authentication.** Send your application's API key in `x-api-key`.
906
+ #
907
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
908
+ #
909
+ # +GET /v3/phone/silent/coverage/+
910
+ #
911
+ # @param country [String] Only this ISO 3166-1 alpha-2 country.
912
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
913
+ # @return [Didit::Types::PhoneSilentCoverageResponse]
914
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
915
+ def coverage(country: OMIT, request_options: nil)
916
+ @client.deprecated("phone.silent.coverage", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
917
+ @client.request(
918
+ :get,
919
+ "/v3/phone/silent/coverage/",
920
+ query: {
921
+ "country" => country
922
+ },
923
+ response: Types::PhoneSilentCoverageResponse,
924
+ request_options: request_options
925
+ )
926
+ end
927
+
928
+ # Check silent eligibility before you start
929
+ #
930
+ # Whether a silent check can run for one number now, so you can decide whether to offer it before you start a
931
+ # verification. `eligible` is the answer and, when it is `false`, `reason` says why: `unsupported_network`
932
+ # (the number's mobile network cannot run the check), `not_mobile_data` (the device is not on mobile data) or
933
+ # `country_not_covered` (silent verification does not run in the number's country).
934
+ #
935
+ # `network` is the mobile network the number belongs to, `country` its ISO 3166-1 alpha-2 code, and
936
+ # `wifi_possible` whether the SIM check can still run over Wi-Fi when the device has no mobile data.
937
+ #
938
+ # **Mobile data.** Send `ip_address`, the phone's public IP, to have the answer also confirm the device is on
939
+ # mobile data. Without it, the answer is about the network alone.
940
+ #
941
+ # **What follows.** A verification that runs the silent check first falls back to its next code channel when
942
+ # the check cannot run.
943
+ #
944
+ # **Authentication.** Send your application's API key in `x-api-key`. To check a client SDK's publishable key
945
+ # as well, include it in `X-Publishable-Key`.
946
+ #
947
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
948
+ #
949
+ # +POST /v3/phone/silent/eligibility/+
950
+ #
951
+ # @param phone_number [String] The number in international format (E.164), for example `+34600000012`.
952
+ # @param ip_address [String] The phone's public IP, so the answer also confirms the device is on mobile data.
953
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
954
+ # @return [Didit::Types::PhoneSilentEligibilityResponse]
955
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
956
+ def eligibility(phone_number:, ip_address: OMIT, request_options: nil)
957
+ @client.deprecated("phone.silent.eligibility", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
958
+ @client.request(
959
+ :post,
960
+ "/v3/phone/silent/eligibility/",
961
+ body: {
962
+ "phone_number" => phone_number,
963
+ "ip_address" => ip_address
964
+ },
965
+ response: Types::PhoneSilentEligibilityResponse,
966
+ request_options: request_options
967
+ )
968
+ end
969
+
970
+ # The +phone.silent.registrations+ resource.
971
+ class Registrations < Didit::Resource
972
+ # Submit a country for carrier approval of silent verification
973
+ #
974
+ # Submit a country for carrier approval of silent verification, so silent checks run for your application's
975
+ # production traffic there: `country`, the `use_case` it runs in, your `company_name` and the `website`
976
+ # where the flow runs. Optionally name the `networks` to ask, your expected `monthly_volume` and links to
977
+ # `flow_screenshots`.
978
+ #
979
+ # The answer is the registration. `status` starts `submitted`, moves to `in_review`, and ends as `approved`,
980
+ # `partly_approved` (some networks approved and some rejected) or `rejected`. `networks` lists each mobile
981
+ # network's own decision and `live_at` is when silent verification went live for you in the country.
982
+ #
983
+ # **One per country.** A country with an open registration answers `409 registration_exists`: track that one
984
+ # with `GET /v3/phone/silent/registrations/{registration_id}/` instead.
985
+ #
986
+ # **Authentication.** Send your application's API key in `x-api-key`.
987
+ #
988
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
989
+ #
990
+ # +POST /v3/phone/silent/registrations/+
991
+ #
992
+ # @param country [String] The ISO 3166-1 alpha-2 country to ask approval for.
993
+ # @param use_case [String] What silent verification is used for.
994
+ # @param company_name [String] Your legal company name, as the networks see it.
995
+ # @param website [String] Where the flow runs, so the networks can review it.
996
+ # @param networks [Array<String>] Only these mobile networks; left out, every network in the country.
997
+ # @param monthly_volume [Integer] Expected silent checks a month.
998
+ # @param flow_screenshots [Array<String>] Links to screens of the flow, as the networks ask for them.
999
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1000
+ # @return [Didit::Types::PhoneSilentRegistrationsCreateResponse]
1001
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
1002
+ def create(
1003
+ country:,
1004
+ use_case:,
1005
+ company_name:,
1006
+ website:,
1007
+ networks: OMIT,
1008
+ monthly_volume: OMIT,
1009
+ flow_screenshots: OMIT,
1010
+ request_options: nil
1011
+ )
1012
+ @client.deprecated("phone.silent.registrations.create", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
1013
+ @client.request(
1014
+ :post,
1015
+ "/v3/phone/silent/registrations/",
1016
+ body: {
1017
+ "country" => country,
1018
+ "use_case" => use_case,
1019
+ "company_name" => company_name,
1020
+ "website" => website,
1021
+ "networks" => networks,
1022
+ "monthly_volume" => monthly_volume,
1023
+ "flow_screenshots" => flow_screenshots
1024
+ },
1025
+ response: Types::PhoneSilentRegistrationsCreateResponse,
1026
+ request_options: request_options
1027
+ )
1028
+ end
1029
+
1030
+ # Track a carrier approval, network by network
1031
+ #
1032
+ # Track a carrier approval, network by network: the registration's `status`, each mobile network's decision
1033
+ # (`status`, `decided_at` and, when it rejected the request, `reason`), and `live_at` once silent
1034
+ # verification is live for you in the country.
1035
+ #
1036
+ # A registration that is `partly_approved` runs silent verification on the networks that approved it.
1037
+ #
1038
+ # **Authentication.** Send your application's API key in `x-api-key`.
1039
+ #
1040
+ # **Rate limit.** Requests count against the key's budget; over it the answer is `429` with `Retry-After`.
1041
+ #
1042
+ # +GET /v3/phone/silent/registrations/{registration_id}/+
1043
+ #
1044
+ # @param registration_id [String] The silent verification registration.
1045
+ # @param request_options [Hash, nil] :timeout, :max_retries, :extra_headers, :extra_query, :extra_body
1046
+ # @return [Didit::Types::PhoneSilentRegistrationsRetrieveResponse]
1047
+ # @deprecated Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.
1048
+ def retrieve(registration_id, request_options: nil)
1049
+ @client.deprecated("phone.silent.registrations.retrieve", "Removed from the API contract on 2026-11-23; this deprecated method is kept through version 2.36.0.")
1050
+ @client.request(
1051
+ :get,
1052
+ "/v3/phone/silent/registrations/{registration_id}/",
1053
+ path_params: { "registration_id" => registration_id },
1054
+ response: Types::PhoneSilentRegistrationsRetrieveResponse,
1055
+ request_options: request_options
1056
+ )
1057
+ end
1058
+ end
1059
+ end
304
1060
  end
305
1061
  end
306
1062
  end