Skip to main content
PUT
/
api
/
v1
/
collections
/
{collection_id}
Update Collection
curl --request PUT \
  --url https://api.example.com/api/v1/collections/{collection_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "schema": [
    {
      "name": "<string>",
      "type": "<string>",
      "required": false,
      "default": "<unknown>",
      "unique": false,
      "options": {},
      "collection": "<string>",
      "on_delete": "<string>",
      "pii": false,
      "mask_type": "<string>"
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "table_name": "<string>",
  "schema": [
    {
      "name": "<string>",
      "type": "<string>",
      "required": false,
      "default": "<unknown>",
      "unique": false,
      "options": {},
      "collection": "<string>",
      "on_delete": "<string>",
      "pii": false,
      "mask_type": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Headers

authorization
string | null

Path Parameters

collection_id
string
required

Body

application/json

Request body for updating a collection schema.

schema
FieldDefinition · object[]
required

Updated list of field definitions (at least one required)

Minimum array length: 1

Response

Successful Response

Response for a created collection.

id
string
required

Collection ID (UUID)

name
string
required

Collection name

table_name
string
required

Physical table name in database

schema
SchemaFieldResponse · object[]
required

Collection schema

created_at
string<date-time>
required

When the collection was created

updated_at
string<date-time>
required

When the collection was last updated