Monica
Log in
API v1
v1
View as Markdown

Create a value list

POST /api/v1/value-lists

Create a value list, empty until you add values to it.

Body parameters

Sent as JSON. Anything not listed here is ignored.

name string Required

What the list is called, up to 255 characters.

Returns

The new value list.

data object

The value list.

data.type string

Always value_list.

data.id integer

The id of the list.

data.attributes object

What the list holds.

data.attributes.name string

What the list is called.

data.attributes.items array

Its choices in their order, each shaped as in List value lists.

Rate limit

Sixty requests per minute, per user, shared by every key and device. Every answer carries the budget left in X-RateLimit-Remaining.

POST
curl https://my.monicahq.com/api/v1/value-lists \
-X POST \
-H "Authorization: Bearer $MONICA_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Paper suppliers"
}'
const response = await fetch('https://my.monicahq.com/api/v1/value-lists', {
method: 'POST',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'Paper suppliers',
}),
})
const data = await response.json()
$response = Http::withToken($token)->post('https://my.monicahq.com/api/v1/value-lists', [
'name' => 'Paper suppliers',
]);
Response 201
{
"data": {
"type": "value_list",
"id": 21,
"attributes": {
"name": "Paper suppliers",
"items": []
}
}
}

Keys act as you, with exactly the access you have. Make one per integration so you can revoke it alone.