-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
114 lines (114 loc) · 3.58 KB
/
Copy pathopenapi.yaml
File metadata and controls
114 lines (114 loc) · 3.58 KB
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
openapi: 3.0.3
info:
title: iMessage Number Checker API
version: 1.0.0
description: >
Official CheckNumber asynchronous file-based API for the iMessage
product family. Upload an authorized list, poll the task, then download the
exported result file. Product limits and result columns are listed in product.json.
contact:
name: CheckNumber
url: https://checknumber.ai/products/imessage
license:
name: MIT
url: https://opensource.org/license/mit
externalDocs:
description: CheckNumber iMessage API documentation
url: https://docs.checknumber.ai/imessage-bulk-number-checker
servers:
- url: https://api.checknumber.ai
security:
- ApiKeyAuth: []
paths:
/v1/tasks:
post:
summary: Submit an asynchronous iMessage task
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [file, task_type]
properties:
file:
type: string
format: binary
description: Text file with one identifier per line. Use E.164 phones or valid emails as documented.
task_type:
type: string
enum: [imessage]
responses:
'200':
description: Task accepted by deployments using the legacy success status
content:
application/json:
schema: { $ref: '#/components/schemas/Task' }
'202':
description: Task accepted
content:
application/json:
schema: { $ref: '#/components/schemas/Task' }
'400': { description: Invalid file, task type, or row count }
'401': { description: Missing or invalid API key }
'402': { description: Insufficient balance }
'413': { description: Uploaded file is too large }
'500': { description: Internal server error }
/v1/gettasks:
post:
summary: Check the status of an asynchronous task
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [task_id]
properties:
task_id: { type: string }
responses:
'200':
description: Current task state
content:
application/json:
schema: { $ref: '#/components/schemas/Task' }
'401': { description: Missing or invalid API key }
'404': { description: Task not found }
'500': { description: Internal server error }
/v1/balance:
get:
summary: Get account balance
responses:
'200':
description: Current balance
content:
application/json:
schema: { $ref: '#/components/schemas/Balance' }
'401': { description: Missing or invalid API key }
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
schemas:
Balance:
type: object
required: [balance]
properties:
balance: { type: number, format: double }
Task:
type: object
properties:
task_id: { type: string }
user_id: { type: string }
status:
type: string
enum: [pending, processing, exported, failed]
total: { type: integer }
success: { type: integer }
failure: { type: integer }
result_url: { type: string, format: uri }
message: { type: string }
created_at: { type: string, format: date-time }
updated_at: { type: string, format: date-time }