Collection file referenceDepends on how Ivy is set up
A collection is a set of records of one shape in a space, such as contacts or orders. A collection file (a file whose name ends in .ivy-collection.yaml) declares one: the fields of its records and their types, which fields are indexed so views, flows and apps can filter and sort on them, which field is a record’s title, an optional unique key for data that comes from outside Ivy, and who may create, change and delete records. Every member of the space reads them. Boards show a collection’s records; their files are in the board file reference.
This page lists every field of a collection file. It is generated from the same schema Ivy checks the file with, so it always matches what Ivy accepts.
When a version applies
A new collection file applies by itself once it passes its check. So does a version that only adds: new optional fields, new options, new indexes, higher limits, labels and descriptions.
A version with a breaking change waits for a space admin to apply it: removing a field, changing its type, tightening a limit, removing an option, making a field required or removing an index. So does any change to access or sources, and adding or changing key once the collection has records. Until then, the collection keeps serving the version applied last, and the check says what waits. A space admin applies it with POST /v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/apply; when the version lets more people write, Ivy asks them to confirm their identity first.
To rename a field or an option, give it its new key and its old one in renamed_from. Applying the version moves the records’ values to the new key.
When the file moves or goes to the trash
The collection follows its file: moving or renaming the file keeps it. While the file is in the trash, the collection is detached: its records can’t be changed, and boards and flows that use it say so. Restoring the file brings it back. Purging the file releases the collection’s name.
The built-in tasks collection
Every space has the tasks collection without a file. To extend it, write one extension file: extends: tasks and no name. It may declare new fields, new options of status and new indexes, and it may make access stricter, never looser. It can’t remove or retype a built-in field. There is one extension file per built-in collection.
ivy: collection/v1
extends: tasks
fields:
status:
type: enum
options:
- { key: review, label: In review, color: purple }
customer: { type: text, max_length: 200, index: true }
The tasks declaration
This is how Ivy declares tasks:
ivy: collection/v1
name: tasks
label: Tasks
title: title
fields:
title: { type: text, required: true, max_length: 200 }
detail: { type: markdown, max_length: 20000 }
status:
type: enum
index: true
options:
- { key: todo, label: To do }
- { key: doing, label: Doing, color: blue }
- { key: done, label: Done, color: green }
default: todo
assignees: { type: list, of: { type: person }, max_items: 10, index: true }
labels: { type: list, of: { type: text, max_length: 50 }, max_items: 20, index: true }
due: { type: date, index: true }
access:
create: editors
update: editors
delete: editors
comments: true
A key for data from outside Ivy
key names the field that identifies a record in another system, such as a customer number. It is a required text field or a number field of whole numbers, and its value is unique in the collection: creating a second record with a value another record has fails with key_taken (409), whose details.record_id is the record that has it. A record’s key value can’t change (key_immutable); deleting the record frees it. A collection with sources declares no key.
ivy: collection/v1
name: customers
title: name
key: external_id
fields:
external_id: { type: text, required: true, max_length: 200, read_only: true }
name: { type: text, required: true, max_length: 200 }
segment: { type: text, max_length: 50, index: true }
When a collection that has records gets a key, or another one, a space admin applies the version. Applying it checks that every record has a value and that no two share one; otherwise it fails with key_values_invalid (409), and details.missing and details.duplicates list up to 50 records each, with their counts.
With a key, a flow’s record step can upsert records and delete the ones another system no longer has, and so can the API, with an API key that has the records:write scope:
PUT /v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records/by-key/{value}with{"fields": {…}}creates the record with that key value, or changes the fields given of the record that has it. It answersoutcome(created,updatedorunchanged) and therecord; an upsert that changes nothing writes nothing and starts no flow. Apps may call it too.POST /v1/organisations/{organisation_id}/spaces/{space_id}/collections/{name}/records/batchwrites up to 500 records, each on its own:upsertwith[{key, fields}],createwith[{fields}]ordeletewith[{id}]or[{key}].on_item_error: failstops at the first item that fails, whilecontinue, the default, goes on. Withupsert,sync: {"delete_missing": true}then deletes the records with a key that the batch didn’t name, only when every item succeeded and the batch named at least one, and needs the collection’saccess.delete; records without a key value are never deleted. The answer lists each item’sindex,outcome(created,updated,unchanged,deleted,failedorskipped),record_id,keyanderror, then the counts, withdeleted_missingafter a sync.
Writes are paced at the collection’s write rate, 50 a second with bursts of 200, rather than refused.
Sources from GitHub
sources lets a collection mirror the issues of GitHub repositories, and the items of one GitHub project, as records, through a GitHub App connection of the space. For tasks, it goes into the extension file. Each source names its connection, 1 to 20 repositories, an optional project, and in map the field each part of an issue fills: the title and body a text field, open or closed and the project’s status an options field, the assignees a list of people, the labels a list of text. max_items caps a source at 1,000 issues unless it says otherwise, at most 50,000. A file has at most four sources.
ivy: collection/v1
extends: tasks
sources:
- id: github
provider: github
connection: github
repositories: [support, website]
project: { owner: acme, number: 3, field: Status }
map:
title: title
body: detail
state: { field: status, open: todo, closed: done }
project_status: { field: status, values: { "In progress": doing } }
assignees: assignees
labels: labels
max_items: 1000
Adding, changing or removing a source waits for a space admin, who confirms their identity before applying it; a new collection file applies without its sources first. Removing a source deletes the records it mirrored. How the mirror behaves, its webhook and linking people: GitHub as a source.
Check the file in your editor
The assistant sees a collection file’s problems in the result whenever it saves one, including a name another collection of the space has. To check the file in your own editor, use the JSON Schema Ivy serves at /schemas/collection.schema.json on your Ivy address. For editors that use the YAML language server, make this the first line of the file: # yaml-language-server: $schema=https://<your Ivy address>/schemas/collection.schema.json. In a sandbox, the schemas are in /opt/ivy/schemas/.
File fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
access |
object, see access |
no | Who may create, change and delete records; every member of the space reads them. | |
comments |
true or false | no | Records take comments. | |
extends |
one of tasks |
no | A built-in collection the file adds fields, options and indexes to, instead of declaring a collection of its own. | |
fields |
map of names to object, see fields.<name> |
no | The fields of a record, by key: lowercase letters, digits and _, starting with a letter, up to 40 characters; 1 to 64 fields. |
|
ivy |
one of collection/v1 |
yes | The format version. | |
key |
text | no | A required text or integer number field whose value is unique in the collection, for data that comes from outside Ivy. |
|
label |
text | no | What the app calls the collection, up to 80 characters; its name when left out. | |
limits |
object, see limits |
no | The most the collection holds. | |
name |
text | no | The collection’s name in the space, which views, flows and apps use: lowercase letters, digits and _, starting with a letter, up to 40 characters. Left out when the file extends a built-in collection. |
|
sources |
list of object, see sources |
no | Outside systems whose items the collection mirrors as records, at most 4: GitHub issues. Applying a change to them waits for a space admin with step-up. | |
title |
text | no | The text field that names a record, such as on a card. |
access
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
create |
one of viewers, editors, admins, flows |
no | editors |
Who may create records. viewers: Every member of the space. editors: The space’s editors and admins. admins: The space’s admins. flows: Only flow steps and sources; people and apps read the records. |
delete |
one of viewers, editors, admins, flows |
no | admins |
Who may delete records. viewers: Every member of the space. editors: The space’s editors and admins. admins: The space’s admins. flows: Only flow steps and sources; people and apps read the records. |
update |
one of viewers, editors, admins, flows |
no | editors |
Who may change records. viewers: Every member of the space. editors: The space’s editors and admins. admins: The space’s admins. flows: Only flow steps and sources; people and apps read the records. |
fields.<name>
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
collection |
text | no | For record: the collection of the space whose records the field names. |
|
default |
true or false or number or text or list of true or false or number or text | no | The value a record gets when it’s created without one: a text, number, true or false, an option’s key or a file’s id, or a list of them. | |
description |
text | no | What the field is for, shown as help text and to agents, up to 1,000 characters. | |
format |
one of email, url, phone |
no | For text: the form the text must have. |
|
index |
true or false | no | Views, flows and apps may filter and sort on the field; at most 8 fields of a collection are indexed, beside its title. | |
integer |
true or false | no | For number: whole numbers only. |
|
max |
number | no | For number: the largest value. |
|
max_items |
whole number | no | 50 |
For list: the most items, at most 50. |
max_length |
whole number | no | For text and markdown: the most characters, at most 2,000 for text and 20,000 for markdown. |
|
min |
number | no | For number: the smallest value. |
|
of |
object, see fields.<name>.of |
no | For list: what each item is. |
|
options |
list of object, see fields.<name>.options |
no | For enum: the choices, 1 to 100, in the order the app shows them. |
|
read_only |
true or false | no | Only flows and sources write the field; people and apps read it. | |
renamed_from |
text | no | The key the field had before: applying the file moves the records’ values to the new key. | |
required |
true or false | no | Every record has a value; a write without one is refused. | |
type |
one of text, markdown, number, boolean, date, datetime, enum, person, file, record, list |
yes | What the field holds. text: Plain text. markdown: Formatted text. number: A number. boolean: True or false. date: A day, as YYYY-MM-DD. datetime: A moment, such as 2026-12-01T09:30:00Z; stored in UTC. enum: One of options, by its key. person: A member of the space. file: A file of the space, by its id; the record never holds the file itself. record: A record of collection, by its id. list: A list of items of the type of gives. |
limits
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
records |
whole number | no | The most records, at most 50,000; the organisation’s plan may allow fewer. |
sources
An outside system whose items the collection mirrors as records: GitHub is the source of truth, and Ivy’s edits of mapped fields go to it first.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection |
text | yes | A github_app connection of the space’s connections.ivy.yaml, with the issues: write permission (and organization_projects: write for a project). |
|
id |
text | yes | The source’s id in the file: lowercase letters, digits and _, starting with a letter, up to 40 characters. |
|
map |
object, see sources.map |
yes | Which fields of a record take which of an issue’s; fields left out stay Ivy’s own. | |
max_items |
whole number | no | 1000 |
The most records the source mirrors, 1 to 50,000; past it, it stops adding. |
project |
object, see sources.project |
no | A GitHub project whose single-select status field the records mirror too. | |
provider |
one of github |
yes | Where the items come from. | |
repositories |
list of text | yes | The repositories whose issues become records, by name or as owner/name, among those the connection’s installation covers; 1 to 20. |
fields.<name>.of
An item of a list field.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
collection |
text | no | For record: the collection of the space whose records the field names. |
|
format |
one of email, url, phone |
no | For text: the form the text must have. |
|
integer |
true or false | no | For number: whole numbers only. |
|
max |
number | no | For number: the largest value. |
|
max_length |
whole number | no | For text and markdown: the most characters, at most 2,000 for text and 20,000 for markdown. |
|
min |
number | no | For number: the smallest value. |
|
options |
list of object, see fields.<name>.options |
no | For enum: the choices, 1 to 100, in the order the app shows them. |
|
type |
one of text, markdown, number, boolean, date, datetime, enum, person, file, record, list |
yes | What each item holds: any type but markdown and list. text: Plain text. markdown: Formatted text. number: A number. boolean: True or false. date: A day, as YYYY-MM-DD. datetime: A moment, such as 2026-12-01T09:30:00Z; stored in UTC. enum: One of options, by its key. person: A member of the space. file: A file of the space, by its id; the record never holds the file itself. record: A record of collection, by its id. list: A list of items of the type of gives. |
fields.<name>.options
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
color |
one of grey, red, orange, yellow, green, teal, blue, purple, pink |
no | The option’s colour in the app. | |
key |
text | yes | What records hold: lowercase letters, digits and _, starting with a letter, up to 32 characters. |
|
label |
text | yes | What the app shows, up to 80 characters. | |
renamed_from |
text | no | The key the option had before: applying the file moves the records’ values to the new key. |
sources.map
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
assignees |
text | no | The list of person field that takes the assignees whose GitHub login a space admin linked to a person. |
|
body |
text | no | The text or markdown field that takes the issue’s body. |
|
labels |
text | no | The list of text field that takes the issue’s labels. |
|
project_status |
object, see sources.map.project_status |
no | The enum field that takes the issue’s status on the project. |
|
state |
object, see sources.map.state |
no | The enum field that takes whether the issue is open or closed. |
|
title |
text | no | The text field that takes the issue’s title. |
sources.project
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
field |
text | no | Status |
The name of the project’s single-select field the records mirror. |
number |
whole number | yes | The project’s number in its owner’s projects. | |
owner |
text | yes | The organisation or user login that owns the project. |
sources.map.project_status
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
field |
text | yes | The enum field. |
|
values |
map of names to text | yes | The project status field’s options by name, each to the key of an option of field; at most 50. An unlisted status takes the field’s first option. |
sources.map.state
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
closed |
text | yes | The option a closed issue takes; setting it closes the issue. | |
field |
text | yes | The enum field. |
|
open |
text | yes | The option an open issue takes, when the project gives it no status. |
Example
ivy: collection/v1
name: contacts
label: Contacts
title: name
fields:
name:
type: text
required: true
max_length: 200
company:
type: record
collection: companies
contract:
type: file
email:
type: text
index: true
format: email
next_call:
type: date
index: true
notes:
type: markdown
max_length: 20000
owner:
type: person
index: true
stage:
type: enum
index: true
options:
- key: lead
label: Lead
- key: customer
label: Customer
color: green
- key: lost
label: Lost
color: grey
default: lead
tags:
type: list
index: true
of:
type: text
max_length: 50
max_items: 20
access:
create: editors
update: editors
delete: admins
comments: true
limits:
records: 5000