> For the complete documentation index, see [llms.txt](https://academy.shade.inc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.shade.inc/developers/organize/custom-objects.md).

# Custom objects

Custom objects are your own record types, like Projects, Clients, or Shoots, stored as tables in a drive. Link them to assets with relation fields.

1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.
2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.
3. Create records with `POST .../custom-object-types/{database_id}/records`, and update many at once with `PUT .../records/values`.

## POST /workspaces/drives/{drive\_id}/metadata/custom-objects/{database\_id}/columns

> Add columns to a custom-object database

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"AddColumnsRequest":{"properties":{"columns":{"items":{"$ref":"#/components/schemas/ColumnAddInput"},"type":"array","minItems":1,"title":"Columns"}},"additionalProperties":false,"type":"object","required":["columns"],"title":"AddColumnsRequest"},"ColumnAddInput":{"properties":{"column_name":{"type":"string","title":"Column Name"},"column_type":{"$ref":"#/components/schemas/DatabaseColumnType","description":"The field type: `str`, `single_select`, `multi_select`, `int`, `float`, `bool`, `datetime`,\n`rating`, `relation`, or `lookup`. The `type_*` values are internal."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden","default":false},"add_new_options":{"type":"boolean","title":"Add New Options","default":false,"description":"For AI-filled select fields, let the AI create options that don't exist yet."},"automated":{"type":"boolean","title":"Automated","default":false,"description":"Have Shade's AI fill in this field, guided by `prompt`."},"locked":{"type":"boolean","title":"Locked","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"default_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Input"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionInput"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigInput"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"}},"additionalProperties":false,"type":"object","required":["column_name","column_type"],"title":"ColumnAddInput","description":"Unified input for adding a column to either an asset drive (system db)\nor a custom-object database. Service impls reject fields that don't make\nsense for their object type (e.g. custom-object impl rejects\n``lookup_config``)."},"DatabaseColumnType":{"type":"string","enum":["type_number","type_text_plain","type_text_tsvector_english","type_text_tsvector_english_vector_1024","type_vector_256","type_vector_512","type_jsonb_tsvector_english","type_jsonb_tsvector_english_vector_768","str","single_select","multi_select","float","int","bool","datetime","rating","relation","lookup"],"title":"DatabaseColumnType"},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"SelectOptionInput":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color","default":""},"user_defined":{"type":"boolean","title":"User Defined","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"SelectOptionInput","description":"One select option as stored. ``id`` is server-assigned on create when\nthe client omits it; ``archived`` lets clients tombstone an option without\na separate delete call."},"RelationConfigInput":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseInput"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["target"],"title":"RelationConfigInput"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"InverseInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"InverseInput"},"LookupConfig":{"properties":{"path":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":3,"minItems":1,"title":"Path"},"path_inverse_flags":{"items":{"type":"boolean"},"type":"array","title":"Path Inverse Flags"},"target_column_id":{"type":"string","format":"uuid","title":"Target Column Id"},"target_value_type":{"type":"string","title":"Target Value Type","default":""},"aggregation":{"$ref":"#/components/schemas/LookupAggregation","default":"all"}},"type":"object","required":["path","target_column_id"],"title":"LookupConfig","description":"``path`` is the ordered list of hop ids the user clicked. Each entry\nmay be a real forward ``DatabaseColumnModel.id`` or an\n``inverse_database_columns.id`` synthetic id — the server canonicalizes\nto forward column ids at write time and persists a parallel\n``path_inverse_flags`` derived from which form each entry was. Clients\ndo not need to set ``path_inverse_flags`` on writes; any value supplied\nis ignored and overwritten by the resolver. On reads it reflects the\nstored direction array, parallel to ``path``.\n\n``target_column_id`` is the scalar attribute on the final related object.\n``target_value_type`` is ignored on the request side (the server reads it\nfrom the target column) — the default empty string just lets the request\nDTO round-trip with a placeholder. ``aggregation`` defaults to ALL when\nomitted to keep wire-compat with frontends that don't set it explicitly."},"LookupAggregation":{"type":"string","enum":["first","all","count","sum","avg","min","max"],"title":"LookupAggregation"},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"RealColumnResponse":{"properties":{"kind":{"type":"string","const":"real","title":"Kind","default":"real"},"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden"},"archive":{"type":"boolean","title":"Archive"},"add_new_options":{"type":"boolean","title":"Add New Options"},"automated":{"type":"boolean","title":"Automated"},"locked":{"type":"boolean","title":"Locked"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"default_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Output"},{"type":"null"}]},"options":{"items":{"$ref":"#/components/schemas/SelectOptionResponse"},"type":"array","title":"Options"},"relation_target":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},{"type":"null"}],"title":"Relation Target"},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseResponse"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"}},"type":"object","required":["id","database_id","drive_id","column_human_id","column_name","column_type","hidden","archive","add_new_options","automated","locked"],"title":"RealColumnResponse","description":"Wire shape for a real (DB-backed) metadata column. ``kind=\"real\"``\ndiscriminates from the synthetic inverse variant — see ``ColumnResponse``."},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"SelectOptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color","default":""},"user_defined":{"type":"boolean","title":"User Defined","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["id","name"],"title":"SelectOptionResponse"},"InverseResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["enabled"],"title":"InverseResponse"},"InverseColumnResponse":{"properties":{"kind":{"type":"string","const":"inverse","title":"Kind","default":"inverse"},"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"relation_target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Relation Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"paired_to":{"$ref":"#/components/schemas/PairedTo"}},"type":"object","required":["id","database_id","drive_id","column_human_id","column_name","column_type","relation_target","paired_to"],"title":"InverseColumnResponse","description":"Wire shape for a synthetic inverse column — no DB row backs it. Always\na relation surface (``column_type=\"relation\"``); the source side is the\ndatabase that owns the forward column, surfaced via ``paired_to``."},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns":{"post":{"tags":["custom-objects"],"summary":"Add columns to a custom-object database","operationId":"addCustomObjectColumns","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom-object database id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddColumnsRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/RealColumnResponse"},{"$ref":"#/components/schemas/InverseColumnResponse"}],"discriminator":{"propertyName":"kind","mapping":{"real":"#/components/schemas/RealColumnResponse","inverse":"#/components/schemas/InverseColumnResponse"}}}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/drives/{drive\_id}/metadata/custom-objects/{database\_id}/columns/{column\_id}

> Delete a custom-object column

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns/{column_id}":{"delete":{"tags":["custom-objects"],"summary":"Delete a custom-object column","operationId":"deleteCustomObjectColumn","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom-object database id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The column id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PATCH /workspaces/drives/{drive\_id}/metadata/custom-objects/{database\_id}/columns/{column\_id}

> Update a custom-object column

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"ColumnPatchInput":{"properties":{"column_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Column Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"add_new_options":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Add New Options"},"hidden":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Hidden"},"archive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Archive"},"locked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Locked"},"automated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Automated"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"default_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Input"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionInput"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigInput"},{"type":"null"}]},"rerun_automated":{"type":"boolean","title":"Rerun Automated","default":false}},"additionalProperties":false,"type":"object","title":"ColumnPatchInput","description":"Patch shape. Inspect ``model_fields_set`` to distinguish 'untouched'\nfrom 'explicitly set to null' — service impls only apply fields that were\nactually included in the request body, and return an invalid-input failure\nwhen the body explicitly sets a field that service does not support (e.g.\n``relation_config`` on asset columns)."},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"SelectOptionInput":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color","default":""},"user_defined":{"type":"boolean","title":"User Defined","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"SelectOptionInput","description":"One select option as stored. ``id`` is server-assigned on create when\nthe client omits it; ``archived`` lets clients tombstone an option without\na separate delete call."},"RelationConfigInput":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseInput"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["target"],"title":"RelationConfigInput"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"InverseInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"InverseInput"},"RealColumnResponse":{"properties":{"kind":{"type":"string","const":"real","title":"Kind","default":"real"},"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden"},"archive":{"type":"boolean","title":"Archive"},"add_new_options":{"type":"boolean","title":"Add New Options"},"automated":{"type":"boolean","title":"Automated"},"locked":{"type":"boolean","title":"Locked"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"default_value":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Output"},{"type":"null"}]},"options":{"items":{"$ref":"#/components/schemas/SelectOptionResponse"},"type":"array","title":"Options"},"relation_target":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},{"type":"null"}],"title":"Relation Target"},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseResponse"},{"type":"null"}]},"lookup_config":{"anyOf":[{"$ref":"#/components/schemas/LookupConfig"},{"type":"null"}]},"restrict_to_types":{"anyOf":[{"items":{"$ref":"#/components/schemas/AssetType"},"type":"array"},{"type":"null"}],"title":"Restrict To Types"}},"type":"object","required":["id","database_id","drive_id","column_human_id","column_name","column_type","hidden","archive","add_new_options","automated","locked"],"title":"RealColumnResponse","description":"Wire shape for a real (DB-backed) metadata column. ``kind=\"real\"``\ndiscriminates from the synthetic inverse variant — see ``ColumnResponse``."},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"SelectOptionResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"color":{"type":"string","title":"Color","default":""},"user_defined":{"type":"boolean","title":"User Defined","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["id","name"],"title":"SelectOptionResponse"},"InverseResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["enabled"],"title":"InverseResponse"},"LookupConfig":{"properties":{"path":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":3,"minItems":1,"title":"Path"},"path_inverse_flags":{"items":{"type":"boolean"},"type":"array","title":"Path Inverse Flags"},"target_column_id":{"type":"string","format":"uuid","title":"Target Column Id"},"target_value_type":{"type":"string","title":"Target Value Type","default":""},"aggregation":{"$ref":"#/components/schemas/LookupAggregation","default":"all"}},"type":"object","required":["path","target_column_id"],"title":"LookupConfig","description":"``path`` is the ordered list of hop ids the user clicked. Each entry\nmay be a real forward ``DatabaseColumnModel.id`` or an\n``inverse_database_columns.id`` synthetic id — the server canonicalizes\nto forward column ids at write time and persists a parallel\n``path_inverse_flags`` derived from which form each entry was. Clients\ndo not need to set ``path_inverse_flags`` on writes; any value supplied\nis ignored and overwritten by the resolver. On reads it reflects the\nstored direction array, parallel to ``path``.\n\n``target_column_id`` is the scalar attribute on the final related object.\n``target_value_type`` is ignored on the request side (the server reads it\nfrom the target column) — the default empty string just lets the request\nDTO round-trip with a placeholder. ``aggregation`` defaults to ALL when\nomitted to keep wire-compat with frontends that don't set it explicitly."},"LookupAggregation":{"type":"string","enum":["first","all","count","sum","avg","min","max"],"title":"LookupAggregation"},"AssetType":{"type":"string","enum":["IMAGE","VIDEO","AUDIO","DOCUMENT","HDR","HDRI","PHOTOSHOP","ILLUSTRATOR","EXR","OBJECT","VECTOR","OTHER","MAYA","MAX","BLENDER","HOUDINI","UNREAL","UNITY","AFTER_EFFECTS","MOGRT"],"title":"AssetType"},"InverseColumnResponse":{"properties":{"kind":{"type":"string","const":"inverse","title":"Kind","default":"inverse"},"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"sort_order":{"type":"integer","title":"Sort Order","default":0},"relation_target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Relation Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"paired_to":{"$ref":"#/components/schemas/PairedTo"}},"type":"object","required":["id","database_id","drive_id","column_human_id","column_name","column_type","relation_target","paired_to"],"title":"InverseColumnResponse","description":"Wire shape for a synthetic inverse column — no DB row backs it. Always\na relation surface (``column_type=\"relation\"``); the source side is the\ndatabase that owns the forward column, surfaced via ``paired_to``."},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns/{column_id}":{"patch":{"tags":["custom-objects"],"summary":"Update a custom-object column","operationId":"updateCustomObjectColumn","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom-object database id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"column_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The column id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ColumnPatchInput"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RealColumnResponse"},{"$ref":"#/components/schemas/InverseColumnResponse"}],"discriminator":{"propertyName":"kind","mapping":{"real":"#/components/schemas/RealColumnResponse","inverse":"#/components/schemas/InverseColumnResponse"}}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PUT /workspaces/drives/{drive\_id}/metadata/custom-objects/{database\_id}/columns/order

> Reorder columns on a custom-object database

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"ReorderColumnsRequest":{"properties":{"column_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Column Ids"}},"additionalProperties":false,"type":"object","required":["column_ids"],"title":"ReorderColumnsRequest","description":"``column_ids`` is the full rendered order, so it may contain synthetic\ninverse-column ids; the service skips those rather than failing."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns/order":{"put":{"tags":["custom-objects"],"summary":"Reorder columns on a custom-object database","operationId":"reorderCustomObjectColumns","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom-object database id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderColumnsRequest"}}}},"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/drives/{drive\_id}/custom-object-types

> List custom object types for a drive

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CustomObjectTypeDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"user_managed":{"type":"boolean","title":"User Managed"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"columns":{"items":{"$ref":"#/components/schemas/ColumnDTO"},"type":"array","title":"Columns","default":[]},"record_count":{"type":"integer","title":"Record Count","default":0},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"views_settings":{"$ref":"#/components/schemas/ObjectTypeViewsSettings-Output","default":{"views":[]}},"record_page_layout":{"$ref":"#/components/schemas/RecordPageLayout-Output"},"record_preview":{"$ref":"#/components/schemas/RecordPreviewConfig"}},"type":"object","required":["id","drive_id","name","user_managed","created_by"],"title":"CustomObjectTypeDTO"},"ColumnDTO":{"properties":{"id":{"type":"string","title":"Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden"},"add_new_options":{"type":"boolean","title":"Add New Options"},"automated":{"type":"boolean","title":"Automated"},"locked":{"type":"boolean","title":"Locked"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"display_metadata":{"$ref":"#/components/schemas/DisplayMetadataDTO-Output","default":{}},"sort_order":{"type":"integer","title":"Sort Order","default":0},"paired_to":{"anyOf":[{"$ref":"#/components/schemas/PairedTo"},{"type":"null"}]},"archive":{"type":"boolean","title":"Archive","default":false}},"type":"object","required":["id","column_human_id","column_name","column_type","hidden","add_new_options","automated","locked"],"title":"ColumnDTO"},"DisplayMetadataDTO-Output":{"properties":{"default":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Output"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionDisplayDTO"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigDisplayDTO"},{"type":"null"}]}},"type":"object","title":"DisplayMetadataDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"SelectOptionDisplayDTO":{"properties":{"id":{"type":"string","title":"Id","default":""},"name":{"type":"string","title":"Name","default":""},"color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor"},"user":{"type":"boolean","title":"User","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["color"],"title":"SelectOptionDisplayDTO"},"MetadataAttributeSelectOptionColor":{"type":"string","enum":["pink","red","yellow","light_green","dark_green","light_blue","dark_blue","purple"],"title":"MetadataAttributeSelectOptionColor"},"RelationConfigDisplayDTO":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfigDTO"},{"type":"null"}]}},"type":"object","title":"RelationConfigDisplayDTO"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"InverseConfigDTO":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"InverseConfigDTO"},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"ObjectTypeViewsSettings-Output":{"properties":{"views":{"items":{"$ref":"#/components/schemas/ObjectTypeTableView-Output"},"type":"array","title":"Views","default":[]}},"type":"object","title":"ObjectTypeViewsSettings"},"ObjectTypeTableView-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"default"}],"title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"primaryAssetColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Primaryassetcolumnid"},"columnIds":{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array","title":"Columnids"},"knownColumnIds":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Knowncolumnids"},"colOrder":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Colorder"},"attrOrder":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrorder"},"attrShown":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrshown"},"sorts":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewSort"},"type":"array","title":"Sorts"},"filters":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilter"},"type":"array","title":"Filters"},"columnWidths":{"additionalProperties":{"type":"number"},"propertyNames":{"$ref":"#/components/schemas/TableColumnId"},"type":"object","title":"Columnwidths","default":{}},"layout":{"anyOf":[{"type":"string","enum":["table","kanban","calendar"]},{"type":"null"}],"title":"Layout"},"kanban":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeKanbanSettings"},{"type":"null"}]},"calendar":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeCalendarSettings"},{"type":"null"}]},"groupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Groupbycolumnid"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"}},"type":"object","required":["id","name","columnIds","sorts","filters"],"title":"ObjectTypeTableView"},"TableColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["__name","system:created_at","system:created_by","system:updated_at","system:record_id"]}]},"ObjectTypeTableViewSort":{"properties":{"columnId":{"$ref":"#/components/schemas/TableColumnId"},"direction":{"type":"string","enum":["asc","desc"],"title":"Direction"}},"type":"object","required":["columnId","direction"],"title":"ObjectTypeTableViewSort"},"ObjectTypeTableViewFilter":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"columnId":{"$ref":"#/components/schemas/TableColumnId"},"clause":{"type":"string","title":"Clause"},"options":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilterOption"},"type":"array","title":"Options"},"ignoreOptions":{"type":"boolean","title":"Ignoreoptions"}},"type":"object","required":["id","columnId","clause","options","ignoreOptions"],"title":"ObjectTypeTableViewFilter"},"ObjectTypeTableViewFilterOption":{"properties":{"client_val":{"type":"string","title":"Client Val"},"server_val":{"type":"string","title":"Server Val"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["client_val","server_val"],"title":"ObjectTypeTableViewFilterOption"},"ObjectTypeKanbanSettings":{"properties":{"groupByColumnId":{"type":"string","format":"uuid","title":"Groupbycolumnid"},"subgroupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subgroupbycolumnid"},"hiddenGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hiddengroupids"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"},"showAssetPreview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showassetpreview"}},"type":"object","required":["groupByColumnId"],"title":"ObjectTypeKanbanSettings"},"ObjectTypeCalendarSettings":{"properties":{"dateColumnId":{"type":"string","format":"uuid","title":"Datecolumnid"},"mode":{"anyOf":[{"type":"string","enum":["month","week"]},{"type":"null"}],"title":"Mode"},"showAssetPreview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showassetpreview"},"spanDaysByRecordId":{"anyOf":[{"additionalProperties":{"type":"integer"},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Spandaysbyrecordid"}},"type":"object","required":["dateColumnId"],"title":"ObjectTypeCalendarSettings"},"RecordPageLayout-Output":{"properties":{"widgets":{"items":{"$ref":"#/components/schemas/RecordPageWidget"},"type":"array","maxItems":6,"title":"Widgets"},"sections":{"items":{"$ref":"#/components/schemas/RecordPageSection"},"type":"array","maxItems":100,"title":"Sections"}},"type":"object","title":"RecordPageLayout"},"RecordPageWidget":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"field":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"title":"Field","discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}}},"type":"object","required":["id","field"],"title":"RecordPageWidget"},"ColumnFieldRef":{"properties":{"kind":{"type":"string","const":"column","title":"Kind","default":"column"},"columnId":{"type":"string","maxLength":64,"title":"Columnid"}},"type":"object","required":["columnId"],"title":"ColumnFieldRef"},"SystemFieldRef":{"properties":{"kind":{"type":"string","const":"system","title":"Kind","default":"system"},"key":{"type":"string","enum":["record_id","created_by","created_at","updated_at"],"title":"Key"}},"type":"object","required":["key"],"title":"SystemFieldRef"},"RecordPageSection":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"name":{"type":"string","maxLength":255,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"isRequired":{"type":"boolean","title":"Isrequired","default":false},"fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}},"type":"array","maxItems":500,"title":"Fields"}},"type":"object","required":["id","name"],"title":"RecordPageSection"},"RecordPreviewConfig":{"properties":{"visible_fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}},"type":"array","maxItems":500,"title":"Visible Fields"}},"type":"object","title":"RecordPreviewConfig","description":"Ordered attributes shown on a record's preview card. The instance name is\nalways the card title and is intentionally not part of this list."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types":{"get":{"tags":["custom-objects"],"summary":"List custom object types for a drive","operationId":"listCustomObjectTypes","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomObjectTypeDTO"}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/drives/{drive\_id}/custom-object-types

> Create a new custom object type

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CreateCustomObjectTypeBody":{"properties":{"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"columns":{"items":{"$ref":"#/components/schemas/ColumnSpecDTO"},"type":"array","title":"Columns","default":[]}},"type":"object","required":["name"],"title":"CreateCustomObjectTypeBody"},"ColumnSpecDTO":{"properties":{"column_name":{"type":"string","title":"Column Name"},"column_type":{"$ref":"#/components/schemas/DatabaseColumnType"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden","default":false},"add_new_options":{"type":"boolean","title":"Add New Options","default":false},"automated":{"type":"boolean","title":"Automated","default":false},"locked":{"type":"boolean","title":"Locked","default":false},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"display_metadata":{"anyOf":[{"$ref":"#/components/schemas/DisplayMetadataDTO-Input"},{"type":"null"}]},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigDTO"},{"type":"null"}]}},"type":"object","required":["column_name","column_type"],"title":"ColumnSpecDTO"},"DatabaseColumnType":{"type":"string","enum":["type_number","type_text_plain","type_text_tsvector_english","type_text_tsvector_english_vector_1024","type_vector_256","type_vector_512","type_jsonb_tsvector_english","type_jsonb_tsvector_english_vector_768","str","single_select","multi_select","float","int","bool","datetime","rating","relation","lookup"],"title":"DatabaseColumnType"},"DisplayMetadataDTO-Input":{"properties":{"default":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Input"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionDisplayDTO"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigDisplayDTO"},{"type":"null"}]}},"type":"object","title":"DisplayMetadataDTO"},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"SelectOptionDisplayDTO":{"properties":{"id":{"type":"string","title":"Id","default":""},"name":{"type":"string","title":"Name","default":""},"color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor"},"user":{"type":"boolean","title":"User","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["color"],"title":"SelectOptionDisplayDTO"},"MetadataAttributeSelectOptionColor":{"type":"string","enum":["pink","red","yellow","light_green","dark_green","light_blue","dark_blue","purple"],"title":"MetadataAttributeSelectOptionColor"},"RelationConfigDisplayDTO":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfigDTO"},{"type":"null"}]}},"type":"object","title":"RelationConfigDisplayDTO"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"InverseConfigDTO":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"InverseConfigDTO"},"RelationConfigDTO":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfigDTO"},{"type":"null"}]}},"type":"object","required":["target"],"title":"RelationConfigDTO"},"CustomObjectTypeDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"user_managed":{"type":"boolean","title":"User Managed"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"columns":{"items":{"$ref":"#/components/schemas/ColumnDTO"},"type":"array","title":"Columns","default":[]},"record_count":{"type":"integer","title":"Record Count","default":0},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"views_settings":{"$ref":"#/components/schemas/ObjectTypeViewsSettings-Output","default":{"views":[]}},"record_page_layout":{"$ref":"#/components/schemas/RecordPageLayout-Output"},"record_preview":{"$ref":"#/components/schemas/RecordPreviewConfig"}},"type":"object","required":["id","drive_id","name","user_managed","created_by"],"title":"CustomObjectTypeDTO"},"ColumnDTO":{"properties":{"id":{"type":"string","title":"Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden"},"add_new_options":{"type":"boolean","title":"Add New Options"},"automated":{"type":"boolean","title":"Automated"},"locked":{"type":"boolean","title":"Locked"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"display_metadata":{"$ref":"#/components/schemas/DisplayMetadataDTO-Output","default":{}},"sort_order":{"type":"integer","title":"Sort Order","default":0},"paired_to":{"anyOf":[{"$ref":"#/components/schemas/PairedTo"},{"type":"null"}]},"archive":{"type":"boolean","title":"Archive","default":false}},"type":"object","required":["id","column_human_id","column_name","column_type","hidden","add_new_options","automated","locked"],"title":"ColumnDTO"},"DisplayMetadataDTO-Output":{"properties":{"default":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Output"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionDisplayDTO"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigDisplayDTO"},{"type":"null"}]}},"type":"object","title":"DisplayMetadataDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"ObjectTypeViewsSettings-Output":{"properties":{"views":{"items":{"$ref":"#/components/schemas/ObjectTypeTableView-Output"},"type":"array","title":"Views","default":[]}},"type":"object","title":"ObjectTypeViewsSettings"},"ObjectTypeTableView-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"default"}],"title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"primaryAssetColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Primaryassetcolumnid"},"columnIds":{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array","title":"Columnids"},"knownColumnIds":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Knowncolumnids"},"colOrder":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Colorder"},"attrOrder":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrorder"},"attrShown":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrshown"},"sorts":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewSort"},"type":"array","title":"Sorts"},"filters":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilter"},"type":"array","title":"Filters"},"columnWidths":{"additionalProperties":{"type":"number"},"propertyNames":{"$ref":"#/components/schemas/TableColumnId"},"type":"object","title":"Columnwidths","default":{}},"layout":{"anyOf":[{"type":"string","enum":["table","kanban","calendar"]},{"type":"null"}],"title":"Layout"},"kanban":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeKanbanSettings"},{"type":"null"}]},"calendar":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeCalendarSettings"},{"type":"null"}]},"groupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Groupbycolumnid"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"}},"type":"object","required":["id","name","columnIds","sorts","filters"],"title":"ObjectTypeTableView"},"TableColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["__name","system:created_at","system:created_by","system:updated_at","system:record_id"]}]},"ObjectTypeTableViewSort":{"properties":{"columnId":{"$ref":"#/components/schemas/TableColumnId"},"direction":{"type":"string","enum":["asc","desc"],"title":"Direction"}},"type":"object","required":["columnId","direction"],"title":"ObjectTypeTableViewSort"},"ObjectTypeTableViewFilter":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"columnId":{"$ref":"#/components/schemas/TableColumnId"},"clause":{"type":"string","title":"Clause"},"options":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilterOption"},"type":"array","title":"Options"},"ignoreOptions":{"type":"boolean","title":"Ignoreoptions"}},"type":"object","required":["id","columnId","clause","options","ignoreOptions"],"title":"ObjectTypeTableViewFilter"},"ObjectTypeTableViewFilterOption":{"properties":{"client_val":{"type":"string","title":"Client Val"},"server_val":{"type":"string","title":"Server Val"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["client_val","server_val"],"title":"ObjectTypeTableViewFilterOption"},"ObjectTypeKanbanSettings":{"properties":{"groupByColumnId":{"type":"string","format":"uuid","title":"Groupbycolumnid"},"subgroupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subgroupbycolumnid"},"hiddenGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hiddengroupids"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"},"showAssetPreview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showassetpreview"}},"type":"object","required":["groupByColumnId"],"title":"ObjectTypeKanbanSettings"},"ObjectTypeCalendarSettings":{"properties":{"dateColumnId":{"type":"string","format":"uuid","title":"Datecolumnid"},"mode":{"anyOf":[{"type":"string","enum":["month","week"]},{"type":"null"}],"title":"Mode"},"showAssetPreview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showassetpreview"},"spanDaysByRecordId":{"anyOf":[{"additionalProperties":{"type":"integer"},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Spandaysbyrecordid"}},"type":"object","required":["dateColumnId"],"title":"ObjectTypeCalendarSettings"},"RecordPageLayout-Output":{"properties":{"widgets":{"items":{"$ref":"#/components/schemas/RecordPageWidget"},"type":"array","maxItems":6,"title":"Widgets"},"sections":{"items":{"$ref":"#/components/schemas/RecordPageSection"},"type":"array","maxItems":100,"title":"Sections"}},"type":"object","title":"RecordPageLayout"},"RecordPageWidget":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"field":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"title":"Field","discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}}},"type":"object","required":["id","field"],"title":"RecordPageWidget"},"ColumnFieldRef":{"properties":{"kind":{"type":"string","const":"column","title":"Kind","default":"column"},"columnId":{"type":"string","maxLength":64,"title":"Columnid"}},"type":"object","required":["columnId"],"title":"ColumnFieldRef"},"SystemFieldRef":{"properties":{"kind":{"type":"string","const":"system","title":"Kind","default":"system"},"key":{"type":"string","enum":["record_id","created_by","created_at","updated_at"],"title":"Key"}},"type":"object","required":["key"],"title":"SystemFieldRef"},"RecordPageSection":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"name":{"type":"string","maxLength":255,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"isRequired":{"type":"boolean","title":"Isrequired","default":false},"fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}},"type":"array","maxItems":500,"title":"Fields"}},"type":"object","required":["id","name"],"title":"RecordPageSection"},"RecordPreviewConfig":{"properties":{"visible_fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}},"type":"array","maxItems":500,"title":"Visible Fields"}},"type":"object","title":"RecordPreviewConfig","description":"Ordered attributes shown on a record's preview card. The instance name is\nalways the card title and is intentionally not part of this list."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types":{"post":{"tags":["custom-objects"],"summary":"Create a new custom object type","operationId":"createCustomObjectType","parameters":[{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomObjectTypeBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomObjectTypeDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}

> Get a custom object type with its columns

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CustomObjectTypeDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"user_managed":{"type":"boolean","title":"User Managed"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"columns":{"items":{"$ref":"#/components/schemas/ColumnDTO"},"type":"array","title":"Columns","default":[]},"record_count":{"type":"integer","title":"Record Count","default":0},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"views_settings":{"$ref":"#/components/schemas/ObjectTypeViewsSettings-Output","default":{"views":[]}},"record_page_layout":{"$ref":"#/components/schemas/RecordPageLayout-Output"},"record_preview":{"$ref":"#/components/schemas/RecordPreviewConfig"}},"type":"object","required":["id","drive_id","name","user_managed","created_by"],"title":"CustomObjectTypeDTO"},"ColumnDTO":{"properties":{"id":{"type":"string","title":"Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden"},"add_new_options":{"type":"boolean","title":"Add New Options"},"automated":{"type":"boolean","title":"Automated"},"locked":{"type":"boolean","title":"Locked"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"display_metadata":{"$ref":"#/components/schemas/DisplayMetadataDTO-Output","default":{}},"sort_order":{"type":"integer","title":"Sort Order","default":0},"paired_to":{"anyOf":[{"$ref":"#/components/schemas/PairedTo"},{"type":"null"}]},"archive":{"type":"boolean","title":"Archive","default":false}},"type":"object","required":["id","column_human_id","column_name","column_type","hidden","add_new_options","automated","locked"],"title":"ColumnDTO"},"DisplayMetadataDTO-Output":{"properties":{"default":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Output"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionDisplayDTO"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigDisplayDTO"},{"type":"null"}]}},"type":"object","title":"DisplayMetadataDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"SelectOptionDisplayDTO":{"properties":{"id":{"type":"string","title":"Id","default":""},"name":{"type":"string","title":"Name","default":""},"color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor"},"user":{"type":"boolean","title":"User","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["color"],"title":"SelectOptionDisplayDTO"},"MetadataAttributeSelectOptionColor":{"type":"string","enum":["pink","red","yellow","light_green","dark_green","light_blue","dark_blue","purple"],"title":"MetadataAttributeSelectOptionColor"},"RelationConfigDisplayDTO":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfigDTO"},{"type":"null"}]}},"type":"object","title":"RelationConfigDisplayDTO"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"InverseConfigDTO":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"InverseConfigDTO"},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"ObjectTypeViewsSettings-Output":{"properties":{"views":{"items":{"$ref":"#/components/schemas/ObjectTypeTableView-Output"},"type":"array","title":"Views","default":[]}},"type":"object","title":"ObjectTypeViewsSettings"},"ObjectTypeTableView-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"default"}],"title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"primaryAssetColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Primaryassetcolumnid"},"columnIds":{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array","title":"Columnids"},"knownColumnIds":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Knowncolumnids"},"colOrder":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Colorder"},"attrOrder":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrorder"},"attrShown":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrshown"},"sorts":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewSort"},"type":"array","title":"Sorts"},"filters":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilter"},"type":"array","title":"Filters"},"columnWidths":{"additionalProperties":{"type":"number"},"propertyNames":{"$ref":"#/components/schemas/TableColumnId"},"type":"object","title":"Columnwidths","default":{}},"layout":{"anyOf":[{"type":"string","enum":["table","kanban","calendar"]},{"type":"null"}],"title":"Layout"},"kanban":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeKanbanSettings"},{"type":"null"}]},"calendar":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeCalendarSettings"},{"type":"null"}]},"groupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Groupbycolumnid"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"}},"type":"object","required":["id","name","columnIds","sorts","filters"],"title":"ObjectTypeTableView"},"TableColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["__name","system:created_at","system:created_by","system:updated_at","system:record_id"]}]},"ObjectTypeTableViewSort":{"properties":{"columnId":{"$ref":"#/components/schemas/TableColumnId"},"direction":{"type":"string","enum":["asc","desc"],"title":"Direction"}},"type":"object","required":["columnId","direction"],"title":"ObjectTypeTableViewSort"},"ObjectTypeTableViewFilter":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"columnId":{"$ref":"#/components/schemas/TableColumnId"},"clause":{"type":"string","title":"Clause"},"options":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilterOption"},"type":"array","title":"Options"},"ignoreOptions":{"type":"boolean","title":"Ignoreoptions"}},"type":"object","required":["id","columnId","clause","options","ignoreOptions"],"title":"ObjectTypeTableViewFilter"},"ObjectTypeTableViewFilterOption":{"properties":{"client_val":{"type":"string","title":"Client Val"},"server_val":{"type":"string","title":"Server Val"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["client_val","server_val"],"title":"ObjectTypeTableViewFilterOption"},"ObjectTypeKanbanSettings":{"properties":{"groupByColumnId":{"type":"string","format":"uuid","title":"Groupbycolumnid"},"subgroupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subgroupbycolumnid"},"hiddenGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hiddengroupids"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"},"showAssetPreview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showassetpreview"}},"type":"object","required":["groupByColumnId"],"title":"ObjectTypeKanbanSettings"},"ObjectTypeCalendarSettings":{"properties":{"dateColumnId":{"type":"string","format":"uuid","title":"Datecolumnid"},"mode":{"anyOf":[{"type":"string","enum":["month","week"]},{"type":"null"}],"title":"Mode"},"showAssetPreview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showassetpreview"},"spanDaysByRecordId":{"anyOf":[{"additionalProperties":{"type":"integer"},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Spandaysbyrecordid"}},"type":"object","required":["dateColumnId"],"title":"ObjectTypeCalendarSettings"},"RecordPageLayout-Output":{"properties":{"widgets":{"items":{"$ref":"#/components/schemas/RecordPageWidget"},"type":"array","maxItems":6,"title":"Widgets"},"sections":{"items":{"$ref":"#/components/schemas/RecordPageSection"},"type":"array","maxItems":100,"title":"Sections"}},"type":"object","title":"RecordPageLayout"},"RecordPageWidget":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"field":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"title":"Field","discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}}},"type":"object","required":["id","field"],"title":"RecordPageWidget"},"ColumnFieldRef":{"properties":{"kind":{"type":"string","const":"column","title":"Kind","default":"column"},"columnId":{"type":"string","maxLength":64,"title":"Columnid"}},"type":"object","required":["columnId"],"title":"ColumnFieldRef"},"SystemFieldRef":{"properties":{"kind":{"type":"string","const":"system","title":"Kind","default":"system"},"key":{"type":"string","enum":["record_id","created_by","created_at","updated_at"],"title":"Key"}},"type":"object","required":["key"],"title":"SystemFieldRef"},"RecordPageSection":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"name":{"type":"string","maxLength":255,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"isRequired":{"type":"boolean","title":"Isrequired","default":false},"fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}},"type":"array","maxItems":500,"title":"Fields"}},"type":"object","required":["id","name"],"title":"RecordPageSection"},"RecordPreviewConfig":{"properties":{"visible_fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}},"type":"array","maxItems":500,"title":"Visible Fields"}},"type":"object","title":"RecordPreviewConfig","description":"Ordered attributes shown on a record's preview card. The instance name is\nalways the card title and is intentionally not part of this list."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}":{"get":{"tags":["custom-objects"],"summary":"Get a custom object type with its columns","operationId":"getCustomObjectType","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomObjectTypeDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}

> Delete a custom object type and all its records

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}":{"delete":{"tags":["custom-objects"],"summary":"Delete a custom object type and all its records","operationId":"deleteCustomObjectType","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PATCH /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}

> Update a custom object type's metadata

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UpdateCustomObjectTypeBody":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"views_settings":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeViewsSettings-Input"},{"type":"null"}]},"record_page_layout":{"anyOf":[{"$ref":"#/components/schemas/RecordPageLayout-Input"},{"type":"null"}]},"record_preview":{"anyOf":[{"$ref":"#/components/schemas/RecordPreviewConfig"},{"type":"null"}]}},"type":"object","title":"UpdateCustomObjectTypeBody"},"ObjectTypeViewsSettings-Input":{"properties":{"views":{"items":{"$ref":"#/components/schemas/ObjectTypeTableView-Input"},"type":"array","title":"Views","default":[]}},"type":"object","title":"ObjectTypeViewsSettings"},"ObjectTypeTableView-Input":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"default"}],"title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"primaryAssetColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Primaryassetcolumnid"},"columnIds":{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array","title":"Columnids"},"knownColumnIds":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Knowncolumnids"},"colOrder":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Colorder"},"attrOrder":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrorder"},"attrShown":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrshown"},"sorts":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewSort"},"type":"array","title":"Sorts"},"filters":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilter"},"type":"array","title":"Filters"},"columnWidths":{"additionalProperties":{"type":"number"},"propertyNames":{"$ref":"#/components/schemas/TableColumnId"},"type":"object","title":"Columnwidths","default":{}},"layout":{"anyOf":[{"type":"string","enum":["table","kanban","calendar"]},{"type":"null"}],"title":"Layout"},"kanban":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeKanbanSettings"},{"type":"null"}]},"calendar":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeCalendarSettings"},{"type":"null"}]},"groupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Groupbycolumnid"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"}},"type":"object","required":["id","name","columnIds","sorts","filters"],"title":"ObjectTypeTableView"},"TableColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","enum":["__name","system:created_at","system:created_by","system:updated_at","system:record_id"]}]},"ObjectTypeTableViewSort":{"properties":{"columnId":{"$ref":"#/components/schemas/TableColumnId"},"direction":{"type":"string","enum":["asc","desc"],"title":"Direction"}},"type":"object","required":["columnId","direction"],"title":"ObjectTypeTableViewSort"},"ObjectTypeTableViewFilter":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"columnId":{"$ref":"#/components/schemas/TableColumnId"},"clause":{"type":"string","title":"Clause"},"options":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilterOption"},"type":"array","title":"Options"},"ignoreOptions":{"type":"boolean","title":"Ignoreoptions"}},"type":"object","required":["id","columnId","clause","options","ignoreOptions"],"title":"ObjectTypeTableViewFilter"},"ObjectTypeTableViewFilterOption":{"properties":{"client_val":{"type":"string","title":"Client Val"},"server_val":{"type":"string","title":"Server Val"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"}},"type":"object","required":["client_val","server_val"],"title":"ObjectTypeTableViewFilterOption"},"ObjectTypeKanbanSettings":{"properties":{"groupByColumnId":{"type":"string","format":"uuid","title":"Groupbycolumnid"},"subgroupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Subgroupbycolumnid"},"hiddenGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hiddengroupids"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"},"showAssetPreview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showassetpreview"}},"type":"object","required":["groupByColumnId"],"title":"ObjectTypeKanbanSettings"},"ObjectTypeCalendarSettings":{"properties":{"dateColumnId":{"type":"string","format":"uuid","title":"Datecolumnid"},"mode":{"anyOf":[{"type":"string","enum":["month","week"]},{"type":"null"}],"title":"Mode"},"showAssetPreview":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showassetpreview"},"spanDaysByRecordId":{"anyOf":[{"additionalProperties":{"type":"integer"},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Spandaysbyrecordid"}},"type":"object","required":["dateColumnId"],"title":"ObjectTypeCalendarSettings"},"RecordPageLayout-Input":{"properties":{"widgets":{"items":{"$ref":"#/components/schemas/RecordPageWidget"},"type":"array","maxItems":6,"title":"Widgets"},"sections":{"items":{"$ref":"#/components/schemas/RecordPageSection"},"type":"array","maxItems":100,"title":"Sections"}},"type":"object","title":"RecordPageLayout"},"RecordPageWidget":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"field":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"title":"Field","discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}}},"type":"object","required":["id","field"],"title":"RecordPageWidget"},"ColumnFieldRef":{"properties":{"kind":{"type":"string","const":"column","title":"Kind","default":"column"},"columnId":{"type":"string","maxLength":64,"title":"Columnid"}},"type":"object","required":["columnId"],"title":"ColumnFieldRef"},"SystemFieldRef":{"properties":{"kind":{"type":"string","const":"system","title":"Kind","default":"system"},"key":{"type":"string","enum":["record_id","created_by","created_at","updated_at"],"title":"Key"}},"type":"object","required":["key"],"title":"SystemFieldRef"},"RecordPageSection":{"properties":{"id":{"type":"string","maxLength":64,"title":"Id"},"name":{"type":"string","maxLength":255,"title":"Name"},"description":{"type":"string","maxLength":1000,"title":"Description","default":""},"isRequired":{"type":"boolean","title":"Isrequired","default":false},"fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}},"type":"array","maxItems":500,"title":"Fields"}},"type":"object","required":["id","name"],"title":"RecordPageSection"},"RecordPreviewConfig":{"properties":{"visible_fields":{"items":{"oneOf":[{"$ref":"#/components/schemas/ColumnFieldRef"},{"$ref":"#/components/schemas/SystemFieldRef"}],"discriminator":{"propertyName":"kind","mapping":{"column":"#/components/schemas/ColumnFieldRef","system":"#/components/schemas/SystemFieldRef"}}},"type":"array","maxItems":500,"title":"Visible Fields"}},"type":"object","title":"RecordPreviewConfig","description":"Ordered attributes shown on a record's preview card. The instance name is\nalways the card title and is intentionally not part of this list."},"CustomObjectTypeDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"user_managed":{"type":"boolean","title":"User Managed"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"columns":{"items":{"$ref":"#/components/schemas/ColumnDTO"},"type":"array","title":"Columns","default":[]},"record_count":{"type":"integer","title":"Record Count","default":0},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"views_settings":{"$ref":"#/components/schemas/ObjectTypeViewsSettings-Output","default":{"views":[]}},"record_page_layout":{"$ref":"#/components/schemas/RecordPageLayout-Output"},"record_preview":{"$ref":"#/components/schemas/RecordPreviewConfig"}},"type":"object","required":["id","drive_id","name","user_managed","created_by"],"title":"CustomObjectTypeDTO"},"ColumnDTO":{"properties":{"id":{"type":"string","title":"Id"},"column_human_id":{"type":"string","title":"Column Human Id"},"column_name":{"type":"string","title":"Column Name"},"column_type":{"type":"string","title":"Column Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"hidden":{"type":"boolean","title":"Hidden"},"add_new_options":{"type":"boolean","title":"Add New Options"},"automated":{"type":"boolean","title":"Automated"},"locked":{"type":"boolean","title":"Locked"},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt"},"display_metadata":{"$ref":"#/components/schemas/DisplayMetadataDTO-Output","default":{}},"sort_order":{"type":"integer","title":"Sort Order","default":0},"paired_to":{"anyOf":[{"$ref":"#/components/schemas/PairedTo"},{"type":"null"}]},"archive":{"type":"boolean","title":"Archive","default":false}},"type":"object","required":["id","column_human_id","column_name","column_type","hidden","add_new_options","automated","locked"],"title":"ColumnDTO"},"DisplayMetadataDTO-Output":{"properties":{"default":{"anyOf":[{"$ref":"#/components/schemas/JsonValue-Output"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/SelectOptionDisplayDTO"},"type":"array"},{"type":"null"}],"title":"Options"},"relation_config":{"anyOf":[{"$ref":"#/components/schemas/RelationConfigDisplayDTO"},{"type":"null"}]}},"type":"object","title":"DisplayMetadataDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"SelectOptionDisplayDTO":{"properties":{"id":{"type":"string","title":"Id","default":""},"name":{"type":"string","title":"Name","default":""},"color":{"$ref":"#/components/schemas/MetadataAttributeSelectOptionColor"},"user":{"type":"boolean","title":"User","default":false},"archived":{"type":"boolean","title":"Archived","default":false}},"type":"object","required":["color"],"title":"SelectOptionDisplayDTO"},"MetadataAttributeSelectOptionColor":{"type":"string","enum":["pink","red","yellow","light_green","dark_green","light_blue","dark_blue","purple"],"title":"MetadataAttributeSelectOptionColor"},"RelationConfigDisplayDTO":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"inverse":{"anyOf":[{"$ref":"#/components/schemas/InverseConfigDTO"},{"type":"null"}]}},"type":"object","title":"RelationConfigDisplayDTO"},"AssetTarget":{"properties":{"kind":{"type":"string","const":"asset","title":"Kind","default":"asset"}},"type":"object","title":"AssetTarget"},"CustomObjectTarget":{"properties":{"kind":{"type":"string","const":"custom_object","title":"Kind","default":"custom_object"},"database_id":{"type":"string","format":"uuid","title":"Database Id"}},"type":"object","required":["database_id"],"title":"CustomObjectTarget"},"IndividualTarget":{"properties":{"kind":{"type":"string","const":"individual","title":"Kind","default":"individual"}},"type":"object","title":"IndividualTarget"},"UserTarget":{"properties":{"kind":{"type":"string","const":"user","title":"Kind","default":"user"}},"type":"object","title":"UserTarget"},"InverseConfigDTO":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","title":"InverseConfigDTO"},"PairedTo":{"properties":{"target":{"oneOf":[{"$ref":"#/components/schemas/AssetTarget"},{"$ref":"#/components/schemas/CustomObjectTarget"},{"$ref":"#/components/schemas/IndividualTarget"},{"$ref":"#/components/schemas/UserTarget"}],"title":"Target","discriminator":{"propertyName":"kind","mapping":{"asset":"#/components/schemas/AssetTarget","custom_object":"#/components/schemas/CustomObjectTarget","individual":"#/components/schemas/IndividualTarget","user":"#/components/schemas/UserTarget"}}},"column_id":{"type":"string","format":"uuid","title":"Column Id"},"type_name":{"type":"string","title":"Type Name"},"column_name":{"type":"string","title":"Column Name"}},"type":"object","required":["target","column_id","type_name","column_name"],"title":"PairedTo","description":"``target`` describes the kind that OWNS the forward column; the union\nkeeps room for non-custom-object owners (e.g. future user-source forward\ncolumns)."},"ObjectTypeViewsSettings-Output":{"properties":{"views":{"items":{"$ref":"#/components/schemas/ObjectTypeTableView-Output"},"type":"array","title":"Views","default":[]}},"type":"object","title":"ObjectTypeViewsSettings"},"ObjectTypeTableView-Output":{"properties":{"id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"string","const":"default"}],"title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"},"primaryAssetColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Primaryassetcolumnid"},"columnIds":{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array","title":"Columnids"},"knownColumnIds":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Knowncolumnids"},"colOrder":{"anyOf":[{"items":{"$ref":"#/components/schemas/TableColumnId"},"type":"array"},{"type":"null"}],"title":"Colorder"},"attrOrder":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrorder"},"attrShown":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attrshown"},"sorts":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewSort"},"type":"array","title":"Sorts"},"filters":{"items":{"$ref":"#/components/schemas/ObjectTypeTableViewFilter"},"type":"array","title":"Filters"},"columnWidths":{"additionalProperties":{"type":"number"},"propertyNames":{"$ref":"#/components/schemas/TableColumnId"},"type":"object","title":"Columnwidths","default":{}},"layout":{"anyOf":[{"type":"string","enum":["table","kanban","calendar"]},{"type":"null"}],"title":"Layout"},"kanban":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeKanbanSettings"},{"type":"null"}]},"calendar":{"anyOf":[{"$ref":"#/components/schemas/ObjectTypeCalendarSettings"},{"type":"null"}]},"groupByColumnId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Groupbycolumnid"},"collapsedGroupIds":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Collapsedgroupids"},"showEmptyGroups":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Showemptygroups"}},"type":"object","required":["id","name","columnIds","sorts","filters"],"title":"ObjectTypeTableView"},"RecordPageLayout-Output":{"properties":{"widgets":{"items":{"$ref":"#/components/schemas/RecordPageWidget"},"type":"array","maxItems":6,"title":"Widgets"},"sections":{"items":{"$ref":"#/components/schemas/RecordPageSection"},"type":"array","maxItems":100,"title":"Sections"}},"type":"object","title":"RecordPageLayout"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}":{"patch":{"tags":["custom-objects"],"summary":"Update a custom object type's metadata","operationId":"updateCustomObjectType","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomObjectTypeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomObjectTypeDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}/records

> List records of a custom object type

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CustomObjectRecordListDTO":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomObjectRecordDTO"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"CustomObjectRecordListDTO"},"CustomObjectRecordDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created":{"type":"string","format":"date-time","title":"Created"},"updated":{"type":"string","format":"date-time","title":"Updated"},"metadata_values":{"items":{"$ref":"#/components/schemas/MetadataValueDTO"},"type":"array","title":"Metadata Values","default":[]}},"type":"object","required":["id","database_id","drive_id","name","created_by","created","updated"],"title":"CustomObjectRecordDTO"},"MetadataValueDTO":{"oneOf":[{"$ref":"#/components/schemas/ScalarMetadataValueDTO"},{"$ref":"#/components/schemas/RelationMetadataValueDTO"},{"$ref":"#/components/schemas/LookupMetadataValueDTO"}],"discriminator":{"propertyName":"kind","mapping":{"lookup":"#/components/schemas/LookupMetadataValueDTO","reference":"#/components/schemas/RelationMetadataValueDTO","scalar":"#/components/schemas/ScalarMetadataValueDTO"}}},"ScalarMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind","default":"scalar"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"ScalarMetadataValueDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"RelationMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"reference","title":"Kind","default":"reference"},"id":{"type":"string","format":"uuid","title":"Id"},"values":{"items":{"$ref":"#/components/schemas/RelationPillDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","id","values"],"title":"RelationMetadataValueDTO"},"RelationPillDTO":{"oneOf":[{"$ref":"#/components/schemas/AssetPillDTO"},{"$ref":"#/components/schemas/CustomObjectPillDTO"},{"$ref":"#/components/schemas/IndividualPillDTO"},{"$ref":"#/components/schemas/UserPillDTO"}],"discriminator":{"propertyName":"entity_type","mapping":{"asset":"#/components/schemas/AssetPillDTO","custom_object":"#/components/schemas/CustomObjectPillDTO","individual":"#/components/schemas/IndividualPillDTO","user":"#/components/schemas/UserPillDTO"}}},"AssetPillDTO":{"properties":{"entity_type":{"type":"string","const":"asset","title":"Entity Type","default":"asset"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["entity_type","id","name","asset_type","thumbnail_url"],"title":"AssetPillDTO"},"CustomObjectPillDTO":{"properties":{"entity_type":{"type":"string","const":"custom_object","title":"Entity Type","default":"custom_object"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["entity_type","id","name","icon","color"],"title":"CustomObjectPillDTO"},"IndividualPillDTO":{"properties":{"entity_type":{"type":"string","const":"individual","title":"Entity Type","default":"individual"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["entity_type","id","name","avatar_url"],"title":"IndividualPillDTO"},"UserPillDTO":{"properties":{"entity_type":{"type":"string","const":"user","title":"Entity Type","default":"user"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"type":"string","title":"Email"}},"type":"object","required":["entity_type","id","name","avatar_url","email"],"title":"UserPillDTO"},"LookupMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"lookup","title":"Kind","default":"lookup"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"LookupMetadataValueDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}/records":{"get":{"tags":["custom-objects"],"summary":"List records of a custom object type","operationId":"listCustomObjectRecords","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomObjectRecordListDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}/records

> Create a new custom object record

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CreateCustomObjectRecordBody":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"metadata":{"anyOf":[{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/RelationCellValue"},{"$ref":"#/components/schemas/ScalarCellValue"}],"discriminator":{"propertyName":"kind","mapping":{"relation":"#/components/schemas/RelationCellValue","scalar":"#/components/schemas/ScalarCellValue"}}},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"CreateCustomObjectRecordBody"},"RelationCellValue":{"properties":{"kind":{"type":"string","const":"relation","title":"Kind"},"values":{"items":{"$ref":"#/components/schemas/RelationValueWriteDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","values"],"title":"RelationCellValue"},"RelationValueWriteDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"$ref":"#/components/schemas/RelatedObjectType"}},"type":"object","required":["id","type"],"title":"RelationValueWriteDTO","description":"A relation target reference in a write body.\n\nAccepts `entity_type` as an alias for `type` so clients can write back the\npill objects the read DTOs return (round-trip symmetry); extra pill fields\n(name, thumbnail_url, ...) are ignored."},"RelatedObjectType":{"type":"string","enum":["asset","custom_object","user","individual"],"title":"RelatedObjectType"},"ScalarCellValue":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind"},"value":{"$ref":"#/components/schemas/JsonValue-Input"}},"type":"object","required":["kind","value"],"title":"ScalarCellValue"},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"CustomObjectRecordDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created":{"type":"string","format":"date-time","title":"Created"},"updated":{"type":"string","format":"date-time","title":"Updated"},"metadata_values":{"items":{"$ref":"#/components/schemas/MetadataValueDTO"},"type":"array","title":"Metadata Values","default":[]}},"type":"object","required":["id","database_id","drive_id","name","created_by","created","updated"],"title":"CustomObjectRecordDTO"},"MetadataValueDTO":{"oneOf":[{"$ref":"#/components/schemas/ScalarMetadataValueDTO"},{"$ref":"#/components/schemas/RelationMetadataValueDTO"},{"$ref":"#/components/schemas/LookupMetadataValueDTO"}],"discriminator":{"propertyName":"kind","mapping":{"lookup":"#/components/schemas/LookupMetadataValueDTO","reference":"#/components/schemas/RelationMetadataValueDTO","scalar":"#/components/schemas/ScalarMetadataValueDTO"}}},"ScalarMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind","default":"scalar"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"ScalarMetadataValueDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"RelationMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"reference","title":"Kind","default":"reference"},"id":{"type":"string","format":"uuid","title":"Id"},"values":{"items":{"$ref":"#/components/schemas/RelationPillDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","id","values"],"title":"RelationMetadataValueDTO"},"RelationPillDTO":{"oneOf":[{"$ref":"#/components/schemas/AssetPillDTO"},{"$ref":"#/components/schemas/CustomObjectPillDTO"},{"$ref":"#/components/schemas/IndividualPillDTO"},{"$ref":"#/components/schemas/UserPillDTO"}],"discriminator":{"propertyName":"entity_type","mapping":{"asset":"#/components/schemas/AssetPillDTO","custom_object":"#/components/schemas/CustomObjectPillDTO","individual":"#/components/schemas/IndividualPillDTO","user":"#/components/schemas/UserPillDTO"}}},"AssetPillDTO":{"properties":{"entity_type":{"type":"string","const":"asset","title":"Entity Type","default":"asset"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["entity_type","id","name","asset_type","thumbnail_url"],"title":"AssetPillDTO"},"CustomObjectPillDTO":{"properties":{"entity_type":{"type":"string","const":"custom_object","title":"Entity Type","default":"custom_object"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["entity_type","id","name","icon","color"],"title":"CustomObjectPillDTO"},"IndividualPillDTO":{"properties":{"entity_type":{"type":"string","const":"individual","title":"Entity Type","default":"individual"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["entity_type","id","name","avatar_url"],"title":"IndividualPillDTO"},"UserPillDTO":{"properties":{"entity_type":{"type":"string","const":"user","title":"Entity Type","default":"user"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"type":"string","title":"Email"}},"type":"object","required":["entity_type","id","name","avatar_url","email"],"title":"UserPillDTO"},"LookupMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"lookup","title":"Kind","default":"lookup"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"LookupMetadataValueDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}/records":{"post":{"tags":["custom-objects"],"summary":"Create a new custom object record","operationId":"createCustomObjectRecord","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomObjectRecordBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomObjectRecordDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PUT /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}/records/values

> Bulk create or update custom object record values

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"BulkUpdateRecordsBody":{"properties":{"records":{"items":{"$ref":"#/components/schemas/BulkRecordUpsert"},"type":"array","maxItems":1000,"minItems":1,"title":"Records"}},"type":"object","required":["records"],"title":"BulkUpdateRecordsBody"},"BulkRecordUpsert":{"properties":{"record_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Record Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"metadata":{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/RelationCellValue"},{"$ref":"#/components/schemas/ScalarCellValue"}],"discriminator":{"propertyName":"kind","mapping":{"relation":"#/components/schemas/RelationCellValue","scalar":"#/components/schemas/ScalarCellValue"}}},"propertyNames":{"format":"uuid"},"type":"object","title":"Metadata"}},"type":"object","title":"BulkRecordUpsert"},"RelationCellValue":{"properties":{"kind":{"type":"string","const":"relation","title":"Kind"},"values":{"items":{"$ref":"#/components/schemas/RelationValueWriteDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","values"],"title":"RelationCellValue"},"RelationValueWriteDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"$ref":"#/components/schemas/RelatedObjectType"}},"type":"object","required":["id","type"],"title":"RelationValueWriteDTO","description":"A relation target reference in a write body.\n\nAccepts `entity_type` as an alias for `type` so clients can write back the\npill objects the read DTOs return (round-trip symmetry); extra pill fields\n(name, thumbnail_url, ...) are ignored."},"RelatedObjectType":{"type":"string","enum":["asset","custom_object","user","individual"],"title":"RelatedObjectType"},"ScalarCellValue":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind"},"value":{"$ref":"#/components/schemas/JsonValue-Input"}},"type":"object","required":["kind","value"],"title":"ScalarCellValue"},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"BulkUpdateRecordsResponse":{"properties":{"created_record_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Created Record Ids"},"updated_record_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Updated Record Ids"}},"type":"object","required":["created_record_ids","updated_record_ids"],"title":"BulkUpdateRecordsResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}/records/values":{"put":{"tags":["custom-objects"],"summary":"Bulk create or update custom object record values","operationId":"bulkUpdateRecords","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRecordsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateRecordsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}/records/search

> Search records of a custom object type with server-side filtering, sorting and pagination. Note: This request is idempotent

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"SearchCustomObjectRecordsBody":{"properties":{"filters":{"items":{"$ref":"#/components/schemas/AddedFilterForSearch"},"type":"array","title":"Filters"},"sort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort","description":"A column id, optionally prefixed by '-' for descending order. Use '__name' for the record name."},"limit":{"type":"integer","maximum":500,"minimum":1,"title":"Limit","default":100},"offset":{"type":"integer","minimum":0,"title":"Offset","default":0}},"type":"object","title":"SearchCustomObjectRecordsBody"},"AddedFilterForSearch":{"properties":{"id":{"title":"Id","description":"The field to filter on, such as `path`, `type`, `name`, `extension`, `created`, `updated`, `size_bytes`, `collection`, or `individual`, or a metadata attribute ID."},"options":{"items":{"type":"string"},"type":"array","title":"Options","description":"Values to compare against. Paths start with the drive ID, types are `AssetType` values such as\n`VIDEO`, dates are ISO 8601 strings, and select attributes take option IDs."},"clause":{"$ref":"#/components/schemas/FilterClauseVal"}},"type":"object","required":["id","options","clause"],"title":"AddedFilterForSearch"},"FilterClauseVal":{"type":"string","enum":["is","is any of","is not","is true","is false","is not true","is not false","has","doesn't have","before","after","between","is directly in","is under","is not in","<","< any of","<=","<= any of",">","> any of",">=",">= any of","hasn't started","in progress of","completed","failed","includes","does not include","contains","does not contain","does not start with","starts with","end with","is empty","is not empty"],"title":"FilterClauseVal","description":"Filter Clause Values Enum. Contains all filter clause values"},"SearchCustomObjectRecordsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomObjectRecordDTO"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["items","has_more"],"title":"SearchCustomObjectRecordsResponse"},"CustomObjectRecordDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created":{"type":"string","format":"date-time","title":"Created"},"updated":{"type":"string","format":"date-time","title":"Updated"},"metadata_values":{"items":{"$ref":"#/components/schemas/MetadataValueDTO"},"type":"array","title":"Metadata Values","default":[]}},"type":"object","required":["id","database_id","drive_id","name","created_by","created","updated"],"title":"CustomObjectRecordDTO"},"MetadataValueDTO":{"oneOf":[{"$ref":"#/components/schemas/ScalarMetadataValueDTO"},{"$ref":"#/components/schemas/RelationMetadataValueDTO"},{"$ref":"#/components/schemas/LookupMetadataValueDTO"}],"discriminator":{"propertyName":"kind","mapping":{"lookup":"#/components/schemas/LookupMetadataValueDTO","reference":"#/components/schemas/RelationMetadataValueDTO","scalar":"#/components/schemas/ScalarMetadataValueDTO"}}},"ScalarMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind","default":"scalar"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"ScalarMetadataValueDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"RelationMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"reference","title":"Kind","default":"reference"},"id":{"type":"string","format":"uuid","title":"Id"},"values":{"items":{"$ref":"#/components/schemas/RelationPillDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","id","values"],"title":"RelationMetadataValueDTO"},"RelationPillDTO":{"oneOf":[{"$ref":"#/components/schemas/AssetPillDTO"},{"$ref":"#/components/schemas/CustomObjectPillDTO"},{"$ref":"#/components/schemas/IndividualPillDTO"},{"$ref":"#/components/schemas/UserPillDTO"}],"discriminator":{"propertyName":"entity_type","mapping":{"asset":"#/components/schemas/AssetPillDTO","custom_object":"#/components/schemas/CustomObjectPillDTO","individual":"#/components/schemas/IndividualPillDTO","user":"#/components/schemas/UserPillDTO"}}},"AssetPillDTO":{"properties":{"entity_type":{"type":"string","const":"asset","title":"Entity Type","default":"asset"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["entity_type","id","name","asset_type","thumbnail_url"],"title":"AssetPillDTO"},"CustomObjectPillDTO":{"properties":{"entity_type":{"type":"string","const":"custom_object","title":"Entity Type","default":"custom_object"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["entity_type","id","name","icon","color"],"title":"CustomObjectPillDTO"},"IndividualPillDTO":{"properties":{"entity_type":{"type":"string","const":"individual","title":"Entity Type","default":"individual"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["entity_type","id","name","avatar_url"],"title":"IndividualPillDTO"},"UserPillDTO":{"properties":{"entity_type":{"type":"string","const":"user","title":"Entity Type","default":"user"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"type":"string","title":"Email"}},"type":"object","required":["entity_type","id","name","avatar_url","email"],"title":"UserPillDTO"},"LookupMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"lookup","title":"Kind","default":"lookup"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"LookupMetadataValueDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}/records/search":{"post":{"tags":["custom-objects"],"summary":"Search records of a custom object type with server-side filtering, sorting and pagination. Note: This request is idempotent","operationId":"searchCustomObjectRecords","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchCustomObjectRecordsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchCustomObjectRecordsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}/records/{record\_id}

> Get a single custom object record

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CustomObjectRecordDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created":{"type":"string","format":"date-time","title":"Created"},"updated":{"type":"string","format":"date-time","title":"Updated"},"metadata_values":{"items":{"$ref":"#/components/schemas/MetadataValueDTO"},"type":"array","title":"Metadata Values","default":[]}},"type":"object","required":["id","database_id","drive_id","name","created_by","created","updated"],"title":"CustomObjectRecordDTO"},"MetadataValueDTO":{"oneOf":[{"$ref":"#/components/schemas/ScalarMetadataValueDTO"},{"$ref":"#/components/schemas/RelationMetadataValueDTO"},{"$ref":"#/components/schemas/LookupMetadataValueDTO"}],"discriminator":{"propertyName":"kind","mapping":{"lookup":"#/components/schemas/LookupMetadataValueDTO","reference":"#/components/schemas/RelationMetadataValueDTO","scalar":"#/components/schemas/ScalarMetadataValueDTO"}}},"ScalarMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind","default":"scalar"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"ScalarMetadataValueDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"RelationMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"reference","title":"Kind","default":"reference"},"id":{"type":"string","format":"uuid","title":"Id"},"values":{"items":{"$ref":"#/components/schemas/RelationPillDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","id","values"],"title":"RelationMetadataValueDTO"},"RelationPillDTO":{"oneOf":[{"$ref":"#/components/schemas/AssetPillDTO"},{"$ref":"#/components/schemas/CustomObjectPillDTO"},{"$ref":"#/components/schemas/IndividualPillDTO"},{"$ref":"#/components/schemas/UserPillDTO"}],"discriminator":{"propertyName":"entity_type","mapping":{"asset":"#/components/schemas/AssetPillDTO","custom_object":"#/components/schemas/CustomObjectPillDTO","individual":"#/components/schemas/IndividualPillDTO","user":"#/components/schemas/UserPillDTO"}}},"AssetPillDTO":{"properties":{"entity_type":{"type":"string","const":"asset","title":"Entity Type","default":"asset"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["entity_type","id","name","asset_type","thumbnail_url"],"title":"AssetPillDTO"},"CustomObjectPillDTO":{"properties":{"entity_type":{"type":"string","const":"custom_object","title":"Entity Type","default":"custom_object"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["entity_type","id","name","icon","color"],"title":"CustomObjectPillDTO"},"IndividualPillDTO":{"properties":{"entity_type":{"type":"string","const":"individual","title":"Entity Type","default":"individual"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["entity_type","id","name","avatar_url"],"title":"IndividualPillDTO"},"UserPillDTO":{"properties":{"entity_type":{"type":"string","const":"user","title":"Entity Type","default":"user"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"type":"string","title":"Email"}},"type":"object","required":["entity_type","id","name","avatar_url","email"],"title":"UserPillDTO"},"LookupMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"lookup","title":"Kind","default":"lookup"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"LookupMetadataValueDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}/records/{record_id}":{"get":{"tags":["custom-objects"],"summary":"Get a single custom object record","operationId":"getCustomObjectRecord","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The record id"},"description":"ID of the custom object record."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomObjectRecordDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}/records/{record\_id}

> Delete a custom object record

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}/records/{record_id}":{"delete":{"tags":["custom-objects"],"summary":"Delete a custom object record","operationId":"deleteCustomObjectRecord","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The record id"},"description":"ID of the custom object record."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PATCH /workspaces/drives/{drive\_id}/custom-object-types/{database\_id}/records/{record\_id}

> Update a custom object record

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"UpdateCustomObjectRecordBody":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"metadata":{"anyOf":[{"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/RelationCellValue"},{"$ref":"#/components/schemas/ScalarCellValue"}],"discriminator":{"propertyName":"kind","mapping":{"relation":"#/components/schemas/RelationCellValue","scalar":"#/components/schemas/ScalarCellValue"}}},"propertyNames":{"format":"uuid"},"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"UpdateCustomObjectRecordBody"},"RelationCellValue":{"properties":{"kind":{"type":"string","const":"relation","title":"Kind"},"values":{"items":{"$ref":"#/components/schemas/RelationValueWriteDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","values"],"title":"RelationCellValue"},"RelationValueWriteDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"$ref":"#/components/schemas/RelatedObjectType"}},"type":"object","required":["id","type"],"title":"RelationValueWriteDTO","description":"A relation target reference in a write body.\n\nAccepts `entity_type` as an alias for `type` so clients can write back the\npill objects the read DTOs return (round-trip symmetry); extra pill fields\n(name, thumbnail_url, ...) are ignored."},"RelatedObjectType":{"type":"string","enum":["asset","custom_object","user","individual"],"title":"RelatedObjectType"},"ScalarCellValue":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind"},"value":{"$ref":"#/components/schemas/JsonValue-Input"}},"type":"object","required":["kind","value"],"title":"ScalarCellValue"},"JsonValue-Input":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Input"},"type":"object"},{"type":"null"}]},"CustomObjectRecordDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created":{"type":"string","format":"date-time","title":"Created"},"updated":{"type":"string","format":"date-time","title":"Updated"},"metadata_values":{"items":{"$ref":"#/components/schemas/MetadataValueDTO"},"type":"array","title":"Metadata Values","default":[]}},"type":"object","required":["id","database_id","drive_id","name","created_by","created","updated"],"title":"CustomObjectRecordDTO"},"MetadataValueDTO":{"oneOf":[{"$ref":"#/components/schemas/ScalarMetadataValueDTO"},{"$ref":"#/components/schemas/RelationMetadataValueDTO"},{"$ref":"#/components/schemas/LookupMetadataValueDTO"}],"discriminator":{"propertyName":"kind","mapping":{"lookup":"#/components/schemas/LookupMetadataValueDTO","reference":"#/components/schemas/RelationMetadataValueDTO","scalar":"#/components/schemas/ScalarMetadataValueDTO"}}},"ScalarMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind","default":"scalar"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"ScalarMetadataValueDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"RelationMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"reference","title":"Kind","default":"reference"},"id":{"type":"string","format":"uuid","title":"Id"},"values":{"items":{"$ref":"#/components/schemas/RelationPillDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","id","values"],"title":"RelationMetadataValueDTO"},"RelationPillDTO":{"oneOf":[{"$ref":"#/components/schemas/AssetPillDTO"},{"$ref":"#/components/schemas/CustomObjectPillDTO"},{"$ref":"#/components/schemas/IndividualPillDTO"},{"$ref":"#/components/schemas/UserPillDTO"}],"discriminator":{"propertyName":"entity_type","mapping":{"asset":"#/components/schemas/AssetPillDTO","custom_object":"#/components/schemas/CustomObjectPillDTO","individual":"#/components/schemas/IndividualPillDTO","user":"#/components/schemas/UserPillDTO"}}},"AssetPillDTO":{"properties":{"entity_type":{"type":"string","const":"asset","title":"Entity Type","default":"asset"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["entity_type","id","name","asset_type","thumbnail_url"],"title":"AssetPillDTO"},"CustomObjectPillDTO":{"properties":{"entity_type":{"type":"string","const":"custom_object","title":"Entity Type","default":"custom_object"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["entity_type","id","name","icon","color"],"title":"CustomObjectPillDTO"},"IndividualPillDTO":{"properties":{"entity_type":{"type":"string","const":"individual","title":"Entity Type","default":"individual"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["entity_type","id","name","avatar_url"],"title":"IndividualPillDTO"},"UserPillDTO":{"properties":{"entity_type":{"type":"string","const":"user","title":"Entity Type","default":"user"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"type":"string","title":"Email"}},"type":"object","required":["entity_type","id","name","avatar_url","email"],"title":"UserPillDTO"},"LookupMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"lookup","title":"Kind","default":"lookup"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"LookupMetadataValueDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/{database_id}/records/{record_id}":{"patch":{"tags":["custom-objects"],"summary":"Update a custom object record","operationId":"updateCustomObjectRecord","parameters":[{"name":"database_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The custom object type id"},"description":"ID of the custom object type. List them with `GET /workspaces/drives/{drive_id}/custom-object-types`."},{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The record id"},"description":"ID of the custom object record."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomObjectRecordBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomObjectRecordDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /workspaces/drives/{drive\_id}/custom-object-types/records/{record\_id}

> Get a custom object record by id, resolving its database automatically

```json
{"openapi":"3.1.0","info":{"title":"Shade API","version":"dev"},"tags":[{"name":"custom-objects","description":"Custom objects are your own record types, like Projects, Clients, or Shoots,\nstored as tables in a drive. Link them to assets with relation fields.\n\n1. Create a type with `POST /workspaces/drives/{drive_id}/custom-object-types`.\n2. Add fields with `POST /workspaces/drives/{drive_id}/metadata/custom-objects/{database_id}/columns`.\n3. Create records with `POST .../custom-object-types/{database_id}/records`, and\n   update many at once with `PUT .../records/values`."}],"servers":[{"url":"https://api.shade.inc","description":"Production"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Shade API key, sent as-is with no `Bearer` prefix. Create one under\n**Settings → Integrate → API keys**.\n"}},"schemas":{"CustomObjectRecordDTO":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"database_id":{"type":"string","format":"uuid","title":"Database Id"},"drive_id":{"type":"string","format":"uuid","title":"Drive Id"},"name":{"type":"string","title":"Name"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"updated_by":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Updated By"},"created":{"type":"string","format":"date-time","title":"Created"},"updated":{"type":"string","format":"date-time","title":"Updated"},"metadata_values":{"items":{"$ref":"#/components/schemas/MetadataValueDTO"},"type":"array","title":"Metadata Values","default":[]}},"type":"object","required":["id","database_id","drive_id","name","created_by","created","updated"],"title":"CustomObjectRecordDTO"},"MetadataValueDTO":{"oneOf":[{"$ref":"#/components/schemas/ScalarMetadataValueDTO"},{"$ref":"#/components/schemas/RelationMetadataValueDTO"},{"$ref":"#/components/schemas/LookupMetadataValueDTO"}],"discriminator":{"propertyName":"kind","mapping":{"lookup":"#/components/schemas/LookupMetadataValueDTO","reference":"#/components/schemas/RelationMetadataValueDTO","scalar":"#/components/schemas/ScalarMetadataValueDTO"}}},"ScalarMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"scalar","title":"Kind","default":"scalar"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"ScalarMetadataValueDTO"},"JsonValue-Output":{"anyOf":[{"type":"boolean"},{"type":"integer"},{"type":"number"},{"type":"string"},{"items":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue-Output"},"type":"object"},{"type":"null"}]},"RelationMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"reference","title":"Kind","default":"reference"},"id":{"type":"string","format":"uuid","title":"Id"},"values":{"items":{"$ref":"#/components/schemas/RelationPillDTO"},"type":"array","title":"Values"}},"type":"object","required":["kind","id","values"],"title":"RelationMetadataValueDTO"},"RelationPillDTO":{"oneOf":[{"$ref":"#/components/schemas/AssetPillDTO"},{"$ref":"#/components/schemas/CustomObjectPillDTO"},{"$ref":"#/components/schemas/IndividualPillDTO"},{"$ref":"#/components/schemas/UserPillDTO"}],"discriminator":{"propertyName":"entity_type","mapping":{"asset":"#/components/schemas/AssetPillDTO","custom_object":"#/components/schemas/CustomObjectPillDTO","individual":"#/components/schemas/IndividualPillDTO","user":"#/components/schemas/UserPillDTO"}}},"AssetPillDTO":{"properties":{"entity_type":{"type":"string","const":"asset","title":"Entity Type","default":"asset"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"asset_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Asset Type"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url"}},"type":"object","required":["entity_type","id","name","asset_type","thumbnail_url"],"title":"AssetPillDTO"},"CustomObjectPillDTO":{"properties":{"entity_type":{"type":"string","const":"custom_object","title":"Entity Type","default":"custom_object"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color"}},"type":"object","required":["entity_type","id","name","icon","color"],"title":"CustomObjectPillDTO"},"IndividualPillDTO":{"properties":{"entity_type":{"type":"string","const":"individual","title":"Entity Type","default":"individual"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","required":["entity_type","id","name","avatar_url"],"title":"IndividualPillDTO"},"UserPillDTO":{"properties":{"entity_type":{"type":"string","const":"user","title":"Entity Type","default":"user"},"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"type":"string","title":"Email"}},"type":"object","required":["entity_type","id","name","avatar_url","email"],"title":"UserPillDTO"},"LookupMetadataValueDTO":{"properties":{"kind":{"type":"string","const":"lookup","title":"Kind","default":"lookup"},"id":{"type":"string","format":"uuid","title":"Id"},"value":{"$ref":"#/components/schemas/JsonValue-Output"}},"type":"object","required":["kind","id","value"],"title":"LookupMetadataValueDTO"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/workspaces/drives/{drive_id}/custom-object-types/records/{record_id}":{"get":{"tags":["custom-objects"],"summary":"Get a custom object record by id, resolving its database automatically","operationId":"getCustomObjectRecordById","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The record id"},"description":"ID of the custom object record."},{"name":"drive_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The drive id"},"description":"ID of the drive. List a workspace's drives with `GET /workspaces/{workspace_id}/drives`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomObjectRecordDTO"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://academy.shade.inc/developers/organize/custom-objects.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
