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

Commit 4533cda

Browse files
DX-2735 (#685)
* Add Code Snippets to Spec Files * Add Code Snippets to Spec Files * Add Code Snippets to Spec Files * Add Code Snippets to Spec Files * Add Code Snippets to Spec Files * DX-2834 Fix Redoc Callback CSS * switch to oneOf for callbacks * Add Code Snippets to Spec Files * Add Code Snippets to Spec Files Co-authored-by: Cameron Koegel <[email protected]>
1 parent 19552e6 commit 4533cda

File tree

5 files changed

+414
-17
lines changed

5 files changed

+414
-17
lines changed

site/specs/messaging.yml

Lines changed: 369 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,10 @@ paths:
409409
some control to your media file.
410410
411411
412+
If a file is uploaded with the same name as a file that already exists
413+
under this account, the previous file will be overwritten.
414+
415+
412416
A list of supported media types can be found
413417
[here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).
414418
operationId: uploadMedia
@@ -1091,6 +1095,11 @@ paths:
10911095
$ref: '#/components/responses/messagingTooManyRequestsError'
10921096
'500':
10931097
$ref: '#/components/responses/messagingInternalServerError'
1098+
callbacks:
1099+
inboundCallback:
1100+
$ref: '#/components/callbacks/inboundCallback'
1101+
statusCallback:
1102+
$ref: '#/components/callbacks/statusCallback'
10941103
x-codeSamples:
10951104
- lang: cURL
10961105
source: |
@@ -1845,6 +1854,335 @@ components:
18451854
automatically expire by. This must be a valid RFC-3339 value, e.g.,
18461855
2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00.
18471856
example: '2021-02-01T11:29:18-05:00'
1857+
inboundMessageCallback:
1858+
description: Inbound Message Callback
1859+
type: object
1860+
properties:
1861+
time:
1862+
type: string
1863+
format: date-time
1864+
example: 2016-09-14T18:20:16.000Z
1865+
type:
1866+
type: string
1867+
example: message-received
1868+
to:
1869+
type: string
1870+
example: '+15552223333'
1871+
description:
1872+
type: string
1873+
example: Incoming message received
1874+
message:
1875+
type: object
1876+
properties:
1877+
id:
1878+
type: string
1879+
example: 1661365814859loidf7mcwd4qacn7
1880+
owner:
1881+
type: string
1882+
example: '+15553332222'
1883+
applicationId:
1884+
type: string
1885+
example: 93de2206-9669-4e07-948d-329f4b722ee2
1886+
time:
1887+
type: string
1888+
format: date-time
1889+
example: 2016-09-14T18:20:16.000Z
1890+
segmentCount:
1891+
type: integer
1892+
example: 1
1893+
direction:
1894+
$ref: '#/components/schemas/messageDirectionEnum'
1895+
to:
1896+
uniqueItems: true
1897+
type: array
1898+
items:
1899+
type: string
1900+
example:
1901+
- '+15552223333'
1902+
from:
1903+
type: string
1904+
example: '+15553332222'
1905+
text:
1906+
type: string
1907+
example: Hello world
1908+
tag:
1909+
type: string
1910+
example: custom string
1911+
media:
1912+
type: array
1913+
items:
1914+
type: string
1915+
format: uri
1916+
example:
1917+
- https://dev.bandwidth.com/images/bandwidth-logo.png
1918+
- https://dev.bandwidth.com/images/github_logo.png
1919+
priority:
1920+
$ref: '#/components/schemas/priorityEnum'
1921+
required:
1922+
- id
1923+
- owner
1924+
- applicationId
1925+
- time
1926+
- segmentCount
1927+
- direction
1928+
- to
1929+
- from
1930+
- text
1931+
required:
1932+
- time
1933+
- type
1934+
- to
1935+
- description
1936+
- message
1937+
messageSendingCallback:
1938+
type: object
1939+
description: Message Sending Callback
1940+
properties:
1941+
time:
1942+
type: string
1943+
format: date-time
1944+
example: 2016-09-14T18:20:16.000Z
1945+
type:
1946+
type: string
1947+
example: message-sending
1948+
to:
1949+
type: string
1950+
example: '+15552223333'
1951+
description:
1952+
type: string
1953+
example: Message is sending to carrier
1954+
message:
1955+
type: object
1956+
properties:
1957+
id:
1958+
type: string
1959+
example: 1661365814859loidf7mcwd4qacn7
1960+
owner:
1961+
type: string
1962+
example: '+15553332222'
1963+
applicationId:
1964+
type: string
1965+
example: 93de2206-9669-4e07-948d-329f4b722ee2
1966+
time:
1967+
type: string
1968+
format: date-time
1969+
example: 2016-09-14T18:20:16.000Z
1970+
segmentCount:
1971+
type: integer
1972+
example: 1
1973+
direction:
1974+
$ref: '#/components/schemas/messageDirectionEnum'
1975+
to:
1976+
uniqueItems: true
1977+
type: array
1978+
items:
1979+
type: string
1980+
example:
1981+
- '+15552223333'
1982+
from:
1983+
type: string
1984+
example: '+15553332222'
1985+
text:
1986+
type: string
1987+
example: ''
1988+
tag:
1989+
type: string
1990+
example: custom string
1991+
media:
1992+
type: array
1993+
items:
1994+
type: string
1995+
format: uri
1996+
example:
1997+
- https://dev.bandwidth.com/images/bandwidth-logo.png
1998+
- https://dev.bandwidth.com/images/github_logo.png
1999+
priority:
2000+
$ref: '#/components/schemas/priorityEnum'
2001+
required:
2002+
- id
2003+
- owner
2004+
- applicationId
2005+
- time
2006+
- segmentCount
2007+
- direction
2008+
- to
2009+
- from
2010+
- text
2011+
- media
2012+
- priority
2013+
required:
2014+
- time
2015+
- type
2016+
- to
2017+
- description
2018+
- message
2019+
messageDeliveredCallback:
2020+
description: Message Delivered Callback
2021+
type: object
2022+
properties:
2023+
time:
2024+
type: string
2025+
format: date-time
2026+
example: 2016-09-14T18:20:16.000Z
2027+
type:
2028+
type: string
2029+
example: message-delivered
2030+
to:
2031+
type: string
2032+
example: '+15552223333'
2033+
description:
2034+
type: string
2035+
example: Message delivered to carrier.
2036+
message:
2037+
type: object
2038+
properties:
2039+
id:
2040+
type: string
2041+
example: 1661365814859loidf7mcwd4qacn7
2042+
owner:
2043+
type: string
2044+
example: '+15553332222'
2045+
applicationId:
2046+
type: string
2047+
example: 93de2206-9669-4e07-948d-329f4b722ee2
2048+
time:
2049+
type: string
2050+
format: date-time
2051+
example: 2016-09-14T18:20:16.000Z
2052+
segmentCount:
2053+
type: integer
2054+
example: 1
2055+
direction:
2056+
$ref: '#/components/schemas/messageDirectionEnum'
2057+
to:
2058+
uniqueItems: true
2059+
type: array
2060+
items:
2061+
type: string
2062+
example:
2063+
- '+15552223333'
2064+
from:
2065+
type: string
2066+
example: '+15553332222'
2067+
text:
2068+
type: string
2069+
example: ''
2070+
tag:
2071+
type: string
2072+
example: custom string
2073+
media:
2074+
type: array
2075+
items:
2076+
type: string
2077+
format: uri
2078+
example:
2079+
- https://dev.bandwidth.com/images/bandwidth-logo.png
2080+
- https://dev.bandwidth.com/images/github_logo.png
2081+
priority:
2082+
$ref: '#/components/schemas/priorityEnum'
2083+
required:
2084+
- id
2085+
- owner
2086+
- applicationId
2087+
- time
2088+
- segmentCount
2089+
- direction
2090+
- to
2091+
- from
2092+
- text
2093+
- tag
2094+
required:
2095+
- time
2096+
- type
2097+
- to
2098+
- description
2099+
- message
2100+
messageFailedCallback:
2101+
description: Message Failed Callback
2102+
type: object
2103+
properties:
2104+
time:
2105+
type: string
2106+
format: date-time
2107+
example: 2016-09-14T18:20:16.000Z
2108+
type:
2109+
type: string
2110+
example: message-failed
2111+
to:
2112+
type: string
2113+
example: '+15552223333'
2114+
description:
2115+
type: string
2116+
example: rejected-unallocated-from-number
2117+
message:
2118+
type: object
2119+
properties:
2120+
id:
2121+
type: string
2122+
example: 1661365814859loidf7mcwd4qacn7
2123+
owner:
2124+
type: string
2125+
example: '+15553332222'
2126+
applicationId:
2127+
type: string
2128+
example: 93de2206-9669-4e07-948d-329f4b722ee2
2129+
time:
2130+
type: string
2131+
format: date-time
2132+
example: 2016-09-14T18:20:16.000Z
2133+
segmentCount:
2134+
type: integer
2135+
example: 1
2136+
direction:
2137+
$ref: '#/components/schemas/messageDirectionEnum'
2138+
to:
2139+
uniqueItems: true
2140+
type: array
2141+
items:
2142+
type: string
2143+
example:
2144+
- '+15552223333'
2145+
from:
2146+
type: string
2147+
example: '+15553332222'
2148+
text:
2149+
type: string
2150+
example: ''
2151+
tag:
2152+
type: string
2153+
example: custom string
2154+
media:
2155+
type: array
2156+
items:
2157+
type: string
2158+
format: uri
2159+
example:
2160+
- https://dev.bandwidth.com/images/bandwidth-logo.png
2161+
- https://dev.bandwidth.com/images/github_logo.png
2162+
priority:
2163+
$ref: '#/components/schemas/priorityEnum'
2164+
required:
2165+
- id
2166+
- owner
2167+
- applicationId
2168+
- time
2169+
- segmentCount
2170+
- direction
2171+
- to
2172+
- from
2173+
- text
2174+
- tag
2175+
- priority
2176+
errorCode:
2177+
type: integer
2178+
example: 9902
2179+
required:
2180+
- time
2181+
- type
2182+
- to
2183+
- description
2184+
- message
2185+
- errorCode
18482186
requestBodies:
18492187
createMessageRequest:
18502188
content:
@@ -2113,6 +2451,37 @@ components:
21132451
application/json:
21142452
schema:
21152453
$ref: '#/components/schemas/messagingRequestError'
2454+
callbacks:
2455+
inboundCallback:
2456+
'{inboundCallbackUrl}':
2457+
post:
2458+
requestBody:
2459+
required: true
2460+
description: Inbound Message Callback Payload
2461+
content:
2462+
application/json:
2463+
schema:
2464+
$ref: '#/components/schemas/inboundMessageCallback'
2465+
responses:
2466+
'200':
2467+
description: OK
2468+
statusCallback:
2469+
'{statusCallbackUrl}':
2470+
post:
2471+
requestBody:
2472+
required: true
2473+
description: Status Callback Payload
2474+
content:
2475+
application/json:
2476+
schema:
2477+
type: object
2478+
oneOf:
2479+
- $ref: '#/components/schemas/messageSendingCallback'
2480+
- $ref: '#/components/schemas/messageDeliveredCallback'
2481+
- $ref: '#/components/schemas/messageFailedCallback'
2482+
responses:
2483+
'200':
2484+
description: OK
21162485
securitySchemes:
21172486
Basic:
21182487
type: http

0 commit comments

Comments
 (0)