Conversion Fields API

The Fields API from Conversion — 2 operation(s) for fields.

Operations 3

GET /v2/fields List Fields #
POST /v2/fields Create Field #
POST /v2/fields/relationships Create Relationship Fields #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/conversion:conversion-fields-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

conversion-fields-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Conversion Fields API
  version: 2.0.0
  description: The Conversion API lets you programmatically manage contacts, track custom events, and manage their associated data.
servers:
- url: https://pub-api.conversion.ai/api
security:
- apiKey: []
- apiKeyQuery: []
tags:
- name: Fields
paths:
  /v2/fields:
    get:
      operationId: listFields
      summary: List Fields
      description: 'List field definitions, including IDs, keys, data types, and relationship metadata. With no filters, returns standard-object fields. Pass `customObjectId` to list fields for one custom object. Requires field view permission and view access to that custom object.


        Pass `pagination.nextCursor` as `cursor` for the next page. A null cursor means there are no more results.'
      parameters:
      - name: objectType
        in: query
        required: false
        schema:
          type: string
          enum:
          - CONTACT
          - COMPANY
          - OPPORTUNITY
          - CAMPAIGN
          - CAMPAIGN_MEMBER
          - CUSTOM_OBJECT
        description: Optional object type, case-insensitive. CUSTOM_OBJECT requires customObjectId.
        examples:
          contact:
            value: CONTACT
      - name: customObjectId
        in: query
        schema:
          type: string
          format: uuid
        description: List fields for this custom object. Omit objectType or use CUSTOM_OBJECT.
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
        description: The maximum number of fields to return per page. Defaults to 50. Values are clamped to the range [1, 100] rather than rejected; values above 100 return 100 results.
      - name: cursor
        in: query
        required: false
        schema:
          type: string
        description: The opaque pagination cursor returned as `pagination.nextCursor` by a previous call. Omit to fetch the first page. An invalid or malformed cursor returns an `invalid_cursor` error.
        examples:
          next-page:
            value: eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwWiJ9
      responses:
        '200':
          description: Field schemas retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                    - fields
                    properties:
                      fields:
                        type: array
                        description: The current page of field schemas.
                        items:
                          $ref: '#/components/schemas/FieldSchema'
                  pagination:
                    type: object
                    required:
                    - nextCursor
                    properties:
                      nextCursor:
                        type:
                        - string
                        - 'null'
                        description: Opaque cursor for the next page, or `null` when there are no more results. This is the single source of truth for whether more results exist.
              examples:
                with-more-pages:
                  summary: More pages available
                  value:
                    data:
                      fields:
                      - key: first_name
                        label: First Name
                        objectType: CONTACT
                        dataType: STRING
                        readOnly: false
                      - key: annual_revenue
                        label: Annual Revenue
                        objectType: COMPANY
                        dataType: NUMBER
                        readOnly: false
                    pagination:
                      nextCursor: eyJjcmVhdGVkQXQiOiIyMDI2LTAxLTE1VDEwOjMwOjAwWiJ9
                last-page:
                  summary: Last page
                  value:
                    data:
                      fields:
                      - key: signup_date
                        label: Signup Date
                        objectType: CONTACT
                        dataType: DATETIME
                        readOnly: false
                    pagination:
                      nextCursor: null
        '400':
          description: The request was malformed or contained invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid-object-type:
                  summary: Unsupported object type
                  value:
                    error:
                      code: invalid_object_type
                      message: 'unsupported object type ''DEAL''; supported values: [CONTACT COMPANY OPPORTUNITY CAMPAIGN_MEMBER]'
                invalid-cursor:
                  summary: Invalid cursor
                  value:
                    error:
                      code: invalid_cursor
                      message: invalid pagination cursor
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  summary: Missing or invalid API key
                  value:
                    error:
                      code: unauthorized
                      message: API key is required
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                internal:
                  summary: Internal error
                  value:
                    error:
                      code: internal_error
                      message: failed to load field schemas
        '403':
          description: The API key lacks permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Custom object not found in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Fields
    post:
      operationId: createField
      summary: Create Field
      description: Create a field on a standard or custom object. Use `POST /v2/fields/relationships` to link two objects.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - label
              - objectType
              - dataType
              properties:
                label:
                  type: string
                  description: The human-readable display name of the field.
                  examples:
                  - Lead Score
                key:
                  type: string
                  description: Key used in record field maps. Leading and trailing whitespace is trimmed. Use letters, numbers, or underscores, including Unicode letters. Optional; derived from the label when omitted, preserving Unicode letters. Must be unique within this object.
                  examples:
                  - lead_score
                objectType:
                  type: string
                  enum:
                  - CONTACT
                  - COMPANY
                  - OPPORTUNITY
                  - CAMPAIGN
                  - CAMPAIGN_MEMBER
                  - CUSTOM_OBJECT
                  description: The object the field belongs to (case-insensitive). An unsupported value returns an `invalid_object_type` error.
                dataType:
                  type: string
                  enum:
                  - STRING
                  - NUMBER
                  - BOOLEAN
                  - DATE
                  - DATETIME
                  - PICKLIST
                  description: The data type of the field's value (case-insensitive).
                customObjectId:
                  type: string
                  format: uuid
                  description: Required for CUSTOM_OBJECT; omit for standard objects.
            examples:
              create-contact-field:
                summary: Create a contact field
                value:
                  label: Lead Score
                  objectType: CONTACT
                  dataType: NUMBER
              create-with-explicit-key:
                summary: Create with an explicit key
                value:
                  key: renewal_date
                  label: Renewal Date
                  objectType: COMPANY
                  dataType: DATE
              custom-object:
                summary: Create a custom-object field
                value:
                  key: dashboard_region
                  label: Dashboard Region
                  objectType: CUSTOM_OBJECT
                  customObjectId: f4f9ae15-12e8-4b3f-9822-22166d455f40
                  dataType: STRING
      responses:
        '200':
          description: Field created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    required:
                    - field
                    properties:
                      field:
                        $ref: '#/components/schemas/FieldSchema'
              examples:
                created:
                  summary: Field created
                  value:
                    data:
                      field:
                        key: lead_score
                        label: Lead Score
                        objectType: CONTACT
                        dataType: NUMBER
                        readOnly: false
        '400':
          description: The request was malformed or contained invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                invalid-object-type:
                  summary: Unsupported object type
                  value:
                    error:
                      code: invalid_object_type
                      message: invalid objectType or customObjectId
                duplicate-key:
                  summary: Field key already exists
                  value:
                    error:
                      code: invalid_field
                      message: key already exists on this object
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  summary: Missing or invalid API key
                  value:
                    error:
                      code: unauthorized
                      message: API key is required
        '403':
          description: The API key lacks permission, or custom objects are not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                internal:
                  summary: Internal error
                  value:
                    error:
                      code: internal_error
                      message: failed to create field
        '404':
          description: Custom object not found in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Fields
  /v2/fields/relationships:
    post:
      operationId: createRelationshipField
      summary: Create Relationship Fields
      description: Create a field on `source` that links each record to one `target` record, plus a read-only reverse field on `target` that lists those records. This doesn't link any records.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source:
                  $ref: '#/components/schemas/RelationshipFieldSide'
                target:
                  $ref: '#/components/schemas/RelationshipFieldSide'
              required:
              - source
              - target
            example:
              source:
                objectType: CUSTOM_OBJECT
                customObjectId: 528f0cc5-431c-4f3b-9d3c-7204740a3f76
                key: organization
                label: Organization
              target:
                objectType: CUSTOM_OBJECT
                customObjectId: f4f9ae15-12e8-4b3f-9822-22166d455f40
                key: dashboard_users
                label: Dashboard Users
      responses:
        '200':
          description: Relationship fields created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      sourceField:
                        $ref: '#/components/schemas/RelationshipFieldReference'
                      relatedFields:
                        type: array
                        items:
                          $ref: '#/components/schemas/RelationshipFieldReference'
                    required:
                    - sourceField
                    - relatedFields
              example:
                data:
                  sourceField:
                    key: organization
                    objectType: CUSTOM_OBJECT
                    customObjectId: 528f0cc5-431c-4f3b-9d3c-7204740a3f76
                  relatedFields:
                  - key: dashboard_users
                    objectType: CUSTOM_OBJECT
                    customObjectId: f4f9ae15-12e8-4b3f-9822-22166d455f40
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The API key lacks permission, or custom objects are not enabled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found in this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected service failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      tags:
      - Fields
components:
  schemas:
    FieldSchema:
      type: object
      properties:
        key:
          type: string
          description: Key used in record field maps.
        label:
          type: string
        objectType:
          type: string
          enum:
          - CONTACT
          - COMPANY
          - OPPORTUNITY
          - CAMPAIGN
          - CAMPAIGN_MEMBER
          - CUSTOM_OBJECT
        customObjectId:
          type: string
          format: uuid
          description: Present for custom-object fields.
        dataType:
          type: string
          enum:
          - STRING
          - NUMBER
          - BOOLEAN
          - DATE
          - DATETIME
          - PICKLIST
          - RELATIONSHIP
        readOnly:
          type: boolean
          description: Whether this field is unavailable for writes through the custom-object batch endpoint.
        relationshipTargets:
          type: array
          items:
            $ref: '#/components/schemas/RelationshipFieldReference'
          description: Fields on the other side of this relationship, identified by key and object. For a reverse field, this points to its writable source field.
      required:
      - key
      - label
      - objectType
      - dataType
      - readOnly
    Error:
      type: object
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              description: A machine-readable error code.
              examples:
              - invalid_email
            message:
              type: string
              description: A human-readable error description.
              examples:
              - 'invalid email format: not-an-email'
    RelationshipFieldSide:
      type: object
      properties:
        objectType:
          type: string
          enum:
          - CONTACT
          - COMPANY
          - OPPORTUNITY
          - CAMPAIGN
          - CAMPAIGN_MEMBER
          - CUSTOM_OBJECT
        customObjectId:
          type: string
          format: uuid
          description: Required when objectType is CUSTOM_OBJECT; omit for standard objects.
        key:
          type: string
          description: Required field key. Leading and trailing whitespace is trimmed. Use letters, numbers, or underscores, including Unicode letters.
        label:
          type: string
          description: Display name; leading and trailing whitespace is trimmed.
      required:
      - objectType
      - key
      - label
    RelationshipFieldReference:
      type: object
      properties:
        key:
          type: string
        objectType:
          type: string
          enum:
          - CONTACT
          - COMPANY
          - OPPORTUNITY
          - CAMPAIGN
          - CAMPAIGN_MEMBER
          - CUSTOM_OBJECT
        customObjectId:
          type: string
          format: uuid
      required:
      - key
      - objectType
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'Your Conversion API key. Found in **Settings > Integrations** in the dashboard. Format: `sk_live_<key_id>_<secret>`.'
    apiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: 'Your Conversion API key, sent as a query parameter instead of the `X-API-Key` header. Prefer the header: URLs can end up in logs and browser history.'