Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit f8bc66d

Browse files
committed
Add Code Snippets to Spec Files
1 parent ad70754 commit f8bc66d

File tree

1 file changed

+91
-59
lines changed

1 file changed

+91
-59
lines changed

site/specs/numbers.yml

Lines changed: 91 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,38 +1043,31 @@ components:
10431043
description: Verification callback status of a toll-free phone number.
10441044
required: true
10451045
webhookSubscriptionRequest:
1046-
properties:
1047-
accountId:
1048-
type: string
1049-
basicAuthentication:
1050-
properties:
1051-
password:
1052-
maxLength: 200
1053-
type: string
1054-
username:
1055-
maxLength: 100
1056-
type: string
1057-
required:
1058-
- username
1059-
- password
1060-
type: object
1061-
callbackUrl:
1062-
$ref: '#/components/schemas/webhookUrl'
1063-
createdDate:
1064-
format: date-time
1065-
type: string
1066-
id:
1067-
type: string
1068-
modifiedDate:
1069-
format: date-time
1070-
type: string
1071-
type:
1072-
enum:
1073-
- TOLLFREE_VERIFICATION_STATUS
1074-
type: string
1075-
required:
1076-
- callbackUrl
1077-
type: object
1046+
content:
1047+
application/json:
1048+
schema:
1049+
properties:
1050+
basicAuthentication:
1051+
properties:
1052+
password:
1053+
maxLength: 200
1054+
type: string
1055+
username:
1056+
maxLength: 100
1057+
type: string
1058+
required:
1059+
- username
1060+
- password
1061+
type: object
1062+
callbackUrl:
1063+
$ref: '#/components/schemas/webhookUrl'
1064+
required:
1065+
- callbackUrl
1066+
type: object
1067+
description: >-
1068+
Information about a webhook that Bandwidth should send upon the
1069+
completion of TFV verification.
1070+
required: true
10781071
zipWhipTfvWebhookRequest:
10791072
content:
10801073
application/json:
@@ -1343,21 +1336,21 @@ components:
13431336
content:
13441337
application/json:
13451338
schema:
1346-
$ref: '#/components/requestBodies/webhookSubscriptionRequest'
1339+
$ref: '#/components/schemas/webhookSubscription'
13471340
description: Created
13481341
webhookSubscriptionDeleted:
13491342
description: Deleted
13501343
webhookSubscriptionUpdated:
13511344
content:
13521345
application/json:
13531346
schema:
1354-
$ref: '#/components/requestBodies/webhookSubscriptionRequest'
1347+
$ref: '#/components/schemas/webhookSubscription'
13551348
description: OK
13561349
webhookSubscriptionsList:
13571350
content:
13581351
application/json:
13591352
schema:
1360-
$ref: '#/components/schemas/webhookSubscriptionsApiPage'
1353+
$ref: '#/components/schemas/webhookSubscriptionsListBody'
13611354
description: OK
13621355
schemas:
13631356
A2pClass:
@@ -14264,11 +14257,6 @@ components:
1426414257
verificationRequestId:
1426514258
example: abc-d8569gh
1426614259
type: string
14267-
webhookUrl:
14268-
example: https://your_url.com/webhookService
14269-
pattern: >-
14270-
^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*)
14271-
type: string
1427214260
type: object
1427314261
useCase:
1427414262
example: 2FA
@@ -14331,8 +14319,6 @@ components:
1433114319
minLength: 0
1433214320
nullable: false
1433314321
type: string
14334-
webhookUrl:
14335-
$ref: '#/components/schemas/webhookUrl'
1433614322
required:
1433714323
- businessAddress
1433814324
- businessContact
@@ -14365,24 +14351,71 @@ components:
1436514351
status:
1436614352
$ref: '#/components/schemas/tfvCallbackStatus'
1436714353
type: object
14368-
webhookSubscriptionsApiPage:
14354+
webhookSubscription:
1436914355
description: >-
14370-
Object that returns the full list of webhook subscriptions for an
14371-
account.
14356+
Information about a webhook that Bandwidth should send upon the
14357+
completion of TFV verification.
14358+
properties:
14359+
accountId:
14360+
example: '1234567'
14361+
type: string
14362+
basicAuthentication:
14363+
description: >-
14364+
Basic authentication credentials are not required, but if present,
14365+
both username and password must be provided.
14366+
properties:
14367+
password:
14368+
maxLength: 200
14369+
type: string
14370+
username:
14371+
maxLength: 100
14372+
type: string
14373+
required:
14374+
- username
14375+
- password
14376+
type: object
14377+
callbackUrl:
14378+
$ref: '#/components/schemas/webhookUrl'
14379+
createdDate:
14380+
example: '2023-05-15T13:56:39.965Z'
14381+
format: date-time
14382+
type: string
14383+
id:
14384+
example: 7hICGStfAfeGxEq3N0lQwO
14385+
type: string
14386+
modifiedDate:
14387+
example: '2023-05-15T13:56:39.965Z'
14388+
format: date-time
14389+
type: string
14390+
type:
14391+
description: >-
14392+
Currently only one type of webhook is supported for toll-free
14393+
verification, and that is the webhook for the status of a toll-free
14394+
verification request.
14395+
enum:
14396+
- TOLLFREE_VERIFICATION_STATUS
14397+
type: string
14398+
required:
14399+
- callbackUrl
14400+
type: object
14401+
webhookSubscriptionsListBody:
14402+
description: >-
14403+
A list of all webhook subscriptions registered for this account ID for
14404+
this particular feature (unpaginated).
1437214405
properties:
1437314406
data:
1437414407
items:
14375-
$ref: '#/components/requestBodies/webhookSubscriptionRequest'
14408+
$ref: '#/components/schemas/webhookSubscription'
1437614409
type: array
14377-
type: object
14410+
required:
14411+
- data
14412+
type: object
1437814413
webhookUrl:
1437914414
description: >-
14380-
Callback URL to receive status updates from Bandwidth. When this value
14381-
is registered with a validation request, it will be used for that
14382-
request (only) and it cannot be updated after submission. To register a
14383-
callback for all status updates, which can be updated through the API,
14384-
register a webhook subscription (which can also include basic
14385-
authentication credentials).
14415+
Callback URL to receive status updates from Bandwidth. When a webhook
14416+
subscription is registered with Bandwidth under a given account ID, it
14417+
will be used to send status updates for all requests submitted under
14418+
that account ID.
1438614419
example: https://www.example.com/path/to/resource
1438714420
maxLength: 2000
1438814421
minLength: 0
@@ -40148,12 +40181,11 @@ paths:
4014840181
post:
4014940182
description: >-
4015040183
Create a new webhook subscription (this webhook will be called for every
40151-
update on every submission; is is also possible to register a one-time
40152-
callback URL as part of a submission itself). In addition to a
40153-
`callbackUrl`, this subscription can provide HTTP Basic authentication
40154-
credentials (a username and a password). The returned subscription
40155-
object will contain an ID that can be used to modify or delete the
40156-
subscription at a later time.
40184+
update on every submission). In addition to a `callbackUrl`, this
40185+
subscription can provide optional HTTP basic authentication credentials
40186+
(a username and a password). The returned subscription object will
40187+
contain an ID that can be used to modify or delete the subscription at a
40188+
later time.
4015740189
operationId: createWebhookSubscription
4015840190
parameters:
4015940191
- $ref: '#/components/parameters/AccountIdPathParam'

0 commit comments

Comments
 (0)