POST /attachments
Upload an attachment
POST /attachments#
Upload an attachment
Authentication#
- bearerAuth (http, bearer)
Path parameters#
None.
Query parameters#
None.
Headers#
None.
Request body#
- Required: Yes
- Content type:
multipart/form-data - Schema:
object
Responses#
| Status | Description | Content type | Schema | Example |
|---|---|---|---|---|
201 |
Attachment uploaded | application/json | Attachment | — |
Examples#
cURL#
curl -X POST "https://api.acme.dev/v1/attachments" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: multipart/form-data"
JavaScript#
const response = await fetch("https://api.acme.dev/v1/attachments", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);
TypeScript#
const response = await fetch("https://api.acme.dev/v1/attachments", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);
// Tip: import generated types from your OpenAPI client SDK.