Creates a new rabbit
POST
/rabbits
const url = 'https://example.com/api/rabbits';const options = { method: 'POST', headers: { Authorization: 'Bearer <token>', 'Content-Type': 'application/x-www-form-urlencoded' }, body: new URLSearchParams({colors: 'brown,white', habitat: 'region,meadow,type,burrow'})};
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/rabbits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data 'colors=brown,white' \ --data 'habitat=region,meadow,type,burrow'Creates a new rabbit
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Rabbit to add
Media typeapplication/x-www-form-urlencoded
object
colors
Array<string>
habitat
object
region
string
type
string
Example
colors=brown,white&habitat=region,meadow,type,burrowResponses
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"}