POST /messages
Send a message
POST /messages#
Send a message
Authentication#
- bearerAuth (http, bearer)
Path parameters#
None.
Query parameters#
None.
Headers#
None.
Request body#
- Required: Yes
- Content type:
application/json - Schema:
CreateMessageRequest
Responses#
| Status | Description | Content type | Schema | Example |
|---|---|---|---|---|
201 |
Message created | application/json | Message | — |
Examples#
cURL#
curl -X POST "https://api.acme.dev/v1/messages" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
JavaScript#
const response = await fetch("https://api.acme.dev/v1/messages", {
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/messages", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
},
});
const data = await response.json();
console.log(data);
// Tip: import generated types from your OpenAPI client SDK.