Affinity

Relationship intelligence CRM

api-docs.affinity.co ↗
Version
2.0.0
OpenAPI
3.0.1
Endpoints
20
Schemas
77
88
Quality
Updated
3 days ago
Crm crm relationships networking
Use this API in your AI agent

Query structured spec data via REST or MCP. Get exactly what your agent needs.

Get API Key

Server URLs

//api.affinity.co

Endpoints

Auth 1 endpoints

GET /v2/auth/whoami

Returns metadata about the current user.

operationId: Auth_getCurrentUser

Responses

200

Get current user

GET /v2/auth/whoami

Companies 5 endpoints

GET /v2/companies

Paginate through Companies in Affinity.
Returns basic information and non-list-specific field data on each Company.

To retrieve field data, you must use either the fieldIds or the fieldTypes parameter
to specify the Fields for which you want data returned.
These Field IDs and Types can be found using the GET /v2/companies/fields endpoint.
When no fieldIds or fieldTypes are provided, Companies will be returned without any field data attached.
To supply multiple fieldIds or fieldTypes parameters, generate a query string that looks like this:
?fieldIds=field-1234&fieldIds=affinity-data-location or ?fieldTypes=enriched&fieldTypes=global.

Requires the “Export All Organizations directory” permission.

operationId: Companies_getAll

Parameters

Name In Required Type Description
cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

ids query optional array

Company IDs

fieldIds query optional array

Field IDs for which to return field data

fieldTypes query optional array

Field Types for which to return field data

Responses

200

Get all Companies

400

Bad Request

GET /v2/companies
GET /v2/companies/fields

Returns metadata on non-list-specific Company Fields.

Use the returned Field IDs to request field data from the GET /v2/companies and GET /v2/companies/{id} endpoints.

operationId: Companies_getFieldMetadata

Parameters

Name In Required Type Description
cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get metadata on Company Fields

400

Bad Request

GET /v2/companies/fields
GET /v2/companies/{id}

Returns basic information and non-list-specific field data on the requested Company.

To retrieve field data, you must use either the fieldIds or the fieldTypes parameter
to specify the Fields for which you want data returned.
These Field IDs and Types can be found using the GET /v2/companies/fields endpoint.
When no fieldIds or fieldTypes are provided, Companies will be returned without any field data attached.
To supply multiple fieldIds or fieldTypes parameters, generate a query string that looks like this:
?fieldIds=field-1234&fieldIds=affinity-data-location or ?fieldTypes=enriched&fieldTypes=global.

Requires the “Export All Organizations directory” permission.

operationId: Companies_getSingleCompany

Parameters

Name In Required Type Description
id path required integer

Company ID

fieldIds query optional array

Field IDs for which to return field data

fieldTypes query optional array

Field Types for which to return field data

Responses

200

Get a single Company

400

Bad Request

404

Not Found

GET /v2/companies/{id}
GET /v2/companies/{id}/list-entries

Paginate through the List Entries (AKA rows) for the given Company across all Lists.
Each List Entry includes field data for the Company, including list-specific field data.
Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom.

Requires the “Export data from Lists” permission.

operationId: Companies_getListEntries

Parameters

Name In Required Type Description
id path required integer

Company ID

cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get a Company’s List Entries

400

Bad Request

GET /v2/companies/{id}/list-entries
GET /v2/companies/{id}/lists

Returns metadata for all the Lists on which the given Company appears.

operationId: Companies_getListsMetadata

Parameters

Name In Required Type Description
id path required integer

Company ID

cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get a Company’s Lists

400

Bad Request

404

Not Found

GET /v2/companies/{id}/lists

Lists 7 endpoints

GET /v2/lists

Returns metadata on Lists.

operationId: Lists_getMetadata

Parameters

Name In Required Type Description
cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get metadata on all Lists

400

Bad Request

GET /v2/lists
GET /v2/lists/{listId}

Returns metadata on a single List.

operationId: Lists_getMetadataSingle

Parameters

Name In Required Type Description
listId path required integer

List ID

Responses

200

Get metadata on a single List

400

Bad Request

404

Not Found

GET /v2/lists/{listId}
GET /v2/lists/{listId}/fields

Returns metadata on the Fields available on a single List.

Use the returned Field IDs to request field data from the GET /v2/lists/{listId}/list-entries endpoint.

operationId: Lists_getFieldMetadata

Parameters

Name In Required Type Description
listId path required integer

List ID

cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get metadata on a single List’s Fields

400

Bad Request

404

Not Found

GET /v2/lists/{listId}/fields
GET /v2/lists/{listId}/list-entries

Paginate through the List Entries (AKA rows) on a given List.
Returns basic information and field data, including list-specific
field data, on each Company, Person, or Opportunity on the List.
List Entries also include metadata about their creation,
i.e., when they were added to the List and by whom.

To retrieve field data, you must use either the fieldIds or the fieldTypes parameter
to specify the Fields for which you want data returned.
These Field IDs and Types can be found using the GET /v2/lists/{listId}/fields endpoint.
When no fieldIds or fieldTypes are provided, List Entries will be returned without any field data attached.
To supply multiple fieldIds or fieldTypes parameters, generate a query string that looks like this:
?fieldIds=field-1234&fieldIds=affinity-data-location or ?fieldTypes=enriched&fieldTypes=global.

Requires the “Export data from Lists” permission.

operationId: Lists_getAllListEntries

Parameters

Name In Required Type Description
listId path required integer

List ID

cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

fieldIds query optional array

Field IDs for which to return field data

fieldTypes query optional array

Field Types for which to return field data

Responses

200

Get all List Entries on a List

400

Bad Request

404

Not Found

GET /v2/lists/{listId}/list-entries
GET /v2/lists/{listId}/saved-views

Returns metadata on the Saved Views on a List.

operationId: Lists_listSavedViewsMetadata

Parameters

Name In Required Type Description
listId path required integer

List ID

cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get metadata on Saved Views

400

Bad Request

404

Not Found

GET /v2/lists/{listId}/saved-views
GET /v2/lists/{listId}/saved-views/{viewId}

Returns metadata on a single Saved View.

operationId: Lists_getSavedViewMetadata

Parameters

Name In Required Type Description
listId path required integer

List ID

viewId path required integer

Saved view ID

Responses

200

Get metadata on a single Saved View

400

Bad Request

404

Not Found

GET /v2/lists/{listId}/saved-views/{viewId}
GET /v2/lists/{listId}/saved-views/{viewId}/list-entries

Paginate through the List Entries (AKA rows) on a given Saved View.
Use this endpoint when you need to filter entities or only want some
field data to be returned: This endpoint respects the filters set on a Saved View
via web app, and only returns field data corresponding to the columns that have been
pulled into the Saved View via web app.

Though this endpoint respects the Saved View’s filters and column/Field selection,
it does not yet preserve sort order. This endpoint also only supports sheet-type
Saved Views
, and not board- or dashboard-type Saved Views.

See the Data Model section for more information about Saved Views.

Requires the “Export data from Lists” permission.

operationId: Lists_getSavedViewListEntries

Parameters

Name In Required Type Description
listId path required integer

List ID

viewId path required integer

Saved view ID

cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get all List Entries on a Saved View

400

Bad Request

404

Not Found

GET /v2/lists/{listId}/saved-views/{viewId}/list-entries

Opportunities 2 endpoints

GET /v2/opportunities

Paginate through Opportunities in Affinity.
Returns basic information but not field data on each Opportunity.

To access field data on Opportunities, use the /lists/{list_id}/list-entries
or the /v2/lists/{list_id}/saved-views/{view_id}/list-entries GET endpoint.

Requires the “Export data from Lists” permission.

operationId: Opportunities_getAll

Parameters

Name In Required Type Description
cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

ids query optional array

Opportunity IDs

Responses

200

Get all Opportunities

400

Bad Request

GET /v2/opportunities
GET /v2/opportunities/{id}

Returns basic information but not field data on the requested Opportunity.

To access field data on Opportunities, use the /lists/{list_id}/list-entries
or the /v2/lists/{list_id}/saved-views/{view_id}/list-entries GET endpoint.

Requires the “Export data from Lists” permission.

operationId: Opportunities_getBasicInfo

Parameters

Name In Required Type Description
id path required integer

Opportunity ID

Responses

200

Get a single Opportunity

400

Bad Request

404

Not Found

GET /v2/opportunities/{id}

Persons 5 endpoints

GET /v2/persons

Paginate through Persons in Affinity.
Returns basic information and non-list-specific field data on each Person.

To retrieve field data, you must use either the fieldIds or the fieldTypes parameter
to specify the Fields for which you want data returned.
These Field IDs and Types can be found using the GET /v2/persons/fields endpoint.
When no fieldIds or fieldTypes are provided, Persons will be returned without any field data attached.
To supply multiple fieldIds or fieldTypes parameters, generate a query string that looks like this:
?fieldIds=field-1234&fieldIds=affinity-data-location or ?fieldTypes=enriched&fieldTypes=global.

Requires the “Export All People directory” permission.

operationId: Persons_getAll

Parameters

Name In Required Type Description
cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

ids query optional array

People IDs

fieldIds query optional array

Field IDs for which to return field data

fieldTypes query optional array

Field Types for which to return field data

Responses

200

Get all Persons

400

Bad Request

GET /v2/persons
GET /v2/persons/fields

Returns metadata on non-list-specific Person Fields.

Use the returned Field IDs to request field data from the GET /v2/persons and GET /v2/persons/{id} endpoints.

operationId: Persons_getMetadata

Parameters

Name In Required Type Description
cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get metadata on Person Fields

400

Bad Request

GET /v2/persons/fields
GET /v2/persons/{id}

Returns basic information and non-list-specific field data on the requested Person.

To retrieve field data, you must use either the fieldIds or the fieldTypes parameter
to specify the Fields for which you want data returned.
These Field IDs and Types can be found using the GET /v2/persons/fields endpoint.
When no fieldIds or fieldTypes are provided, Persons will be returned without any field data attached.
To supply multiple fieldIds or fieldTypes parameters, generate a query string that looks like this:
?fieldIds=field-1234&fieldIds=affinity-data-location or ?fieldTypes=enriched&fieldTypes=global.

Requires the “Export All People directory” permission.

operationId: Persons_getPersonFieldData

Parameters

Name In Required Type Description
id path required integer

Person ID

fieldIds query optional array

Field IDs for which to return field data

fieldTypes query optional array

Field Types for which to return field data

Responses

200

Get a single Person

400

Bad Request

404

Not Found

GET /v2/persons/{id}
GET /v2/persons/{id}/list-entries

Paginate through the List Entries (AKA rows) for the given Person across all Lists.
Each List Entry includes field data for the Person, including list-specific field data.
Each List Entry also includes metadata about its creation, i.e., when it was added to the List and by whom.

Requires the “Export data from Lists” permission.

operationId: Persons_paginateEntries

Parameters

Name In Required Type Description
id path required integer

Persons ID

cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get a Person’s List Entries

400

Bad Request

GET /v2/persons/{id}/list-entries
GET /v2/persons/{id}/lists

Returns metadata for all the Lists on which the given Person appears.

operationId: Persons_getListsMetadata

Parameters

Name In Required Type Description
id path required integer

Persons ID

cursor query optional string

Cursor for the next or previous page

limit query optional integer

Number of items to include in the page

Responses

200

Get a Person’s Lists

400

Bad Request

404

Not Found

GET /v2/persons/{id}/lists

Schemas

object Attendee
{
  "type": "object",
  "properties": {
    "person": {
      "$ref": "#/components/schemas/PersonData",
      "nullable": true
    },
    "emailAddress": {
      "type": "string",
      "format": "email",
      "example": "john.smith@contoso.com",
      "nullable": true,
      "description": "The email addresses of the attendee"
    }
  }
}
object AuthenticationError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "authentication",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object AuthorizationError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "authorization",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object ChatMessage
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The chat message's unique identifier"
    },
    "type": {
      "enum": [
        "call",
        "email",
        "meeting",
        "chat-message"
      ],
      "type": "string",
      "example": "meeting",
      "nullable": true,
      "description": "The type of interaction"
    },
    "sentAt": {
      "type": "string",
      "format": "date-time",
      "example": "2023-01-01 00:00:00.000000000 Z",
      "nullable": true,
      "description": "The time the chat message was sent"
    },
    "direction": {
      "enum": [
        "received",
        "sent"
      ],
      "type": "string",
      "example": "outbound",
      "nullable": true,
      "description": "The direction of the chat message"
    },
    "participants": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/PersonData"
      },
      "nullable": true,
      "description": "The participants of the chat"
    },
    "manualCreator": {
      "$ref": "#/components/schemas/PersonData",
      "nullable": true
    }
  }
}
object CompaniesValue
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CompanyData"
      },
      "nullable": true,
      "description": "The values for many companies"
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object Company
{
  "type": "object",
  "example": {
    "id": 1,
    "name": "Acme",
    "domain": "acme.co",
    "fields": [
      {
        "id": "affinity-data-locationX",
        "name": "Location",
        "type": "enriched",
        "value": {
          "data": {
            "city": "San Francisco",
            "state": "California",
            "country": "United States",
            "continent": "North America",
            "streetAddress": "170 Columbus Ave"
          },
          "type": "location"
        },
        "enrichmentSource": "affinity-data"
      },
      {
        "id": "affinity-data-locationX",
        "name": "Location",
        "type": "enriched",
        "value": {
          "data": {
            "city": "San Francisco",
            "state": "California",
            "country": "United States",
            "continent": "North America",
            "streetAddress": "170 Columbus Ave"
          },
          "type": "location"
        },
        "enrichmentSource": "affinity-data"
      }
    ],
    "domains": [
      "acme.co"
    ],
    "isGlobal": true
  },
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The company's unique identifier"
    },
    "name": {
      "type": "string",
      "example": "Acme",
      "nullable": true,
      "description": "The company's name"
    },
    "domain": {
      "type": "string",
      "format": "hostname",
      "example": "acme.co",
      "nullable": true,
      "description": "The company's primary domain"
    },
    "fields": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Field"
      },
      "description": "The fields associated with the company"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "hostname"
      },
      "example": [
        "acme.co"
      ],
      "nullable": true,
      "description": "All of the company's domains"
    },
    "isGlobal": {
      "type": "boolean",
      "example": true,
      "nullable": true,
      "description": "Whether or not the company is org specific"
    }
  },
  "description": "Company model"
}
object CompanyData
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The company's unique identifier"
    },
    "name": {
      "type": "string",
      "example": "Acme",
      "nullable": true,
      "description": "The company's name"
    },
    "domain": {
      "type": "string",
      "format": "hostname",
      "example": "acme.co",
      "nullable": true,
      "description": "The company's primary domain"
    }
  }
}
object CompanyListEntry
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The list entry's unique identifier"
    },
    "type": {
      "enum": [
        "company",
        "opportunity",
        "person"
      ],
      "type": "string",
      "example": "company",
      "nullable": true,
      "description": "The entity type for this list entry"
    },
    "entity": {
      "$ref": "#/components/schemas/Company",
      "nullable": true
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "example": "2023-01-01 00:00:00.000000000 Z",
      "nullable": true,
      "description": "The date that the list entry was created"
    },
    "creatorId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The ID of the user that created this list entry"
    }
  }
}
object CompanyPaged
{
  "type": "object",
  "example": {
    "data": [
      {
        "id": 1,
        "name": "Acme",
        "domain": "acme.co",
        "fields": [
          {
            "id": "affinity-data-locationX",
            "name": "Location",
            "type": "enriched",
            "value": {
              "data": {
                "city": "San Francisco",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "170 Columbus Ave"
              },
              "type": "location"
            },
            "enrichmentSource": "affinity-data"
          },
          {
            "id": "affinity-data-locationX",
            "name": "Location",
            "type": "enriched",
            "value": {
              "data": {
                "city": "San Francisco",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "170 Columbus Ave"
              },
              "type": "location"
            },
            "enrichmentSource": "affinity-data"
          }
        ],
        "domains": [
          "acme.co"
        ],
        "isGlobal": true
      },
      {
        "id": 1,
        "name": "Acme",
        "domain": "acme.co",
        "fields": [
          {
            "id": "affinity-data-locationX",
            "name": "Location",
            "type": "enriched",
            "value": {
              "data": {
                "city": "San Francisco",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "170 Columbus Ave"
              },
              "type": "location"
            },
            "enrichmentSource": "affinity-data"
          },
          {
            "id": "affinity-data-locationX",
            "name": "Location",
            "type": "enriched",
            "value": {
              "data": {
                "city": "San Francisco",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "170 Columbus Ave"
              },
              "type": "location"
            },
            "enrichmentSource": "affinity-data"
          }
        ],
        "domains": [
          "acme.co"
        ],
        "isGlobal": true
      }
    ],
    "pagination": {
      "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA",
      "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw"
    }
  },
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Company"
      },
      "description": "A page of Company results"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "description": "CompanyPaged model"
}
object CompanyValue
{
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/CompanyData",
      "nullable": true
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object CompanyWithListEntries
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The company's unique identifier"
    },
    "name": {
      "type": "string",
      "example": "Acme",
      "nullable": true,
      "description": "The company's name"
    },
    "domain": {
      "type": "string",
      "format": "hostname",
      "example": "acme.co",
      "nullable": true,
      "description": "The company's primary domain"
    },
    "fields": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Field"
      },
      "description": "The fields associated with the company"
    },
    "domains": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "hostname"
      },
      "example": [
        "acme.co"
      ],
      "nullable": true,
      "description": "All of the company's domains"
    },
    "isGlobal": {
      "type": "boolean",
      "example": true,
      "nullable": true,
      "description": "Whether or not the company is org specific"
    },
    "listEntries": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ListEntry"
      },
      "nullable": true,
      "description": "The list entries that this company is connected to"
    }
  }
}
object CompanyWithListEntriesPaged
{
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CompanyWithListEntries"
      },
      "description": "A page of CompanyWithListEntries results"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  }
}
object ConflictError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "conflict",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object DateValue
{
  "type": "object",
  "properties": {
    "data": {
      "type": "string",
      "format": "date-time",
      "nullable": true,
      "description": "The value for a date"
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object Dropdown
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "example": "first",
      "nullable": true,
      "description": "Dropdown item text"
    },
    "dropdownOptionId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "Dropdown item's unique identifier"
    }
  }
}
object DropdownValue
{
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/Dropdown",
      "nullable": true
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object DropdownsValue
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Dropdown"
      },
      "nullable": true,
      "description": "The value for many dropdown items"
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object Email
{
  "type": "object",
  "properties": {
    "cc": {
      "$ref": "#/components/schemas/Attendee",
      "nullable": true
    },
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The email's unique identifier"
    },
    "to": {
      "$ref": "#/components/schemas/Attendee",
      "nullable": true
    },
    "from": {
      "$ref": "#/components/schemas/Attendee",
      "nullable": true
    },
    "type": {
      "enum": [
        "call",
        "email",
        "meeting",
        "chat-message"
      ],
      "type": "string",
      "example": "meeting",
      "nullable": true,
      "description": "The type of interaction"
    },
    "sentAt": {
      "type": "string",
      "format": "date-time",
      "example": "2023-01-01 00:00:00.000000000 Z",
      "nullable": true,
      "description": "The time the email was sent"
    },
    "subject": {
      "type": "string",
      "example": "Acme Upsell $10k",
      "nullable": true,
      "description": "The subject of the email"
    }
  }
}
object EmptyMessageBodyError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "empty-message-body",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object Error
{
  "type": "object",
  "oneOf": [
    {
      "$ref": "#/components/schemas/AuthenticationError"
    },
    {
      "$ref": "#/components/schemas/AuthorizationError"
    },
    {
      "$ref": "#/components/schemas/ConflictError"
    },
    {
      "$ref": "#/components/schemas/MethodNotAllowedError"
    },
    {
      "$ref": "#/components/schemas/NotFoundError"
    },
    {
      "$ref": "#/components/schemas/ServerError"
    },
    {
      "$ref": "#/components/schemas/ValidationError"
    },
    {
      "$ref": "#/components/schemas/EmptyMessageBodyError"
    },
    {
      "$ref": "#/components/schemas/InvalidAcceptHeaderError"
    },
    {
      "$ref": "#/components/schemas/InvalidMessageBodyError"
    },
    {
      "$ref": "#/components/schemas/InvalidVersionHeaderError"
    },
    {
      "$ref": "#/components/schemas/TooManyMultipartFilesError"
    },
    {
      "$ref": "#/components/schemas/RateLimitError"
    },
    {
      "$ref": "#/components/schemas/GenericError"
    }
  ],
  "properties": {
    "code": {
      "type": "string",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  },
  "discriminator": {
    "mapping": {
      "error": "#/components/schemas/GenericError",
      "server": "#/components/schemas/ServerError",
      "conflict": "#/components/schemas/ConflictError",
      "not-found": "#/components/schemas/NotFoundError",
      "rate-limit": "#/components/schemas/RateLimitError",
      "validation": "#/components/schemas/ValidationError",
      "authorization": "#/components/schemas/AuthorizationError",
      "authentication": "#/components/schemas/AuthenticationError",
      "empty-message-body": "#/components/schemas/EmptyMessageBodyError",
      "method-not-allowed": "#/components/schemas/MethodNotAllowedError",
      "invalid-message-body": "#/components/schemas/InvalidMessageBodyError",
      "invalid-accept-header": "#/components/schemas/InvalidAcceptHeaderError",
      "invalid-version-header": "#/components/schemas/InvalidVersionHeaderError",
      "too-many-multipart-files": "#/components/schemas/TooManyMultipartFilesError"
    },
    "propertyName": "code"
  }
}
object Errors
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Error"
      },
      "nullable": true,
      "description": "Errors"
    }
  }
}
object Field
{
  "type": "object",
  "example": {
    "id": "affinity-data-locationX",
    "name": "Location",
    "type": "enriched",
    "value": {
      "data": {
        "city": "San Francisco",
        "state": "California",
        "country": "United States",
        "continent": "North America",
        "streetAddress": "170 Columbus Ave"
      },
      "type": "location"
    },
    "enrichmentSource": "affinity-data"
  },
  "properties": {
    "id": {
      "type": "string",
      "example": "affinity-data-location",
      "nullable": true,
      "description": "The field's unique identifier"
    },
    "name": {
      "type": "string",
      "example": "Location",
      "nullable": true,
      "description": "The field's name"
    },
    "type": {
      "enum": [
        "enriched",
        "global",
        "list",
        "relationship-intelligence"
      ],
      "type": "string",
      "example": "enriched",
      "nullable": true,
      "description": "The field's type"
    },
    "value": {
      "$ref": "#/components/schemas/FieldValue",
      "nullable": true
    },
    "enrichmentSource": {
      "enum": [
        "affinity-data",
        "dealroom"
      ],
      "type": "string",
      "example": "affinity-data",
      "nullable": true,
      "description": "The source of the data in this Field (if it is enriched)"
    }
  }
}
object FieldMetadata
{
  "type": "object",
  "example": {
    "id": "affinity-data-locationX",
    "name": "Location",
    "type": "enriched",
    "valueType": "location",
    "enrichmentSource": "affinity-data"
  },
  "properties": {
    "id": {
      "type": "string",
      "example": "affinity-data-location",
      "nullable": true,
      "description": "The field's unique identifier"
    },
    "name": {
      "type": "string",
      "example": "Location",
      "nullable": true,
      "description": "The field's name"
    },
    "type": {
      "enum": [
        "enriched",
        "global",
        "list",
        "relationship-intelligence"
      ],
      "type": "string",
      "example": "enriched",
      "nullable": true,
      "description": "The field's type"
    },
    "valueType": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of the data in this Field"
    },
    "enrichmentSource": {
      "enum": [
        "affinity-data",
        "dealroom"
      ],
      "type": "string",
      "example": "affinity-data",
      "nullable": true,
      "description": "The source of the data in this Field (if it is enriched)"
    }
  }
}
object FieldMetadataPaged
{
  "type": "object",
  "example": {
    "data": [
      {
        "id": "affinity-data-locationX",
        "name": "Location",
        "type": "enriched",
        "valueType": "location",
        "enrichmentSource": "affinity-data"
      },
      {
        "id": "affinity-data-locationX",
        "name": "Location",
        "type": "enriched",
        "valueType": "location",
        "enrichmentSource": "affinity-data"
      }
    ],
    "pagination": {
      "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA",
      "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw"
    }
  },
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FieldMetadata"
      },
      "description": "A page of FieldMetadata results"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "description": "FieldMetadataPaged model"
}
object FieldValue
{
  "type": "object",
  "oneOf": [
    {
      "$ref": "#/components/schemas/PersonValue"
    },
    {
      "$ref": "#/components/schemas/PersonsValue"
    },
    {
      "$ref": "#/components/schemas/CompanyValue"
    },
    {
      "$ref": "#/components/schemas/CompaniesValue"
    },
    {
      "$ref": "#/components/schemas/TextValue"
    },
    {
      "$ref": "#/components/schemas/TextsValue"
    },
    {
      "$ref": "#/components/schemas/LocationValue"
    },
    {
      "$ref": "#/components/schemas/LocationsValue"
    },
    {
      "$ref": "#/components/schemas/FloatValue"
    },
    {
      "$ref": "#/components/schemas/FloatsValue"
    },
    {
      "$ref": "#/components/schemas/DateValue"
    },
    {
      "$ref": "#/components/schemas/TextValue"
    },
    {
      "$ref": "#/components/schemas/RankedDropdownValue"
    },
    {
      "$ref": "#/components/schemas/DropdownValue"
    },
    {
      "$ref": "#/components/schemas/DropdownsValue"
    },
    {
      "$ref": "#/components/schemas/FormulaValue"
    },
    {
      "$ref": "#/components/schemas/InteractionValue"
    }
  ],
  "example": {
    "data": {
      "city": "San Francisco",
      "state": "California",
      "country": "United States",
      "continent": "North America",
      "streetAddress": "170 Columbus Ave"
    },
    "type": "location"
  },
  "properties": {
    "data": {
      "$ref": "#/components/schemas/Location",
      "nullable": true
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  },
  "discriminator": {
    "mapping": {
      "text": "#/components/schemas/TextValue",
      "number": "#/components/schemas/FloatValue",
      "person": "#/components/schemas/PersonValue",
      "company": "#/components/schemas/CompanyValue",
      "datetime": "#/components/schemas/DateValue",
      "dropdown": "#/components/schemas/DropdownValue",
      "location": "#/components/schemas/LocationValue",
      "interaction": "#/components/schemas/InteractionValue",
      "number-multi": "#/components/schemas/FloatsValue",
      "person-multi": "#/components/schemas/PersonsValue",
      "company-multi": "#/components/schemas/CompaniesValue",
      "dropdown-multi": "#/components/schemas/DropdownsValue",
      "formula-number": "#/components/schemas/FormulaValue",
      "location-multi": "#/components/schemas/LocationsValue",
      "filterable-text": "#/components/schemas/TextValue",
      "ranked-dropdown": "#/components/schemas/RankedDropdownValue",
      "filterable-text-multi": "#/components/schemas/TextsValue"
    },
    "propertyName": "type"
  }
}
object FloatValue
{
  "type": "object",
  "properties": {
    "data": {
      "type": "number",
      "format": "float",
      "nullable": true,
      "description": "The value for a number"
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object FloatsValue
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "number",
        "format": "float"
      },
      "nullable": true,
      "description": "The value for many numbers"
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object FormulaNumber
{
  "type": "object",
  "properties": {
    "calculatedValue": {
      "type": "number",
      "format": "float",
      "nullable": true,
      "description": "Calculated value"
    }
  }
}
object FormulaValue
{
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/FormulaNumber",
      "nullable": true
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object GenericError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object Grant
{
  "type": "object",
  "example": {
    "type": "api-key",
    "scopes": [
      "api"
    ],
    "createdAt": "2023-01-01 00:00:00.000000000 Z"
  },
  "properties": {
    "type": {
      "enum": [
        "api-key"
      ],
      "type": "string",
      "example": "api-key",
      "nullable": true,
      "description": "The type of grant used to authenticate"
    },
    "scopes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "example": [
        "api"
      ],
      "nullable": true,
      "description": "The scopes available to the current grant"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "example": "2023-01-01 00:00:00.000000000 Z",
      "nullable": true,
      "description": "When the grant was created"
    }
  }
}
object Interaction
{
  "type": "object",
  "oneOf": [
    {
      "$ref": "#/components/schemas/ChatMessage"
    },
    {
      "$ref": "#/components/schemas/Email"
    },
    {
      "$ref": "#/components/schemas/Meeting"
    },
    {
      "$ref": "#/components/schemas/PhoneCall"
    }
  ],
  "properties": {
    "type": {
      "enum": [
        "call",
        "email",
        "meeting",
        "chat-message"
      ],
      "type": "string",
      "example": "meeting",
      "nullable": true,
      "description": "The type of interaction"
    }
  },
  "discriminator": {
    "mapping": {
      "call": "#/components/schemas/PhoneCall",
      "email": "#/components/schemas/Email",
      "meeting": "#/components/schemas/Meeting",
      "chat-message": "#/components/schemas/ChatMessage"
    },
    "propertyName": "type"
  }
}
object InteractionValue
{
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/Interaction",
      "nullable": true
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object InvalidAcceptHeaderError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "invalid-accept-header",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object InvalidMessageBodyError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "invalid-message-body",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object InvalidVersionHeaderError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "invalid-version-header",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object List
{
  "type": "object",
  "example": {
    "id": 1,
    "name": "All companies",
    "ownerId": 1,
    "isPublic": false,
    "creatorId": 1
  },
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The unique identifier for the list"
    },
    "name": {
      "type": "string",
      "example": "All companies",
      "nullable": true,
      "description": "The name of the list"
    },
    "ownerId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The ID of the user that owns this list"
    },
    "isPublic": {
      "type": "boolean",
      "example": false,
      "nullable": true,
      "description": "Whether or not the list is public"
    },
    "creatorId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The ID of the user that created this list"
    }
  }
}
object ListEntry
{
  "type": "object",
  "example": {
    "id": 1,
    "fields": [
      {
        "id": "affinity-data-locationX",
        "name": "Location",
        "type": "enriched",
        "value": {
          "data": {
            "city": "San Francisco",
            "state": "California",
            "country": "United States",
            "continent": "North America",
            "streetAddress": "170 Columbus Ave"
          },
          "type": "location"
        },
        "enrichmentSource": "affinity-data"
      },
      {
        "id": "affinity-data-locationX",
        "name": "Location",
        "type": "enriched",
        "value": {
          "data": {
            "city": "San Francisco",
            "state": "California",
            "country": "United States",
            "continent": "North America",
            "streetAddress": "170 Columbus Ave"
          },
          "type": "location"
        },
        "enrichmentSource": "affinity-data"
      }
    ],
    "listId": 1,
    "createdAt": "2023-01-01 00:00:00.000000000 Z",
    "creatorId": 1
  },
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The list entry's unique identifier"
    },
    "fields": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Field"
      },
      "nullable": true,
      "description": "The fields associated with the list entry"
    },
    "listId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The ID of the list that this list entry belongs to"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "example": "2023-01-01 00:00:00.000000000 Z",
      "nullable": true,
      "description": "The date that the list entry was created"
    },
    "creatorId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The ID of the user that created this list entry"
    }
  }
}
object ListEntryPaged
{
  "type": "object",
  "example": {
    "data": [
      {
        "id": 1,
        "fields": [
          {
            "id": "affinity-data-locationX",
            "name": "Location",
            "type": "enriched",
            "value": {
              "data": {
                "city": "San Francisco",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "170 Columbus Ave"
              },
              "type": "location"
            },
            "enrichmentSource": "affinity-data"
          },
          {
            "id": "affinity-data-locationX",
            "name": "Location",
            "type": "enriched",
            "value": {
              "data": {
                "city": "San Francisco",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "170 Columbus Ave"
              },
              "type": "location"
            },
            "enrichmentSource": "affinity-data"
          }
        ],
        "listId": 1,
        "createdAt": "2023-01-01 00:00:00.000000000 Z",
        "creatorId": 1
      },
      {
        "id": 1,
        "fields": [
          {
            "id": "affinity-data-locationX",
            "name": "Location",
            "type": "enriched",
            "value": {
              "data": {
                "city": "San Francisco",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "170 Columbus Ave"
              },
              "type": "location"
            },
            "enrichmentSource": "affinity-data"
          },
          {
            "id": "affinity-data-locationX",
            "name": "Location",
            "type": "enriched",
            "value": {
              "data": {
                "city": "San Francisco",
                "state": "California",
                "country": "United States",
                "continent": "North America",
                "streetAddress": "170 Columbus Ave"
              },
              "type": "location"
            },
            "enrichmentSource": "affinity-data"
          }
        ],
        "listId": 1,
        "createdAt": "2023-01-01 00:00:00.000000000 Z",
        "creatorId": 1
      }
    ],
    "pagination": {
      "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA",
      "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw"
    }
  },
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ListEntry"
      },
      "description": "A page of ListEntry results"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "description": "ListEntryPaged model"
}
object ListEntryWithEntity
{
  "type": "object",
  "oneOf": [
    {
      "$ref": "#/components/schemas/CompanyListEntry"
    },
    {
      "$ref": "#/components/schemas/OpportunityListEntry"
    },
    {
      "$ref": "#/components/schemas/PersonListEntry"
    }
  ],
  "example": {
    "id": 1,
    "type": "company",
    "entity": {
      "id": 1,
      "name": "Acme",
      "domain": "acme.co",
      "fields": [
        {
          "id": "affinity-data-locationX",
          "name": "Location",
          "type": "enriched",
          "value": {
            "data": {
              "city": "San Francisco",
              "state": "California",
              "country": "United States",
              "continent": "North America",
              "streetAddress": "170 Columbus Ave"
            },
            "type": "location"
          },
          "enrichmentSource": "affinity-data"
        },
        {
          "id": "affinity-data-locationX",
          "name": "Location",
          "type": "enriched",
          "value": {
            "data": {
              "city": "San Francisco",
              "state": "California",
              "country": "United States",
              "continent": "North America",
              "streetAddress": "170 Columbus Ave"
            },
            "type": "location"
          },
          "enrichmentSource": "affinity-data"
        }
      ],
      "domains": [
        "acme.co"
      ],
      "isGlobal": true
    },
    "createdAt": "2023-01-01 00:00:00.000000000 Z",
    "creatorId": 1
  },
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The list entry's unique identifier"
    },
    "type": {
      "enum": [
        "company",
        "opportunity",
        "person"
      ],
      "type": "string",
      "example": "company",
      "nullable": true,
      "description": "The entity type for this list entry"
    },
    "entity": {
      "$ref": "#/components/schemas/Company",
      "nullable": true
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "example": "2023-01-01 00:00:00.000000000 Z",
      "nullable": true,
      "description": "The date that the list entry was created"
    },
    "creatorId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The ID of the user that created this list entry"
    }
  },
  "discriminator": {
    "mapping": {
      "person": "#/components/schemas/PersonListEntry",
      "company": "#/components/schemas/CompanyListEntry",
      "opportunity": "#/components/schemas/OpportunityListEntry"
    },
    "propertyName": "type"
  }
}
object ListEntryWithEntityPaged
{
  "type": "object",
  "example": {
    "data": [
      {
        "id": 1,
        "type": "company",
        "entity": {
          "id": 1,
          "name": "Acme",
          "domain": "acme.co",
          "fields": [
            {
              "id": "affinity-data-location",
              "name": "Location",
              "type": "enriched",
              "value": {
                "data": {
                  "city": "San Francisco",
                  "state": "California",
                  "country": "United States",
                  "continent": "North America",
                  "streetAddress": "170 Columbus Ave"
                },
                "type": "location"
              },
              "enrichmentSource": "affinity-data"
            },
            {
              "id": "affinity-data-locationX",
              "name": "Location",
              "type": "enriched",
              "value": {
                "data": {
                  "city": "San Francisco",
                  "state": "California",
                  "country": "United States",
                  "continent": "North America",
                  "streetAddress": "170 Columbus Ave"
                },
                "type": "location"
              },
              "enrichmentSource": "affinity-data"
            }
          ],
          "domains": [
            "acme.co"
          ],
          "isGlobal": true
        },
        "createdAt": "2023-01-01 00:00:00.000000000 Z",
        "creatorId": 1
      },
      {
        "id": 1,
        "type": "company",
        "entity": {
          "id": 1,
          "name": "Acme",
          "domain": "acme.co",
          "fields": [
            {
              "id": "affinity-data-locationX",
              "name": "Location",
              "type": "enriched",
              "value": {
                "data": {
                  "city": "San Francisco",
                  "state": "California",
                  "country": "United States",
                  "continent": "North America",
                  "streetAddress": "170 Columbus Ave"
                },
                "type": "location"
              },
              "enrichmentSource": "affinity-data"
            },
            {
              "id": "affinity-data-locationX",
              "name": "Location",
              "type": "enriched",
              "value": {
                "data": {
                  "city": "San Francisco",
                  "state": "California",
                  "country": "United States",
                  "continent": "North America",
                  "streetAddress": "170 Columbus Ave"
                },
                "type": "location"
              },
              "enrichmentSource": "affinity-data"
            }
          ],
          "domains": [
            "acme.co"
          ],
          "isGlobal": true
        },
        "createdAt": "2023-01-01 00:00:00.000000000 Z",
        "creatorId": 1
      }
    ],
    "pagination": {
      "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA",
      "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw"
    }
  },
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ListEntryWithEntity"
      },
      "nullable": true,
      "description": "A page of ListEntryWithEntity results"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "description": "ListEntryWithEntityPaged model"
}
object ListPaged
{
  "type": "object",
  "example": {
    "data": [
      {
        "id": 1,
        "name": "All companies",
        "ownerId": 1,
        "isPublic": false,
        "creatorId": 1
      },
      {
        "id": 1,
        "name": "All companies",
        "ownerId": 1,
        "isPublic": false,
        "creatorId": 1
      }
    ],
    "pagination": {
      "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA",
      "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw"
    }
  },
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/List"
      },
      "description": "A page of List results"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "description": "ListPaged model"
}
object ListWithType
{
  "type": "object",
  "example": {
    "id": 1,
    "name": "All companies",
    "type": "company",
    "ownerId": 1,
    "isPublic": false,
    "creatorId": 1
  },
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The unique identifier for the list"
    },
    "name": {
      "type": "string",
      "example": "All companies",
      "nullable": true,
      "description": "The name of the list"
    },
    "type": {
      "enum": [
        "company",
        "opportunity",
        "person"
      ],
      "type": "string",
      "example": "company",
      "nullable": true,
      "description": "The entity type for this list"
    },
    "ownerId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The ID of the user that owns this list"
    },
    "isPublic": {
      "type": "boolean",
      "example": false,
      "nullable": true,
      "description": "Whether or not the list is public"
    },
    "creatorId": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The ID of the user that created this list"
    }
  },
  "description": "ListWithType model"
}
object ListWithTypePaged
{
  "type": "object",
  "example": {
    "data": [
      {
        "id": 1,
        "name": "All companies",
        "type": "company",
        "ownerId": 1,
        "isPublic": false,
        "creatorId": 1
      },
      {
        "id": 1,
        "name": "All companies",
        "type": "company",
        "ownerId": 1,
        "isPublic": false,
        "creatorId": 1
      }
    ],
    "pagination": {
      "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA",
      "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw"
    }
  },
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ListWithType"
      },
      "description": "A page of ListWithType results"
    },
    "pagination": {
      "$ref": "#/components/schemas/Pagination"
    }
  },
  "description": "ListWithTypePaged model"
}
object Location
{
  "type": "object",
  "example": {
    "city": "San Francisco",
    "state": "California",
    "country": "United States",
    "continent": "North America",
    "streetAddress": "170 Columbus Ave"
  },
  "properties": {
    "city": {
      "type": "string",
      "example": "San Francisco",
      "nullable": true,
      "description": "City"
    },
    "state": {
      "type": "string",
      "example": "California",
      "nullable": true,
      "description": "State"
    },
    "country": {
      "type": "string",
      "example": "United States",
      "nullable": true,
      "description": "Country"
    },
    "continent": {
      "type": "string",
      "example": "North America",
      "nullable": true,
      "description": "Continent"
    },
    "streetAddress": {
      "type": "string",
      "example": "170 Columbus Ave",
      "nullable": true,
      "description": "Street address"
    }
  }
}
object LocationValue
{
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/components/schemas/Location",
      "nullable": true
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object LocationsValue
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Location"
      },
      "nullable": true,
      "description": "The values for many locations"
    },
    "type": {
      "enum": [
        "person",
        "person-multi",
        "company",
        "company-multi",
        "filterable-text",
        "filterable-text-multi",
        "number",
        "number-multi",
        "datetime",
        "location",
        "location-multi",
        "text",
        "ranked-dropdown",
        "dropdown",
        "dropdown-multi",
        "formula-number",
        "interaction"
      ],
      "type": "string",
      "example": "location",
      "nullable": true,
      "description": "The type of value"
    }
  }
}
object Meeting
{
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "example": 1,
      "nullable": true,
      "description": "The meeting's unique identifier"
    },
    "type": {
      "enum": [
        "call",
        "email",
        "meeting",
        "chat-message"
      ],
      "type": "string",
      "example": "meeting",
      "nullable": true,
      "description": "The type of interaction"
    },
    "title": {
      "type": "string",
      "example": "Acme Upsell $10k",
      "nullable": true,
      "description": "The meeting's title"
    },
    "allDay": {
      "type": "boolean",
      "example": false,
      "nullable": true,
      "description": "Whether the meeting is an all-day event"
    },
    "endTime": {
      "type": "string",
      "format": "date-time",
      "example": "2023-02-03 05:00:00.000000000 Z",
      "nullable": true,
      "description": "The meeting end time"
    },
    "attendees": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Attendee"
      },
      "nullable": true,
      "description": "People attending the meeting"
    },
    "startTime": {
      "type": "string",
      "format": "date-time",
      "example": "2023-02-03 04:00:00.000000000 Z",
      "nullable": true,
      "description": "The meeting start time"
    }
  }
}
object MethodNotAllowedError
{
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "example": "method-not-allowed",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}
object NotFoundError
{
  "type": "object",
  "example": {
    "code": "not-found",
    "message": "🚨 Error! Sound the alarm! 🚨"
  },
  "properties": {
    "code": {
      "type": "string",
      "example": "not-found",
      "nullable": true,
      "description": "Error code"
    },
    "message": {
      "type": "string",
      "example": "🚨 Error! Sound the alarm! 🚨",
      "nullable": true,
      "description": "Error message"
    }
  }
}