Creates a new elephant
POST
/elephant
const url = 'https://example.com/api/elephant';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '"large"'};
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/elephant \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '"large"'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Elephant to add
Responses
Section titled “Responses”Animal response
Media typeapplication/json
object
id
required
integer format: int64
name
required
Name of the animal
A friendly name for the animal.
string
tag
string
Example
{ "id": 1, "name": "dog", "tag": "pet"}default
Section titled “default”Unexpected error
Media typeapplication/json
object
code
required
integer format: int32
message
required
string
Examplegenerated
{ "code": 1, "message": "example"}