Skip to main content
Use POST /plants to add a new plant to the store. Provide a JSON body with the plant’s name and optional tag.
POST https://api.lymo.jp/plants

Request body

name
string
required
The name of the plant. This field is required.
tag
string
An optional tag to categorize the plant (e.g., “tropical”, “desert”).

Example request

curl -X POST https://api.lymo.jp/plants \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "monstera", "tag": "tropical"}'

Example response

{
  "id": 42,
  "name": "monstera",
  "tag": "tropical"
}

Response fields

id
integer
Unique identifier assigned to the newly created plant.
name
string
The name of the plant.
tag
string
The tag associated with the plant, if provided.

Error responses

Status codeDescription
400 Bad RequestThe name field is missing from the request body.
401 UnauthorizedThe request is missing a valid Bearer token.