addBird
POST
/birds
const url = 'https://example.com/api/birds';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '"Aubrey"'};
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/birds \ --header 'Content-Type: application/json' \ --data '"Aubrey"'Creates a new bird
Request Body
Section titled “Request Body”Bird to add
Responses
Section titled “Responses”Animal response
Media typeapplication/json
object
name
required
string
tag
string
id
required
integer format: int64
Examplegenerated
{ "name": "example", "tag": "example", "id": 1}default
Section titled “default”Unexpected error
Media typeapplication/json
object
code
required
integer format: int32
message
required
string
Examplegenerated
{ "code": 1, "message": "example"}