-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathadminusers_spec.yaml
1667 lines (1667 loc) · 46.1 KB
/
adminusers_spec.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.1
info:
description: Adminusers API
title: Adminusers API
version: v1.0.0
paths:
/healthcheck:
get:
operationId: healthCheck
responses:
"200":
content:
application/json:
schema:
type: string
example:
database:
healthy: true
message: Healthy
deadlocks:
healthy: true
message: Healthy
description: OK
"503":
description: Service unavailable. If any healthchecks fail
summary: "Healthcheck endpoint for adminusers. Check database, and deadlocks"
tags:
- Other
/v1/api/forgotten-passwords:
post:
operationId: sendForgottenPassword
requestBody:
content:
application/json:
schema:
type: string
example:
username: [email protected]
required:
- username
responses:
"200":
description: OK
"400":
description: Invalid payload
"404":
description: Not found
summary: Create a new forgotten password request (sends email to user)
tags:
- Passwords
/v1/api/forgotten-passwords/{code}:
get:
operationId: findNonExpiredForgottenPassword
parameters:
- example: bc9039e00cba4e63b2c92ecd0e188aba
in: path
name: code
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/ForgottenPassword"
description: OK
"404":
description: Not found
summary: Verify forgotten password code
tags:
- Passwords
/v1/api/invites:
get:
operationId: getInvites
parameters:
- example: ahq8745yq387
in: query
name: serviceId
schema:
type: string
responses:
"200":
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Invite"
description: OK
summary: List invites for a service
tags:
- Invites
/v1/api/invites/create-invite-to-join-service:
post:
operationId: createInviteToJoinService
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateInviteToJoinServiceRequest"
responses:
"201":
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"
description: Created
"404":
description: Service or role not found
"422":
description: Missing required fields or invalid values
summary: Creates an invitation to allow a new team member to join an existing
service.
tags:
- Invites
/v1/api/invites/create-self-registration-invite:
post:
operationId: createSelfRegistrationInvite
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSelfRegistrationInviteRequest"
responses:
"201":
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"
description: Created
"403":
description: The email is not an allowed public sector email address
"422":
description: Missing required fields or invalid values
summary: Creates an invitation to allow self provisioning new service with Pay
tags:
- Invites
/v1/api/invites/{code}:
get:
operationId: getInvite
parameters:
- example: d02jddeib0lqpsir28fbskg9v0rv
in: path
name: code
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"
description: OK
"404":
description: Not found
summary: Find invite for invite code
tags:
- Invites
patch:
operationId: updateInvite
parameters:
- example: d02jddeib0lqpsir28fbskg9v0rv
in: path
name: code
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: string
example:
- op: replace
path: telephone_number
value: "+441134960000"
- op: replace
path: password
value: a-password
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"
description: OK
"400":
description: Bad request
"404":
description: Invite not found
"422":
description: Missing required fields or invalid values
summary: Update an invite
tags:
- Invites
/v1/api/invites/{code}/complete:
post:
description: "In the case of a user invite, this resource will assign the new\
\ service to the existing user and disables the invite. <br>In the case of\
\ a service invite, this resource will create a new service, assign gateway\
\ account ids (if provided) and also creates a new user and assign to the\
\ service<br>The response contains the user and the service id's affected\
\ as part of the invite completion in addition to the invite"
operationId: completeInvite
parameters:
- example: d02jddeib0lqpsir28fbskg9v0rv
in: path
name: code
required: true
schema:
type: string
requestBody:
content:
'*/*':
schema:
$ref: "#/components/schemas/CompleteInviteRequest"
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CompleteInviteResponse"
description: OK
"404":
description: Not found
summary: Completes the invite by creating user/service and invalidating the
invite code
tags:
- Invites
/v1/api/invites/{code}/reprovision-otp:
post:
operationId: reprovisionOtp
parameters:
- example: d02jddeib0lqpsir28fbskg9v0rv
in: path
name: code
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Invite"
description: OK
"404":
description: Not found
summary: Re-provision otp secret key for the invite
tags:
- Invites
/v1/api/invites/{code}/send-otp:
post:
operationId: sendOtp
parameters:
- example: d02jddeib0lqpsir28fbskg9v0rv
in: path
name: code
required: true
schema:
type: string
responses:
"204":
description: No content
"400":
description: Invalid payload
"404":
description: Not found
"412":
description: Precondition failed
summary: Sends otp verification code to the phone number registered in the invite
tags:
- Invites
/v1/api/reset-password:
post:
operationId: resetForgottenPassword
requestBody:
content:
application/json:
schema:
type: string
example:
forgotten_password_code: bc9039e00cba4e63b2c92ecd0e188aba
new_password: new-password
required:
- forgotten_password_code
- new_password
responses:
"204":
description: Updated password successfully
"400":
description: Invalid payload
"404":
description: Expired or non-existent code
summary: Reset password
tags:
- Passwords
/v1/api/services:
get:
operationId: findServices
parameters:
- example: 1
in: query
name: gatewayAccountId
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Service"
description: OK
"400":
description: Missing gateway account ID
"404":
description: Not found
summary: Find service associated with gateway account ID
tags:
- Services
post:
description: This endpoint creates a new service. And assigns to gateway account
ids (Optional). <br> `service_name` keys are supported ISO-639-1 language
codes and values are translated service names | key must be `"en"` or `"cy"`
operationId: createService
requestBody:
content:
application/json:
schema:
type: string
example:
gateway_account_ids:
- "1"
service_name:
en: Some service name
cy: Service name in welsh
responses:
"201":
content:
application/json:
schema:
$ref: "#/components/schemas/Service"
description: Created
"400":
description: Service name keys must be one of 'en' (English) or 'cy' (Welsh)
"409":
description: Gateway account IDs provided has already been assigned to another
service
"500":
description: Invalid JSON payload
summary: Create new service
tags:
- Services
/v1/api/services/list:
get:
operationId: getServices
responses:
"200":
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Service"
description: OK
summary: Get all services
tags:
- Services
/v1/api/services/search:
post:
description: This endpoint returns a list of services using lexical meaning
to determine a match to the search criteria
operationId: searchServices
requestBody:
content:
application/json:
schema:
type: string
example:
service_name: service name
service_merchant_name: service merchant name
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/SearchServicesResponse"
description: OK
"400":
description: Invalid JSON payload
summary: Search services by name or merchant name
tags:
- Services
/v1/api/services/{serviceExternalId}:
get:
operationId: findService
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Service"
description: OK
"404":
description: Not found
summary: Find service by external ID
tags:
- Services
patch:
description: "Allows patching below service attributes. Each attribute has its\
\ own validation depending on data type. Request can either be a single object\
\ or an array of objects. It’s similar to (but not 100% compliant with) [JSON\
\ Patch](http://jsonpatch.com/).<br>\n | op | field | example |\n| --- |\
\ --- | ----|\n| add | gateway_account_ids | [\"1\"] |\n| replace | redirect_to_service_immediately_on_terminal_state\
\ | false |\n| replace | experimental_features_enabled | false |\n| replace\
\ | takes_payments_over_phone | false |\n| replace | agent_initiated_moto_enabled\
\ | false |\n| replace | collect_billing_address | true |\n| replace | current_go_live_stage\
\ | NOT_STARTED |\n| replace | current_psp_test_account_stage | NOT_STARTED\
\ |\n| replace | merchant_details/name, organisatio | name |\n| replace |\
\ merchant_details/address_line1, Address lin | 1 |\n| replace | merchant_details/address_line2,\
\ Address lin | 2 |\n| replace | merchant_details/address_city | London |\n\
| replace | merchant_details/address_country | GB |\n| replace | merchant_details/address_postcode\
\ | E6 8XX |\n| replace | merchant_detail |/email, |\n| replace | merchant_details/email,\
\ email@exampl |.com |\n| replace | merchant_detail |/url, |\n| replace |\
\ merchant_details/url, http://www.exampl |.org |\n| replace | merchant_detail\
\ |/telephone_number, |\n| replace | merchant_details/telephone_number |\
\ 447700900000 |\n| replace | custom_branding | { \"css_url\": \"css url\"\
, \"image_url\": \"image url\"} |\n| replace | custom_branding | {} |\n| replace\
\ | service_name/en | Some service name |\n| replace | sector | local government\
\ |\n| replace | internal | true |\n| replace | archived | true |\n| replace\
\ | went_live_date | 2022-04-09T18:07:46Z |\n| replace | default_billing_address_country\
\ | GB | "
operationId: updateServiceAttribute
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/ServiceUpdateRequest"
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Service"
description: OK
"400":
description: Invalid payload
summary: Patch service attributes
tags:
- Services
/v1/api/services/{serviceExternalId}/govuk-pay-agreement:
get:
description: Retrieves the user's email address and timestamp that the GOV.UK
Pay terms were accepted on for the service.
operationId: getGovUkPayAgreement
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/GovUkPayAgreement"
description: OK
"404":
description: Service with serviceExternalId not found
summary: Get details about the acceptance of GOV.UK Pay terms
tags:
- Services
post:
operationId: createGovUkPayAgreement
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: string
example:
user_external_id: 12e3eccfab284ae5bc1108e9c0456ba7
required:
- user_external_id
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/GovUkPayAgreement"
description: Agreement already created - existing agreement returned
"201":
content:
application/json:
schema:
$ref: "#/components/schemas/GovUkPayAgreement"
description: Created
"400":
description: Invalid payload
"404":
description: Service with serviceExternalId not found
summary: Record acceptance of GOV.UK Pay terms
tags:
- Services
/v1/api/services/{serviceExternalId}/merchant-details:
put:
operationId: updateServiceMerchantDetails
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/UpdateMerchantDetailsRequest"
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Service"
description: OK
"400":
description: Invalid payload
summary: Update merchant details of a service
tags:
- Services
/v1/api/services/{serviceExternalId}/send-live-email:
post:
description: "This endpoint will send an email to the user who signed the agreement\
\ with GOV.UK Pay for the service informing them that their service is now\
\ live.The email address used is the email address of the user provided to\
\ the [POST /v1/api/services/`{serviceExternalId}`/govuk-pay-agreement] endpoint."
operationId: sendLiveAccountCreatedEmail
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
responses:
"200":
description: OK
"404":
description: Service with serviceExternalId not found
summary: Sends an email to the user who signed the service agreement to inform
them that their service is live
tags:
- Services
/v1/api/services/{serviceExternalId}/stripe-agreement:
get:
description: Retrieves the IP address and timestamp that the Stripe terms were
accepted on for the service.
operationId: getStripeAgreement
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/StripeAgreement"
description: OK
"404":
description: Not found
summary: Get details about the acceptance of Stripe terms
tags:
- Services
post:
description: Records that a GOV.UK Pay agreement has been accepted for the service.
operationId: createStripeAgreement
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/StripeAgreementRequest"
required: true
responses:
"200":
description: Stripe agreement already created
"201":
description: Created
"422":
description: Invalid JSON payload or IP address
summary: Record acceptance of Stripe terms
tags:
- Services
/v1/api/services/{serviceExternalId}/users:
get:
operationId: findUsersByServiceId
parameters:
- in: path
name: serviceExternalId
required: true
schema:
type: string
- in: query
name: role
schema:
type: string
enum:
- admin
- view-and-refund
- view-only
- view-and-initiate-moto
- view-refund-and-initiate-moto
- super-admin
responses:
"200":
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/User"
description: OK
"400":
description: "If query parameter 'role' is not one of [admin, view-and-refund,\
\ view-only, view-and-initiate-moto, view-refund-and-initiate-moto, super-admin]"
"404":
description: Not found
summary: Find users of a service
tags:
- Services
/v1/api/services/{serviceExternalId}/users/{userExternalId}:
delete:
operationId: removeUserFromService
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
- description: Admin user external ID of the service
example: 0ddf69c1ba924deca07f0ee748ff1533
in: path
name: userExternalId
required: true
schema:
type: string
- description: User external ID to remove from service
example: d012mkldfdfnsdhqha7f0ee748ff1546
in: header
name: GovUkPay-User-Context
required: true
schema:
type: string
responses:
"204":
description: OK
"403":
description: Forbidden. `GovUkPay-User-Context` header is blank
"409":
description: Conflict. `GovUkPay-User-Context` is same as userExternalId
or user with `userExternalId` is not admin of the service
summary: Delete user from a service
tags:
- Services
/v1/api/toolbox/services/{serviceExternalId}/users/{userExternalId}:
delete:
operationId: removeUserFromServiceUsingToolbox
parameters:
- example: 7d19aff33f8948deb97ed16b2912dcd3
in: path
name: serviceExternalId
required: true
schema:
type: string
- example: 93ba1ec4ed6a4238a59f16ad97b4fa12
in: path
name: userExternalId
required: true
schema:
type: string
responses:
"204":
description: Delete user from service
"404":
description: User or Service not found
summary: Remove user from service (Toolbox use only)
tags:
- Toolbox
/v1/api/users:
get:
operationId: getUsers
parameters:
- in: query
name: ids
schema:
type: string
example: "93ba1ec4ed6a4238a59f16ad97b4fa12,1234"
responses:
"200":
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/User"
description: OK
summary: Gets users with the associated external ids
tags:
- Users
post:
description: This is only used by the Pay CLI for creating Users. Users are
usually created by completing an invite
operationId: createUser
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateUserRequest"
responses:
"201":
content:
application/json:
schema:
$ref: "#/components/schemas/User"
description: Created
"400":
description: Invalid payload
"409":
description: User with email already exists
"500":
description: Internal server error
summary: Create new user
tags:
- Users
/v1/api/users/admin-emails-for-gateway-accounts:
post:
operationId: getAdminUserEmailsForGatewayAccountIds
requestBody:
content:
application/json:
schema:
type: string
example:
gatewayAccountIds:
- "1"
- "2"
responses:
"200":
content:
application/json:
schema:
type: string
example:
"1":
"2":
description: OK
"422":
description: Invalid request
summary: Get admin user emails for given gateway account IDs
tags:
- Users
/v1/api/users/authenticate:
post:
operationId: authenticate
requestBody:
content:
application/json:
schema:
type: string
example:
email: [email protected]
password: a-password
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/User"
description: OK
"400":
description: Invalid payload
"401":
description: Unauthorised
summary: Authenticate a given email/password
tags:
- Users
/v1/api/users/find:
post:
operationId: findUser
requestBody:
content:
application/json:
schema:
type: string
example:
email: [email protected]
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/User"
description: OK
"400":
description: Invalid search params
"404":
description: Not found
summary: Find user by email
tags:
- Users
/v1/api/users/{userExternalId}:
get:
operationId: getUser
parameters:
- example: 93ba1ec4ed6a4238a59f16ad97b4fa12
in: path
name: userExternalId
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/User"
description: OK
"404":
description: Not found
summary: Find user by user external ID
tags:
- Users
patch:
description: "Patch user attributes. <br>Supports patching (replace op) fields\
\ `disabled, email, features, telephone_number` and `append` for attrbute\
\ `sessionVersion`."
operationId: updateUserAttribute
parameters:
- example: 93ba1ec4ed6a4238a59f16ad97b4fa12
in: path
name: userExternalId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/PatchRequest"
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/User"
description: OK
"400":
description: Invalid payload
"404":
description: User with userExternalId not found
summary: Update user attributes
tags:
- Users
/v1/api/users/{userExternalId}/reset-second-factor:
post:
operationId: resetSecondFactor
parameters:
- example: 93ba1ec4ed6a4238a59f16ad97b4fa12
in: path
name: userExternalId
required: true
schema:
type: string
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/User"
description: OK
"404":
description: User with userExternalId not found
summary: Reset 2FA to SMS
tags:
- Users
/v1/api/users/{userExternalId}/second-factor:
post:
operationId: sendOtpSms
parameters:
- example: 93ba1ec4ed6a4238a59f16ad97b4fa12
in: path
name: userExternalId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: string
example:
provisional: false
responses:
"200":
description: OK
"400":
description: Invalid payload
"404":
description: Not found
summary: Send OTP via SMS for an existing user
tags:
- Users
/v1/api/users/{userExternalId}/second-factor/activate:
post:
operationId: activateSecondFactorOtpKey
parameters:
- example: 93ba1ec4ed6a4238a59f16ad97b4fa12
in: path
name: userExternalId
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
type: string
example:
code: 123456
second_factor: SMS
required:
- code
- second_factor
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/User"
description: OK
"400":
description: Invalid payload
"401":
description: Unauthorised
summary: Activate a new OTP key and method for a user
tags:
- Users
/v1/api/users/{userExternalId}/second-factor/authenticate:
post:
operationId: authenticateSecondFactor
parameters:
- example: 93ba1ec4ed6a4238a59f16ad97b4fa12
in: path
name: userExternalId
required: true
schema:
type: string
requestBody:
content:
application/json: