-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsend-message-1.0.yml
95 lines (93 loc) · 2.11 KB
/
send-message-1.0.yml
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
swagger: '2.0'
info:
description: Send message API
version: 1.0
title: Send message API
termsOfService: ''
contact:
email: [email protected]
host: "<HOST>"
basePath: /api/v1.0/
schemes:
- http
- https
paths:
/sendMessage:
post:
tags:
- sendMessage
summary: Send a new message
description: Send a new message
operationId: sendMessage
consumes:
- application/json
produces:
- application/json
parameters:
- name: Authorization
in: header
description: API Key
schema:
type: string
example: api-key
required: true
- name: body
in: body
description: Submit message(s)
schema:
$ref: '#/definitions/SendMessageRequest'
responses:
'202':
description: Message(s) accepted for onward submission
schema:
$ref: '#/definitions/SendMessageResponse'
'400':
description: Invalid input
definitions:
SendMessageRequest:
type: object
required:
- messageId
- senderId
- recipients
- messageType
- channel
- message
properties:
messageId:
type: string
maxLength: 64
example: "y7sdxl24df"
senderId:
type: string
maxLength: 64
example: "0700123456"
recipients:
type: array
items:
type: string
maxLength: 64
example: "0700987654"
messageType:
type: string
enum: ['dummy', 'push', 'sms']
channel:
type: string
enum: ['africas-talking', 'firebase', 'httpbin', 'smpp']
message:
type: string
maxLength: 200
example: This is an example message
priority:
type: string
maxLength: 64
example: 'normal'
callback:
type: string
maxLength: 64
example: 'https://mydomain.com/callback/y7sdxl24df'
SendMessageResponse:
type: object
externalDocs:
description: Find out more about Swagger
url: 'http://swagger.io'