Create a report Returns the new report ID synchronously
Try it
POST
/reportsThis summary is the canary — a multi-line summary that historically broke YAML frontmatter generation.
Authentication
No authentication required.
Request body
Content type: application/json
- object
titlestringbodystring
Response
201Report created
curl -X POST 'https://api.example.com/v1/reports' \
-H 'Content-Type: application/json' \
-d '{
"title": "string",
"body": "string"
}'const response = await fetch('https://api.example.com/v1/reports', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"title": "string",
"body": "string"
})
});
const data = await response.json();
console.log(data);interface ApiResponse {
// shape your response here
}
const response: Response = await fetch('https://api.example.com/v1/reports', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"title": "string",
"body": "string"
})
});
const data = (await response.json()) as ApiResponse;
console.log(data);import requests
url = "https://api.example.com/v1/reports"
headers = {
"Content-Type": "application/json"
}
payload = {
"title": "string",
"body": "string"
}
response = requests.request("post", url, headers=headers, json=payload)
print(response.json())package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"title": "string",
"body": "string"
}`)
req, err := http.NewRequest("POST", "https://api.example.com/v1/reports", body)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}