addTurtle
POST
/turtles
const url = 'https://example.com/api/turtles';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","tag":"example","age":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/turtles \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "tag": "example", "age": 1 }'Creates a new turtle
Request Body
Section titled “Request Body”Turtle to add
Media typeapplication/json
object
name
required
string
tag
string
age
required
integer format: int32
Examplegenerated
{ "name": "example", "tag": "example", "age": 1}