Documentation Index

Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt

Use this file to discover all available pages before exploring further.

Fetch custom fields list

Prev Next
Get
/v1/teams/{team_id}/custom-fields

Fetch custom fields list

Security
HTTP
Type bearer

Bearer token authentication. Include the token in the Authorization header: Authorization: Bearer <your-token>

Path parameters
team_id
integer (int64) Required

ID of the team

Minimum1
Maximum9223372036854776000
Example936506
Query parameters
data_source_id
string

Id of the data source

Max length100
Pattern^[a-zA-Z0-9_]{2,5}$
ExampleGAWA
display_name
string

Name of custom fields which are displayed on UI

Max length255
Pattern^.+$
ExampleSpec Example Field
page
integer (int32)

Page number that the custom fields are displayed on

Minimum1
Maximum10000
Example1
limit
integer (int32)

Maximum number of custom fields that the user wants to fetch

Minimum1
Maximum100
Default25
Example25
include_total_count
boolean

Include total count of transformations in the response (defaults to false for performance)

Exampletrue
Responses
200

Collection of field transformations

Expand All
object

Paginated collection of custom field transformations. The meta envelope carries pagination details and data.items holds the page of transformations.

Example{ "data": { "items": [ { "id": 42, "name": "spec_example_field", "data_source_id": "GAWA", "display_name": "Spec Example Field", "description": "Temporary transformation for spec examples", "field_type": "dim", "data_type": "string.text.value", "modified_time_utc": "2026-04-06T10:59:04Z", "modified_user": { "email": "user@supermetrics.com", "first_name": "John", "last_name": "Doe" }, "definition": { "items": [ { "type": "function", "name": "upper_case", "arguments": [ { "name": "value", "value": { "type": "data_source_field", "value": "platform" } } ], "description": null } ] }, "report_types": [ "Default" ] } ] } }
meta
object

Response metadata including pagination details.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
pagination
object (Pagination)

Offset-based pagination metadata for list responses.

total_count
integer (int64)

Total number of items available across all pages.

Minimum0
Maximum1000000000
Example137
limit
integer (int32)

Maximum number of items returned in this page.

Minimum1
Maximum1000
Example20
offset
integer (int64)

Number of items skipped before this page.

Minimum0
Maximum1000000000
Example0
links
object (PaginationLinks)

Navigation links for paginated collections.

next
object (ResourceUrl)

A hyperlink to a related resource.

href
string (uri)

Absolute URL of the resource.

Max length2048
Examplehttps://api.supermetrics.com/v1/teams/team_abc/custom-fields?offset=20&limit=20
previous
object (ResourceUrl)

A hyperlink to a related resource.

href
string (uri)

Absolute URL of the resource.

Max length2048
Examplehttps://api.supermetrics.com/v1/teams/team_abc/custom-fields?offset=20&limit=20
data
object

Wrapper holding the page of transformation objects.

items
Array of object (TeamTransformationOutput)

The page of transformation objects.

Max items1000
Example[ { "name": "spec_example_field", "data_source_id": "GAWA", "display_name": "Spec Example Field" } ]
object

A persisted custom field (field transformation) as returned by read operations.

Example{ "id": 42, "name": "spec_example_field", "data_source_id": "GAWA", "display_name": "Spec Example Field Updated", "description": "Updated temporary transformation for spec examples", "field_type": "dim", "data_type": "string.text.value", "modified_time_utc": "2026-04-06T10:59:04Z", "modified_user": { "email": "user@supermetrics.com", "first_name": "John", "last_name": "Doe" }, "definition": { "items": [ { "type": "function", "name": "upper_case", "arguments": [ { "name": "value", "value": { "type": "data_source_field", "value": "platform" } } ], "description": null } ] }, "report_types": [ "Default" ] }
id
integer (int64)

Unique identifier of the custom field.

Minimum1
Maximum9223372036854776000
Example42
name
string

Unique machine name of the field transformation.

Max length255
Pattern^[A-Za-z0-9_-]+$
Examplespec_example_field
data_source_id
string

ID of the data source the transformation belongs to.

Max length100
Pattern^[a-zA-Z0-9_]{2,5}$
ExampleGAWA
display_name
string

User-facing name of the transformation shown in the UI.

Max length255
Pattern^.+$
ExampleSpec Example Field Updated
description
string

Free-text description of the transformation.

Max length2048
Pattern^.*$
ExampleUpdated temporary transformation for spec examples
field_type
string

Field kind: dim (dimension) or met (metric).

Valid values[ "dim", "met" ]
Exampledim
data_type
string

Data type of the transformed field.

Max length100
Pattern^(bool|(float|int|string)(\.[a-z]+)+)$
Examplestring.text.value
modified_time_utc
string (date-time)

Timestamp of the last modification, in UTC. Serialized with a numeric offset (e.g. "+0000") rather than a trailing "Z".

Max length32
Example2026-04-06T10:59:04Z
modified_user
object (TransformationUserOutput)

The user who last modified a custom field transformation.

Example{ "email": "user@supermetrics.com", "first_name": "John", "last_name": "Doe" }
email
string (email)

Email address of the user.

Max length254
Exampleuser@supermetrics.com
first_name
string

First name of the user.

Max length100
Pattern^.+$
ExampleJohn
last_name
string

Last name of the user.

Max length100
Pattern^.+$
ExampleDoe
definition
object

Wrapper holding the ordered transformation steps.

items
Array of object (TransformationStep)

The ordered pipeline of transformation steps.

Max items100
Example[ { "type": "function", "name": "upper_case", "arguments": [ { "name": "value", "value": { "type": "data_source_field", "value": "platform" } } ] } ]

A single step in a custom field's transformation pipeline. The concrete shape is selected by the type discriminator: function, lookup, or condition.

OneOf
FunctionStep
object (FunctionStep)
type
string

Discriminator value identifying this step as a function step.

Valid values[ "function" ]
Examplefunction
name
string

Name of the function to apply.

Max length255
Pattern^[A-Za-z0-9_-]+$
Exampleupper_case
arguments
Array of object (FunctionArgument)

Arguments passed to this function.

Max items100
object

A named argument supplied to a function step.

Example{ "name": "value", "value": { "type": "data_source_field", "value": "platform" } }
name
string

Argument name as expected by the function.

Max length255
Pattern^[A-Za-z0-9_-]+$
Examplevalue
value
object (DefinitionValue)

A value reference used in transformation steps. Depending on type the value is read from a data-source field, taken from the previous step's output, or supplied as a static literal.

Example{ "type": "data_source_field", "value": "platform" }
type
string

Where the value comes from: data_source_field (a named field on the data source), output_from_previous (the result of the preceding step), or static (a literal value).

Valid values[ "data_source_field", "output_from_previous", "static" ]
Exampledata_source_field
value
string

The value itself: the field name when type is data_source_field, a literal when type is static, and omitted when type is output_from_previous.

Max length255
Exampleplatform
description
string | null

Optional free-text description of the transformation step.

Max length2048
Pattern^[\s\S]+$
Example
LookupStep
object (LookupStep)
type
string

Discriminator value identifying this step as a lookup step.

Valid values[ "lookup" ]
Examplelookup
source
object (DefinitionValue)

A value reference used in transformation steps. Depending on type the value is read from a data-source field, taken from the previous step's output, or supplied as a static literal.

Example{ "type": "data_source_field", "value": "platform" }
type
string

Where the value comes from: data_source_field (a named field on the data source), output_from_previous (the result of the preceding step), or static (a literal value).

Valid values[ "data_source_field", "output_from_previous", "static" ]
Exampledata_source_field
value
string

The value itself: the field name when type is data_source_field, a literal when type is static, and omitted when type is output_from_previous.

Max length255
Exampleplatform
rule
string

The matching rule applied when looking up a value (e.g. equals).

Max length100
Pattern^[A-Za-z0-9_-]+$
Exampleequals
map
object

Key/value mapping table used by the lookup.

Example{ "1": "2", "a": "b" }
property*
string additionalProperties

Output value produced for the matching key.

Max length2048
default
object (DefinitionValue)

A value reference used in transformation steps. Depending on type the value is read from a data-source field, taken from the previous step's output, or supplied as a static literal.

Example{ "type": "data_source_field", "value": "platform" }
type
string

Where the value comes from: data_source_field (a named field on the data source), output_from_previous (the result of the preceding step), or static (a literal value).

Valid values[ "data_source_field", "output_from_previous", "static" ]
Exampledata_source_field
value
string

The value itself: the field name when type is data_source_field, a literal when type is static, and omitted when type is output_from_previous.

Max length255
Exampleplatform
description
string | null

Optional free-text description of the transformation step.

Max length2048
Pattern^[\s\S]+$
Example
ConditionStep
object (ConditionStep)
type
string

Discriminator value identifying this step as a condition step.

Valid values[ "condition" ]
Examplecondition
default

Value returned when no case matches. May be a plain DefinitionValue or a nested FunctionStep.

OneOf
DefinitionValue
object (DefinitionValue)
type
string

Where the value comes from: data_source_field (a named field on the data source), output_from_previous (the result of the preceding step), or static (a literal value).

Valid values[ "data_source_field", "output_from_previous", "static" ]
Exampledata_source_field
value
string

The value itself: the field name when type is data_source_field, a literal when type is static, and omitted when type is output_from_previous.

Max length255
Exampleplatform
FunctionStep
object (FunctionStep)
type
string

Discriminator value identifying this step as a function step.

Valid values[ "function" ]
Examplefunction
name
string

Name of the function to apply.

Max length255
Pattern^[A-Za-z0-9_-]+$
Exampleupper_case
arguments
Array of object (FunctionArgument)

Arguments passed to this function.

Max items100
object

A named argument supplied to a function step.

Example{ "name": "value", "value": { "type": "data_source_field", "value": "platform" } }
name
string

Argument name as expected by the function.

Max length255
Pattern^[A-Za-z0-9_-]+$
Examplevalue
value
object (DefinitionValue)

A value reference used in transformation steps. Depending on type the value is read from a data-source field, taken from the previous step's output, or supplied as a static literal.

Example{ "type": "data_source_field", "value": "platform" }
type
string

Where the value comes from: data_source_field (a named field on the data source), output_from_previous (the result of the preceding step), or static (a literal value).

Valid values[ "data_source_field", "output_from_previous", "static" ]
Exampledata_source_field
value
string

The value itself: the field name when type is data_source_field, a literal when type is static, and omitted when type is output_from_previous.

Max length255
Exampleplatform
description
string | null

Optional free-text description of the transformation step.

Max length2048
Pattern^[\s\S]+$
Example
cases
Array of object (ConditionCase)

Condition cases evaluated in order; the first match wins.

Max items100
object

A single case within a condition step: when condition evaluates true, the return value is produced.

Example{ "return": { "type": "output_from_previous" }, "condition": { "type": "rule", "rule": "equals", "source": { "type": "output_from_previous" }, "target": { "type": "static", "value": "1" } } }
return
object (DefinitionValue)

A value reference used in transformation steps. Depending on type the value is read from a data-source field, taken from the previous step's output, or supplied as a static literal.

Example{ "type": "data_source_field", "value": "platform" }
type
string

Where the value comes from: data_source_field (a named field on the data source), output_from_previous (the result of the preceding step), or static (a literal value).

Valid values[ "data_source_field", "output_from_previous", "static" ]
Exampledata_source_field
value
string

The value itself: the field name when type is data_source_field, a literal when type is static, and omitted when type is output_from_previous.

Max length255
Exampleplatform
condition
object

The rule-based condition evaluated for this case.

type
string

Discriminator value identifying the condition kind (always rule).

Valid values[ "rule" ]
Examplerule
rule
string

The comparison operator applied between source and target.

Max length100
Pattern^[A-Za-z0-9_-]+$
Exampleequals
source
object (DefinitionValue)

A value reference used in transformation steps. Depending on type the value is read from a data-source field, taken from the previous step's output, or supplied as a static literal.

Example{ "type": "data_source_field", "value": "platform" }
type
string

Where the value comes from: data_source_field (a named field on the data source), output_from_previous (the result of the preceding step), or static (a literal value).

Valid values[ "data_source_field", "output_from_previous", "static" ]
Exampledata_source_field
value
string

The value itself: the field name when type is data_source_field, a literal when type is static, and omitted when type is output_from_previous.

Max length255
Exampleplatform
target
object (DefinitionValue)

A value reference used in transformation steps. Depending on type the value is read from a data-source field, taken from the previous step's output, or supplied as a static literal.

Example{ "type": "data_source_field", "value": "platform" }
type
string

Where the value comes from: data_source_field (a named field on the data source), output_from_previous (the result of the preceding step), or static (a literal value).

Valid values[ "data_source_field", "output_from_previous", "static" ]
Exampledata_source_field
value
string

The value itself: the field name when type is data_source_field, a literal when type is static, and omitted when type is output_from_previous.

Max length255
Exampleplatform
description
string | null

Optional free-text description of the transformation step.

Max length2048
Pattern^[\s\S]+$
Example
report_types
Array of string

Report types associated with the transformation.

Max items100
Example[ "Default" ]
string

A single report type name.

Max length100
Pattern^.+$
400

Bad request - invalid parameters

Headers
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example5000
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example4999
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN"
  },
  "error": {
    "code": "BAD_REQUEST",
    "message": "The request was invalid."
  }
}
Expand All
object

Standard envelope returned by all error (4xx/5xx) responses.

meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
error
object (Error)

Machine- and human-readable detail for a failed request.

code
string

Stable, screaming-snake-case identifier for the error condition. Clients should branch on this, not on message. Common values include BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT_ERROR, PERMISSION_ERROR, UNPROCESSABLE_ENTITY, UNPROCESSABLE_CONTENT, TOO_MANY_REQUESTS, INTERNAL_SERVER_ERROR, DUPLICATION_FAILED, SERVICE_UNAVAILABLE; domains may define additional codes.

Max length100
Pattern^[A-Z][A-Z0-9_]*$
ExampleBAD_REQUEST
message
string

Short, human-readable summary of the error.

Max length255
Pattern^.+$
ExampleThe request was invalid.
description
string

Optional longer explanation specific to this occurrence.

Max length2048
ExampleThe field 'display_name' must not be empty.
401

Unauthorized

Headers
WWW-Authenticate
string
Bearer token required
Max length255
Pattern^Bearer.*
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example5000
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example4999
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN"
  },
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication is required."
  }
}
Expand All
object

Standard envelope returned by all error (4xx/5xx) responses.

meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
error
object (Error)

Machine- and human-readable detail for a failed request.

code
string

Stable, screaming-snake-case identifier for the error condition. Clients should branch on this, not on message. Common values include BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT_ERROR, PERMISSION_ERROR, UNPROCESSABLE_ENTITY, UNPROCESSABLE_CONTENT, TOO_MANY_REQUESTS, INTERNAL_SERVER_ERROR, DUPLICATION_FAILED, SERVICE_UNAVAILABLE; domains may define additional codes.

Max length100
Pattern^[A-Z][A-Z0-9_]*$
ExampleBAD_REQUEST
message
string

Short, human-readable summary of the error.

Max length255
Pattern^.+$
ExampleThe request was invalid.
description
string

Optional longer explanation specific to this occurrence.

Max length2048
ExampleThe field 'display_name' must not be empty.
403

Access forbidden

Headers
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example5000
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example4999
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN"
  },
  "error": {
    "code": "FORBIDDEN",
    "message": "You do not have access to this resource."
  }
}
Expand All
object

Standard envelope returned by all error (4xx/5xx) responses.

meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
error
object (Error)

Machine- and human-readable detail for a failed request.

code
string

Stable, screaming-snake-case identifier for the error condition. Clients should branch on this, not on message. Common values include BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT_ERROR, PERMISSION_ERROR, UNPROCESSABLE_ENTITY, UNPROCESSABLE_CONTENT, TOO_MANY_REQUESTS, INTERNAL_SERVER_ERROR, DUPLICATION_FAILED, SERVICE_UNAVAILABLE; domains may define additional codes.

Max length100
Pattern^[A-Z][A-Z0-9_]*$
ExampleBAD_REQUEST
message
string

Short, human-readable summary of the error.

Max length255
Pattern^.+$
ExampleThe request was invalid.
description
string

Optional longer explanation specific to this occurrence.

Max length2048
ExampleThe field 'display_name' must not be empty.
429

Too Many Requests

Headers
X-RateLimit-Limit
integer
Request limit per hour
Minimum1
Maximum10000
Example5000
X-RateLimit-Remaining
integer
Remaining requests in current window
Minimum0
Maximum10000
Example4999
Retry-After
integer
Seconds until rate limit resets
Minimum1
Maximum86400
Example3600
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN"
  },
  "error": {
    "code": "TOO_MANY_REQUESTS",
    "message": "Rate limit exceeded. Retry later."
  }
}
Expand All
object

Standard envelope returned by all error (4xx/5xx) responses.

meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
error
object (Error)

Machine- and human-readable detail for a failed request.

code
string

Stable, screaming-snake-case identifier for the error condition. Clients should branch on this, not on message. Common values include BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT_ERROR, PERMISSION_ERROR, UNPROCESSABLE_ENTITY, UNPROCESSABLE_CONTENT, TOO_MANY_REQUESTS, INTERNAL_SERVER_ERROR, DUPLICATION_FAILED, SERVICE_UNAVAILABLE; domains may define additional codes.

Max length100
Pattern^[A-Z][A-Z0-9_]*$
ExampleBAD_REQUEST
message
string

Short, human-readable summary of the error.

Max length255
Pattern^.+$
ExampleThe request was invalid.
description
string

Optional longer explanation specific to this occurrence.

Max length2048
ExampleThe field 'display_name' must not be empty.
500

Internal server error

Headers
Access-Control-Allow-Origin
string
CORS header
Valid values[ "*" ]
Max length255
Example*
{
  "meta": {
    "request_id": "BXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN"
  },
  "error": {
    "code": "INTERNAL_SERVER_ERROR",
    "message": "An unexpected error occurred."
  }
}
Expand All
object

Standard envelope returned by all error (4xx/5xx) responses.

meta
object (Meta)

Metadata included in every API response.

request_id
string

Unique identifier for the request, for tracking and debugging.

Min length8
Max length64
Pattern^[A-Za-z0-9_-]+$
ExampleBXaEFVtjc7TXaJxgZhmFgSUD9edqq_CN
error
object (Error)

Machine- and human-readable detail for a failed request.

code
string

Stable, screaming-snake-case identifier for the error condition. Clients should branch on this, not on message. Common values include BAD_REQUEST, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, CONFLICT_ERROR, PERMISSION_ERROR, UNPROCESSABLE_ENTITY, UNPROCESSABLE_CONTENT, TOO_MANY_REQUESTS, INTERNAL_SERVER_ERROR, DUPLICATION_FAILED, SERVICE_UNAVAILABLE; domains may define additional codes.

Max length100
Pattern^[A-Z][A-Z0-9_]*$
ExampleBAD_REQUEST
message
string

Short, human-readable summary of the error.

Max length255
Pattern^.+$
ExampleThe request was invalid.
description
string

Optional longer explanation specific to this occurrence.

Max length2048
ExampleThe field 'display_name' must not be empty.