@apifreaks/openapi-specs 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +156 -0
- package/dist/index.cjs +44663 -0
- package/dist/index.d.cts +30 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +44631 -0
- package/package.json +81 -0
- package/specs/commodity/commodity-fluctuation.json +301 -0
- package/specs/commodity/commodity-prices.json +317 -0
- package/specs/commodity/commodity-symbols.json +215 -0
- package/specs/commodity/commodity-time-series.json +329 -0
- package/specs/commodity/historical-commodity-prices.json +273 -0
- package/specs/currency/currency-converter.json +261 -0
- package/specs/currency/currency-fluctuation.json +282 -0
- package/specs/currency/currency-historical-data-limit.json +158 -0
- package/specs/currency/currency-rate.json +229 -0
- package/specs/currency/currency-supported.json +234 -0
- package/specs/currency/currency-symbols.json +161 -0
- package/specs/currency/currency-time-series.json +325 -0
- package/specs/currency/geolocalized-currency-conversion.json +287 -0
- package/specs/currency/historical-currency-converter.json +269 -0
- package/specs/currency/historical-currency-rate.json +246 -0
- package/specs/dns/bulk-dns-lookup.json +624 -0
- package/specs/dns/dns-history-lookup.json +579 -0
- package/specs/dns/dns-lookup.json +466 -0
- package/specs/dns/reverse-dns-lookup.json +414 -0
- package/specs/domain/bulk-domain-checker.json +284 -0
- package/specs/domain/domain-search-with-suggestions.json +280 -0
- package/specs/domain/domain-search.json +206 -0
- package/specs/domain/subdomain-lookup.json +343 -0
- package/specs/email-validation/bulk-email-validation.json +534 -0
- package/specs/email-validation/email-checker.json +586 -0
- package/specs/financial/bulk-vat-rates-country.json +341 -0
- package/specs/financial/financial-apis-supported-countries.json +204 -0
- package/specs/financial/iban-validation.json +328 -0
- package/specs/financial/swift-code-finder.json +192 -0
- package/specs/financial/swift-code-lookup.json +220 -0
- package/specs/financial/vat-number-validation.json +283 -0
- package/specs/financial/vat-rates-by-ip.json +275 -0
- package/specs/financial/vat-rates-country.json +288 -0
- package/specs/general/usage-credits.json +218 -0
- package/specs/geocoding/forward-geocoding.json +402 -0
- package/specs/geocoding/reverse-geocoding.json +326 -0
- package/specs/geodb/administrative-units-details.json +250 -0
- package/specs/geodb/administrative-units-levels.json +198 -0
- package/specs/geodb/administrative-units.json +237 -0
- package/specs/geodb/cities.json +288 -0
- package/specs/geodb/countries-details.json +274 -0
- package/specs/geodb/countries.json +276 -0
- package/specs/geodb/flags-supported.json +166 -0
- package/specs/geodb/flags.json +227 -0
- package/specs/geodb/regions.json +109 -0
- package/specs/geodb/subregions.json +217 -0
- package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
- package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
- package/specs/ip-intelligence/ip-locator.json +941 -0
- package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
- package/specs/other/astronomy-data.json +803 -0
- package/specs/pdf/delete-pdf-page.json +286 -0
- package/specs/pdf/linearize-pdf.json +277 -0
- package/specs/pdf/merge-pdf.json +285 -0
- package/specs/pdf/pdf-compress.json +304 -0
- package/specs/pdf/pdf-decrypt.json +297 -0
- package/specs/pdf/pdf-encrypt.json +314 -0
- package/specs/pdf/pdf-extract-pages.json +295 -0
- package/specs/pdf/pdf-file-status.json +208 -0
- package/specs/pdf/pdf-file.json +190 -0
- package/specs/pdf/pdf-files.json +126 -0
- package/specs/pdf/pdf-resource-download.json +168 -0
- package/specs/pdf/pdf-resource-upload-binary.json +218 -0
- package/specs/pdf/pdf-resource-upload.json +248 -0
- package/specs/pdf/pdf-restrict.json +343 -0
- package/specs/pdf/pdf-split-pages.json +281 -0
- package/specs/pdf/pdf-task-status.json +252 -0
- package/specs/pdf/pdf-to-image.json +1219 -0
- package/specs/pdf/pdf-unrestrict.json +324 -0
- package/specs/pdf/rotate-pdf-pages.json +305 -0
- package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
- package/specs/phone-validation/phone-number-validation.json +456 -0
- package/specs/scraper/web-scraper.json +674 -0
- package/specs/screenshot/bulk-screenshot.json +949 -0
- package/specs/screenshot/website-screenshot.json +1147 -0
- package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
- package/specs/ssl/ssl-certificate-lookup.json +634 -0
- package/specs/timezone/timezone-converter.json +362 -0
- package/specs/timezone/timezone-lookup.json +910 -0
- package/specs/user-agent/bulk-user-agent-parser.json +441 -0
- package/specs/user-agent/user-agent-parser.json +346 -0
- package/specs/weather/air-quality.json +779 -0
- package/specs/weather/bulk-live-weather.json +834 -0
- package/specs/weather/flood-forecast.json +693 -0
- package/specs/weather/historical-weather.json +1019 -0
- package/specs/weather/live-weather.json +789 -0
- package/specs/weather/marine-weather.json +940 -0
- package/specs/weather/time-series-weather.json +1056 -0
- package/specs/weather/weather-forecast.json +1202 -0
- package/specs/whois/asn-lookup.json +729 -0
- package/specs/whois/bulk-whois-lookup.json +698 -0
- package/specs/whois/domain-whois-history-lookup.json +500 -0
- package/specs/whois/reverse-whois.json +625 -0
- package/specs/whois/whois-domain-lookup.json +533 -0
- package/specs/whois/whois-ip-lookup.json +1110 -0
- package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
- package/specs/zip-code/zip-code-api.json +299 -0
- package/specs/zip-code/zip-code-distance-match.json +311 -0
- package/specs/zip-code/zip-code-distance.json +307 -0
- package/specs/zip-code/zip-codes-by-city.json +279 -0
- package/specs/zip-code/zip-codes-by-region.json +278 -0
- package/specs/zip-code/zip-codes-radius-search.json +349 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Merge PDF API - Instantly Combine PDFs at Scale",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Merge multiple PDF files into a single PDF document in the order they are provided. Accepts up to 100 files per request via file upload or existing file IDs. Returns a task ID for tracking the merge progress.",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "APIFreaks Support",
|
|
9
|
+
"url": "https://apifreaks.com/contact",
|
|
10
|
+
"email": "support@apifreaks.com"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"servers": [
|
|
14
|
+
{
|
|
15
|
+
"url": "https://api.apifreaks.com/v1.0",
|
|
16
|
+
"description": "PDF Merge API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/pdf/merge": {
|
|
21
|
+
"post": {
|
|
22
|
+
"tags": [
|
|
23
|
+
"PDF Operations APIs"
|
|
24
|
+
],
|
|
25
|
+
"summary": "Combine multiple PDF files into one",
|
|
26
|
+
"description": "This API merges multiple PDF files into a single PDF, in the order they are provided",
|
|
27
|
+
"parameters": [
|
|
28
|
+
{
|
|
29
|
+
"name": "format",
|
|
30
|
+
"in": "query",
|
|
31
|
+
"required": false,
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"json",
|
|
36
|
+
"xml"
|
|
37
|
+
],
|
|
38
|
+
"default": "json"
|
|
39
|
+
},
|
|
40
|
+
"description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "file_id",
|
|
44
|
+
"in": "query",
|
|
45
|
+
"required": false,
|
|
46
|
+
"schema": {
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"default": ""
|
|
51
|
+
},
|
|
52
|
+
"default": []
|
|
53
|
+
},
|
|
54
|
+
"description": "An array of unique file IDs referencing PDF files previously uploaded to the API Freaks server. Use this parameter to merge existing files without re-uploading them. Provide multiple IDs to merge files in the specified order."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "destroy",
|
|
58
|
+
"in": "query",
|
|
59
|
+
"required": false,
|
|
60
|
+
"schema": {
|
|
61
|
+
"type": "boolean"
|
|
62
|
+
},
|
|
63
|
+
"description": "If set to `true`, the input file(s) will be permanently deleted from the server immediately after the output PDF is generated."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "output",
|
|
67
|
+
"in": "query",
|
|
68
|
+
"required": false,
|
|
69
|
+
"schema": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"description": "Specifies the desired name for the resulting merged PDF file. If not provided, a default name will be assigned."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "webhook_url",
|
|
76
|
+
"in": "query",
|
|
77
|
+
"required": false,
|
|
78
|
+
"schema": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"description": "The URL to which the webhook notification will be sent after the task is completed."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "webhook_failure_notification",
|
|
85
|
+
"in": "query",
|
|
86
|
+
"required": false,
|
|
87
|
+
"schema": {
|
|
88
|
+
"type": "boolean"
|
|
89
|
+
},
|
|
90
|
+
"description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization\u2019s admin if part of one."
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "X-Webhook-Authorization",
|
|
94
|
+
"in": "header",
|
|
95
|
+
"required": false,
|
|
96
|
+
"schema": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"description": "Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call."
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"requestBody": {
|
|
103
|
+
"description": "Multipart form-data body carrying the PDF file(s) to merge. Alternatively, reference already-uploaded files via the file_id query parameter instead of uploading here.",
|
|
104
|
+
"required": false,
|
|
105
|
+
"content": {
|
|
106
|
+
"multipart/form-data": {
|
|
107
|
+
"schema": {
|
|
108
|
+
"$ref": "#/components/schemas/PdfMergeUploadRequest"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"responses": {
|
|
114
|
+
"200": {
|
|
115
|
+
"description": "Merge task created successfully",
|
|
116
|
+
"content": {
|
|
117
|
+
"application/json": {
|
|
118
|
+
"schema": {
|
|
119
|
+
"$ref": "#/components/schemas/PDFResponse"
|
|
120
|
+
},
|
|
121
|
+
"examples": {
|
|
122
|
+
"success": {
|
|
123
|
+
"summary": "Task created",
|
|
124
|
+
"value": {
|
|
125
|
+
"taskId": "04a06cd5-158d-4191-a45b-6f58249c599d",
|
|
126
|
+
"inputIds": [
|
|
127
|
+
"7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"400": {
|
|
136
|
+
"description": "Bad Request",
|
|
137
|
+
"content": {
|
|
138
|
+
"application/json": {
|
|
139
|
+
"examples": {
|
|
140
|
+
"InvalidID": {
|
|
141
|
+
"summary": "Invalid file ID provided",
|
|
142
|
+
"value": {
|
|
143
|
+
"error": "Invalid File ID Provided",
|
|
144
|
+
"message": "Please provide a valid file ID",
|
|
145
|
+
"path": "/v1.0/pdf/merge",
|
|
146
|
+
"status": 400,
|
|
147
|
+
"timestamp": "2026-07-27T10:49:41.973Z"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"MissingUploadOrId": {
|
|
151
|
+
"summary": "Neither a file nor a file ID was provided",
|
|
152
|
+
"value": {
|
|
153
|
+
"timestamp": "2026-07-27T10:49:41.432Z",
|
|
154
|
+
"path": "/v1.0/pdf/merge-pdf",
|
|
155
|
+
"status": 400,
|
|
156
|
+
"error": "Missing File or ID",
|
|
157
|
+
"message": "Please provide either a file or a file ID."
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"schema": {
|
|
162
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"415": {
|
|
168
|
+
"description": "Unsupported Media Type \u2014 File type not supported",
|
|
169
|
+
"content": {
|
|
170
|
+
"application/json": {
|
|
171
|
+
"examples": {
|
|
172
|
+
"UnsupportedFileType": {
|
|
173
|
+
"summary": "Unsupported file type",
|
|
174
|
+
"value": {
|
|
175
|
+
"timestamp": "2026-07-27T10:49:42.554Z",
|
|
176
|
+
"path": "/v1.0/pdf/merge-pdf",
|
|
177
|
+
"status": 415,
|
|
178
|
+
"error": "Unsupported File Type",
|
|
179
|
+
"message": "The provided file type is not supported. Refer to the documentation for valid file types."
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"schema": {
|
|
184
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"operationId": "mergePdf"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"components": {
|
|
195
|
+
"securitySchemes": {
|
|
196
|
+
"ApiKeyAuthHeader": {
|
|
197
|
+
"type": "apiKey",
|
|
198
|
+
"in": "header",
|
|
199
|
+
"name": "X-apiKey",
|
|
200
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
201
|
+
},
|
|
202
|
+
"ApiKeyAuthQuery": {
|
|
203
|
+
"type": "apiKey",
|
|
204
|
+
"in": "query",
|
|
205
|
+
"name": "apiKey",
|
|
206
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"schemas": {
|
|
210
|
+
"PDFResponse": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"required": [
|
|
213
|
+
"taskId"
|
|
214
|
+
],
|
|
215
|
+
"properties": {
|
|
216
|
+
"taskId": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"description": "Task ID of the requested task, used to check the task status."
|
|
219
|
+
},
|
|
220
|
+
"inputIds": {
|
|
221
|
+
"type": "array",
|
|
222
|
+
"items": {
|
|
223
|
+
"type": "string"
|
|
224
|
+
},
|
|
225
|
+
"description": "File IDs for the input files provided for the task."
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"description": "Response containing the task ID and input file IDs for a PDF processing task."
|
|
229
|
+
},
|
|
230
|
+
"PdfMergeUploadRequest": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"description": "Multipart form-data request body containing multiple PDF files to merge.",
|
|
233
|
+
"required": [],
|
|
234
|
+
"properties": {
|
|
235
|
+
"file": {
|
|
236
|
+
"type": "array",
|
|
237
|
+
"items": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"format": "binary"
|
|
240
|
+
},
|
|
241
|
+
"description": "One or more raw PDF file byte streams, each sent as a separate multipart/form-data field named 'file'. Omit this field entirely and pass one or more file_id query parameters instead to merge already-uploaded files."
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"ErrorResponse": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
248
|
+
"required": [
|
|
249
|
+
"message"
|
|
250
|
+
],
|
|
251
|
+
"properties": {
|
|
252
|
+
"error": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"description": "Short error category or exception type."
|
|
255
|
+
},
|
|
256
|
+
"message": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"description": "Human-readable error message describing the failure."
|
|
259
|
+
},
|
|
260
|
+
"path": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"description": "API endpoint path that produced the error."
|
|
263
|
+
},
|
|
264
|
+
"status": {
|
|
265
|
+
"type": "integer",
|
|
266
|
+
"description": "HTTP status code returned with the error."
|
|
267
|
+
},
|
|
268
|
+
"timestamp": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"format": "date-time",
|
|
271
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"security": [
|
|
278
|
+
{
|
|
279
|
+
"ApiKeyAuthHeader": []
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"ApiKeyAuthQuery": []
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
}
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "PDF Compress API - Reduce PDF File Size Programmatically",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"description": "Compress a PDF file to reduce its file size. Supports four compression levels: low (preserves quality), balanced (optimal ratio), high (significant reduction), and extreme (maximum compression). Accepts a file upload or an existing file ID. Returns a task ID for tracking the compression progress.",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "APIFreaks Support",
|
|
9
|
+
"url": "https://apifreaks.com/contact",
|
|
10
|
+
"email": "support@apifreaks.com"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"servers": [
|
|
14
|
+
{
|
|
15
|
+
"url": "https://api.apifreaks.com/v1.0",
|
|
16
|
+
"description": "PDF Compress API Server"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"paths": {
|
|
20
|
+
"/pdf/compress": {
|
|
21
|
+
"post": {
|
|
22
|
+
"tags": [
|
|
23
|
+
"PDF Operations APIs"
|
|
24
|
+
],
|
|
25
|
+
"summary": "Compress a PDF file",
|
|
26
|
+
"description": "This API compresses a given PDF file to reduce its file serize.",
|
|
27
|
+
"parameters": [
|
|
28
|
+
{
|
|
29
|
+
"name": "format",
|
|
30
|
+
"in": "query",
|
|
31
|
+
"required": false,
|
|
32
|
+
"schema": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"enum": [
|
|
35
|
+
"json",
|
|
36
|
+
"xml"
|
|
37
|
+
],
|
|
38
|
+
"default": "json"
|
|
39
|
+
},
|
|
40
|
+
"description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "file_id",
|
|
44
|
+
"in": "query",
|
|
45
|
+
"required": false,
|
|
46
|
+
"schema": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"description": "The unique ID of a PDF file already uploaded to the API Freaks server. Use this as an alternative to uploading a new file."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "output",
|
|
53
|
+
"in": "query",
|
|
54
|
+
"required": false,
|
|
55
|
+
"schema": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"default": "compressed_pdf"
|
|
58
|
+
},
|
|
59
|
+
"description": "Name of the output PDF."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"name": "compression_level",
|
|
63
|
+
"in": "query",
|
|
64
|
+
"required": true,
|
|
65
|
+
"schema": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"enum": [
|
|
68
|
+
"low",
|
|
69
|
+
"balanced",
|
|
70
|
+
"high",
|
|
71
|
+
"extreme"
|
|
72
|
+
],
|
|
73
|
+
"default": "balanced"
|
|
74
|
+
},
|
|
75
|
+
"description": "Controls how aggressively the PDF is compressed. Lower levels preserve more quality, while higher levels reduce file size more."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "destroy",
|
|
79
|
+
"in": "query",
|
|
80
|
+
"required": false,
|
|
81
|
+
"schema": {
|
|
82
|
+
"type": "boolean"
|
|
83
|
+
},
|
|
84
|
+
"description": "If set to true, the input file(s) will be deleted from the server immediately after the output is generated."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "webhook_url",
|
|
88
|
+
"in": "query",
|
|
89
|
+
"required": false,
|
|
90
|
+
"schema": {
|
|
91
|
+
"type": "string"
|
|
92
|
+
},
|
|
93
|
+
"description": "The URL to which the webhook notification will be sent after the task is completed."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "webhook_failure_notification",
|
|
97
|
+
"in": "query",
|
|
98
|
+
"required": false,
|
|
99
|
+
"schema": {
|
|
100
|
+
"type": "boolean"
|
|
101
|
+
},
|
|
102
|
+
"description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization\u2019s admin if part of one."
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "X-Webhook-Authorization",
|
|
106
|
+
"in": "header",
|
|
107
|
+
"required": false,
|
|
108
|
+
"schema": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"description": "Optional custom header for webhook requests. Format: `Key:Value` (e.g., `Authorization:Bearer token123`). This will be sent as an HTTP header in the webhook call."
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"requestBody": {
|
|
115
|
+
"description": "Multipart form-data body carrying the PDF file to compress. Alternatively, reference an already-uploaded file via the file_id query parameter instead of uploading here.",
|
|
116
|
+
"required": false,
|
|
117
|
+
"content": {
|
|
118
|
+
"multipart/form-data": {
|
|
119
|
+
"schema": {
|
|
120
|
+
"$ref": "#/components/schemas/PdfFileUploadRequest"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"responses": {
|
|
126
|
+
"200": {
|
|
127
|
+
"description": "Compression task created successfully",
|
|
128
|
+
"content": {
|
|
129
|
+
"application/json": {
|
|
130
|
+
"schema": {
|
|
131
|
+
"$ref": "#/components/schemas/PdfTaskResponse"
|
|
132
|
+
},
|
|
133
|
+
"examples": {
|
|
134
|
+
"success": {
|
|
135
|
+
"summary": "Task created",
|
|
136
|
+
"value": {
|
|
137
|
+
"taskId": "ce4b1a38-6cfc-4373-9bd7-ff186fbd8e7e",
|
|
138
|
+
"inputIds": [
|
|
139
|
+
"f2ba4b50-6f8a-43ae-b42d-96937f50cd89"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"400": {
|
|
148
|
+
"description": "Bad Request \u2014 Missing/invalid parameters or file ID",
|
|
149
|
+
"content": {
|
|
150
|
+
"application/json": {
|
|
151
|
+
"examples": {
|
|
152
|
+
"MissingCompressionLevel": {
|
|
153
|
+
"summary": "Missing required compression_level parameter",
|
|
154
|
+
"value": {
|
|
155
|
+
"error": "Invalid Param Exception",
|
|
156
|
+
"message": "please pass correct parameters",
|
|
157
|
+
"path": "/v1.0/pdf/compress",
|
|
158
|
+
"status": 400,
|
|
159
|
+
"timestamp": "2026-07-27T10:50:09.307Z"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"MissingFileOrID": {
|
|
163
|
+
"summary": "Neither a file nor a file ID was provided",
|
|
164
|
+
"value": {
|
|
165
|
+
"timestamp": "2026-07-27T10:50:09.886Z",
|
|
166
|
+
"path": "/v1.0/pdf/compress",
|
|
167
|
+
"status": 400,
|
|
168
|
+
"error": "Missing File or ID",
|
|
169
|
+
"message": "Please provide either a file or a file ID."
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"InvalidID": {
|
|
173
|
+
"summary": "file_id is malformed or does not exist",
|
|
174
|
+
"value": {
|
|
175
|
+
"error": "Invalid File ID Provided",
|
|
176
|
+
"message": "Please provide a valid file ID",
|
|
177
|
+
"path": "/v1.0/pdf/compress",
|
|
178
|
+
"status": 400,
|
|
179
|
+
"timestamp": "2026-07-27T10:50:25.910Z"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"schema": {
|
|
184
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"415": {
|
|
190
|
+
"description": "Unsupported Media Type \u2014 File type not supported",
|
|
191
|
+
"content": {
|
|
192
|
+
"application/json": {
|
|
193
|
+
"examples": {
|
|
194
|
+
"InvalidPDF": {
|
|
195
|
+
"summary": "Uploaded file is not a supported type",
|
|
196
|
+
"value": {
|
|
197
|
+
"timestamp": "2026-07-27T10:50:18.409Z",
|
|
198
|
+
"path": "/v1.0/pdf/compress",
|
|
199
|
+
"status": 415,
|
|
200
|
+
"error": "Unsupported File Type",
|
|
201
|
+
"message": "The provided file type is not supported. Refer to the documentation for valid file types."
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"schema": {
|
|
206
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"operationId": "compressPdf"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"components": {
|
|
217
|
+
"securitySchemes": {
|
|
218
|
+
"ApiKeyAuthHeader": {
|
|
219
|
+
"type": "apiKey",
|
|
220
|
+
"in": "header",
|
|
221
|
+
"name": "X-apiKey",
|
|
222
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
223
|
+
},
|
|
224
|
+
"ApiKeyAuthQuery": {
|
|
225
|
+
"type": "apiKey",
|
|
226
|
+
"in": "query",
|
|
227
|
+
"name": "apiKey",
|
|
228
|
+
"description": "Pass your API key via the apiKey query parameter."
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"schemas": {
|
|
232
|
+
"PdfTaskResponse": {
|
|
233
|
+
"type": "object",
|
|
234
|
+
"description": "Response containing the task ID and input file IDs for a PDF processing task.",
|
|
235
|
+
"required": [
|
|
236
|
+
"taskId"
|
|
237
|
+
],
|
|
238
|
+
"properties": {
|
|
239
|
+
"taskId": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"description": "Task ID of the requested task, used to check the task status."
|
|
242
|
+
},
|
|
243
|
+
"inputIds": {
|
|
244
|
+
"type": "array",
|
|
245
|
+
"items": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"description": "File IDs for the input files provided for the task. Not returned when destroy parameter is true."
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"PdfFileUploadRequest": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"description": "Multipart form-data request body containing the PDF file to process.",
|
|
255
|
+
"properties": {
|
|
256
|
+
"file": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"format": "binary",
|
|
259
|
+
"description": "Raw PDF file bytes sent as a multipart/form-data field named 'file'. Omit this field entirely and pass file_id in the query string instead to use an already-uploaded file."
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
"required": []
|
|
263
|
+
},
|
|
264
|
+
"ErrorResponse": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"description": "Standard error envelope returned by the API on failed requests.",
|
|
267
|
+
"required": [
|
|
268
|
+
"message"
|
|
269
|
+
],
|
|
270
|
+
"properties": {
|
|
271
|
+
"error": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"description": "Short error category or exception type."
|
|
274
|
+
},
|
|
275
|
+
"message": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"description": "Human-readable error message describing the failure."
|
|
278
|
+
},
|
|
279
|
+
"path": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "API endpoint path that produced the error."
|
|
282
|
+
},
|
|
283
|
+
"status": {
|
|
284
|
+
"type": "integer",
|
|
285
|
+
"description": "HTTP status code returned with the error."
|
|
286
|
+
},
|
|
287
|
+
"timestamp": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"format": "date-time",
|
|
290
|
+
"description": "Timestamp when the error occurred (ISO 8601)."
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"security": [
|
|
297
|
+
{
|
|
298
|
+
"ApiKeyAuthHeader": []
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"ApiKeyAuthQuery": []
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
}
|