Create an animal
POST
/animals
const url = 'https://example.com/api/animals?tags=fish';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"id":1,"name":"dog","tag":"pet"}'};
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/animals?tags=fish' \ --header 'Content-Type: application/json' \ --data '{ "id": 1, "name": "dog", "tag": "pet" }'Creates a new animal
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer format: int32
The path item level limit parameter
tags
required
Array<string>
Tags to filter by
Request Bodyrequired
Section titled “Request Bodyrequired”Animal to add
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"}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"}