Create a custom column

post/v1/custom-columns

Creates a custom column on a view root. Name unique within the same root. rules_config for type=ai; formula_config for computed columns.

Requires a bearer token: Authorization: Bearer <token>.

Request

cURL
curl -X POST https://api.wellapp.ai/v1/custom-columns \
  -H "Authorization: Bearer $WELL_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "type": "custom_column",
    "attributes": {
      "name": "Burn risk",
      "type": "ai",
      "root": "companies",
      "rules_config": "{\"prompt\":\"Flag vendors whose monthly spend jumped over 40%\"}"
    }
  }
}'
Request body
{
  "data": {
    "type": "custom_column",
    "attributes": {
      "name": "Burn risk",
      "type": "ai",
      "root": "companies",
      "rules_config": "{\"prompt\":\"Flag vendors whose monthly spend jumped over 40%\"}"
    }
  }
}

Responses

201Custom column created.

{
  "data": {
    "type": "custom_column",
    "id": "cc_1",
    "attributes": {
      "name": "Burn risk",
      "field_key": "burn_risk",
      "type": "ai",
      "root": "companies",
      "position": 7
    },
    "relationships": {
      "values": {
        "data": [
          {
            "type": "custom_column_value",
            "id": "00000000-0000-4000-8000-000000000001"
          }
        ]
      }
    }
  }
}

400Validation error.

{
  "code": "BAD_REQUEST",
  "status": 400,
  "title": "Bad Request",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

401Unauthorized.

{
  "code": "UNAUTHORIZED",
  "status": 401,
  "title": "Unauthorized",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}