Menu
GETPOST custom-fields/ User APIService tier

GET: the fields assigned to a record type. POST: create a field, or attach one from the org library with ``library_id``.

URL

  • User APIhttps://sales.mattering.io/api/user/v1/custom-fields/
  • Service tierhttps://sales.mattering.io/api/internal/custom-fields/

Query parameters

NameDefault
pipe_idnone
record_typenone

Body keys (JSON)

KeyRequiredDefault
field_typeoptional or conditionalnone
library_idoptional or conditionalnone
nameoptional or conditionalnone
pipe_idoptional or conditionalnone
record_typeoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view, silently. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 data and meta envelope, legacy keys repeated beside data

{
  "data": {
    "custom_fields": [
      {
        "library_id": "...",
        "pipe_id": "..."
      }
    ]
  }
}

201 data and meta envelope, legacy keys repeated beside data

{
  "data": {
    "custom_field": {
      "library_id": "...",
      "pipe_id": "..."
    }
  }
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400invalid_field
400invalid_json
400name_required
401unauthorized
403org_unresolved
404library_field_not_found
409field_exists
503library_unavailable

Example

curl -X POST "https://sales.mattering.io/api/user/v1/custom-fields/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "field_type": "...",
  "library_id": "...",
  "name": "...",
  "pipe_id": "...",
  "record_type": "..."
}'

Source: CRMCore/field_api.py (field_api.custom_fields)

GET custom-fields/library/ User APIService tier

The org's shared field library, each flagged with whether it is already assigned to ``record_type`` (and ``pipe_id`` for deals).

Each row's field_type is the Sales type: the one attaching the row by library_id produces, and one a create accepts, so what is read can be sent. library_type is the platform's canonical name for the same definition (TEXT_SMALL, DROPDOWN ...). Where the platform type has no Sales equivalent (TAGS, RATING, LOCATION) attach stores it as field_type and type_note says so. To add a row that already exists, attach it with library_id alone; no type is needed.

URL

  • User APIhttps://sales.mattering.io/api/user/v1/custom-fields/library/
  • Service tierhttps://sales.mattering.io/api/internal/custom-fields/library/

Query parameters

NameDefault
pipe_idnone
record_typenone

Responses

200 data and meta envelope, legacy keys repeated beside data

{
  "data": {
    "library": [
      {
        "library_id": "...",
        "name": "...",
        "field_type": "...",
        "library_type": "...",
        "description": "...",
        "assigned": true
      }
    ]
  },
  "meta": {
    "how_to_add": "Attach a row that is not assigned yet with POST custom-fields/ and its library_id; no name or type is needed. Create a new field only when no row here matches."
  }
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
401unauthorized
403org_unresolved
503library_unavailable

Example

curl -X GET "https://sales.mattering.io/api/user/v1/custom-fields/library/?pipe_id=...&record_type=..." \
  -H "Authorization: Bearer $MATTERING_API_KEY"

Source: CRMCore/field_api.py (field_api.custom_field_library)

GETPATCHDELETE custom-fields/{record_type}/{field_id}/ User APIService tier

GET one field, PATCH its definition (type is locked), DELETE to remove it from the record type (library definition and stored values are kept).

URL

  • User APIhttps://sales.mattering.io/api/user/v1/custom-fields/{record_type}/{field_id}/
  • Service tierhttps://sales.mattering.io/api/internal/custom-fields/{record_type}/{field_id}/

Path parameters

NameType
record_typestr
field_iduuid

Body keys (JSON)

KeyRequiredDefault
field_typeoptional or conditionalnone

Keys the view reads. A key not in this list is ignored by the view, silently. Where a key is required only for some actions (for example the action dispatch), the description above says which.

Responses

200 data and meta envelope, legacy keys repeated beside data

{
  "data": {
    "custom_field": {
      "library_id": "...",
      "pipe_id": "..."
    }
  }
}

200 data and meta envelope, legacy keys repeated beside data

{
  "data": {
    "removed": true,
    "id": "..."
  }
}

Field names come from the code; values are placeholders (... is a string, 0 a number, dates are ISO 8601).

Errors

StatusCode
400invalid_field
400invalid_json
400type_locked
401unauthorized
403org_unresolved
404field_not_found

Example

curl -X PATCH "https://sales.mattering.io/api/user/v1/custom-fields/RECORD_TYPE/FIELD_ID/" \
  -H "Authorization: Bearer $MATTERING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "field_type": "..."
}'

Source: CRMCore/field_api.py (field_api.custom_field_detail)

All Sales resources
Start Free Explore our Products