Field types and validations

date

String in format YYYY-MM-DD. Eg. 2020-01-30

textbox

String

textarea

String

rich_text

Simple HTML formatting. Allowed tags: p strong em ins ul ol li h1 h2 h3 h4 h5 h6. Everything else is parsed out.

dropdown

String

boolean

Boolean, true/false

datetime

String in format yyyy-mm-ddThh:mm:ss.mmm. Eg. 2021-08-01T00:00:00.000Z

Errors

Code Description
401 Unauthorized
500 Internal Server Error
422 Missing parameters

Examples

POST /api/v2/assets/_o2vT3wBW4fR4Me2gHy4/custom_fields/19
{
  "custom_fields": {
    "8": "test"
  }
}
200
{
  "custom_fields": {
    "19": {
      "8": "test"
    }
  },
  "errors": []
}
POST /api/v2/assets/_42vT3wBW4fR4Me2iXwa/custom_fields/20
{
  "custom_fields": [
    {
      "9": "test"
    },
    {
      "10": "test2"
    }
  ]
}
200
{
  "custom_fields": {
    "20": [
      {
        "9": "test",
        "cfg_id": 2
      },
      {
        "cfg_id": 3,
        "10": "test2"
      }
    ]
  },
  "errors": []
}
POST /api/v2/assets/AI2vT3wBW4fR4Me2lX1n/custom_fields/21
{
  "custom_fields": [
    {
      "cfg_id": 5,
      "11": "test_value5",
      "12": "test_value6"
    }
  ]
}
200
{
  "custom_fields": {
    "21": [
      {
        "11": "test_value1",
        "12": "test_value2",
        "cfg_id": 4
      },
      {
        "11": "test_value5",
        "12": "test_value6",
        "cfg_id": 5
      }
    ]
  },
  "errors": []
}
POST /api/v2/assets/AY2vT3wBW4fR4Me2sn0z/custom_fields/22
{
  "custom_fields": {
    "not-found": "test"
  }
}
200
{
  "custom_fields": null,
  "errors": [
    {
      "not-found": "Field not found"
    }
  ]
}
POST /api/v2/assets/not-found-id/custom_fields/23
{
  "custom_fields": {
    "14": "test"
  }
}
404
{
  "error": "asset not found"
}
POST /api/v2/assets/A42vT3wBW4fR4Me2un33/custom_fields/not-found
{
  "custom_fields": {
    "15": "test"
  }
}
404
{
  "error": "Field group not found"
}

Params

Param name Description
field_group_id
required

Field group ID

Validations:

  • Must be a String

custom_fields
optional

Custom fields

Validations:

  • Must be an array of any type

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY