Skip to content

Create an animal

POST
/animals
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

limit
integer format: int32
<= 100

The path item level limit parameter

tags
required
Array<string>
Allowed values: fish horse

Tags to filter by

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"
}

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"
}

Unexpected error

Media typeapplication/json
object
code
required
integer format: int32
message
required
string
Examplegenerated
{
"code": 1,
"message": "example"
}