Skip to main content
The Plant Store API lets you list, create, and delete plants in a sandbox environment. You can document your own API with Mintlify in two ways: by pointing Mintlify at an OpenAPI spec (which auto-generates pages for each endpoint), or by writing MDX pages manually using components like <ParamField> and <ResponseField>. The pages in this section are written by hand to demonstrate the MDX approach.

Base URL

All requests go to the sandbox base URL:
http://sandbox.mintlify.com

Authentication

The Plant Store API uses bearer token authentication. Include your token in the Authorization header on every request.
Authorization: Bearer <your-token>
Here is a complete example using curl:
curl -X GET "http://sandbox.mintlify.com/plants" \
  -H "Authorization: Bearer <your-token>"
Never expose your bearer token in client-side code or commit it to source control. Use environment variables to store credentials securely.

OpenAPI spec

If you prefer to generate API pages automatically from a machine-readable spec, download the OpenAPI file and add it to your Mintlify project.

Plant Store OpenAPI spec

View the OpenAPI spec to generate endpoint pages automatically in your Mintlify docs site.

Endpoints

MethodPathDescription
GET/plantsList all plants
POST/plantsCreate a new plant
DELETE/plants/{id}Delete a plant by ID

Models

Plant
FieldTypeRequiredDescription
namestringYesCommon name of the plant
tagstringNoOptional category tag
NewPlant
FieldTypeRequiredDescription
namestringYesCommon name of the plant
tagstringNoOptional category tag
idintegerYesUnique identifier for the plant
Error
FieldTypeRequiredDescription
errorintegerYesNumeric error code
messagestringYesHuman-readable error description