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

Clear filters

No endpoints found for this provider.

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"
    }
  }
}