openapi: 3.0.0
info:
  title: Unified.to ENRICH API
  version: "1.0"
  description: One API to Rule Them All
  contact:
    email: hello@unified.to
    url: https://unified.to/contact
  termsOfService: https://unified.to/tos
externalDocs:
  description: API Documentation
  url: https://docs.unified.to
tags:
  - name: unifiedapi
    description: Unified.to API
  - name: enrich
  - name: person
  - name: company
security:
  - jwt: []
servers:
  - url: https://api.unified.to
    description: North American data region
  - url: https://api-eu.unified.to
    description: European data region
  - url: https://api-au.unified.to
    description: Australian data region
components:
  securitySchemes:
    jwt:
      type: apiKey
      name: authorization
      in: header
  requestBodies: {}
  schemas:
    EnrichEmail:
      type: object
      properties:
        email:
          type: string
        type:
          type: string
          enum:
            - WORK
            - HOME
            - OTHER
          x-speakeasy-unknown-values: allow
        is_verified:
          type: boolean
      required:
        - email
    property_EnrichPerson_emails:
      type: array
      items:
        $ref: "#/components/schemas/EnrichEmail"
      description: An array of email addresses for this person
    EnrichTelephone:
      type: object
      properties:
        telephone:
          type: string
        type:
          type: string
          enum:
            - WORK
            - HOME
            - OTHER
            - FAX
            - MOBILE
          x-speakeasy-unknown-values: allow
      required:
        - telephone
    property_EnrichPerson_telephones:
      type: array
      items:
        $ref: "#/components/schemas/EnrichTelephone"
      description: An array of telephones for this person
    property_EnrichPerson_address:
      type: object
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        region:
          type: string
        region_code:
          type: string
        postal_code:
          type: string
        country:
          type: string
        country_code:
          type: string
      description: The address of the person
    EnrichPersonWorkHistory:
      type: object
      properties:
        company_id:
          type: string
        company_name:
          type: string
        title:
          type: string
        start_at:
          type: string
          format: date-time
        end_at:
          type: string
          format: date-time
        location:
          type: string
        company_domain:
          type: string
      required:
        - title
    property_EnrichPerson_work_histories:
      type: array
      items:
        $ref: "#/components/schemas/EnrichPersonWorkHistory"
    EnrichPerson:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        title:
          type: string
        birthdate:
          type: string
        image_url:
          type: string
        bio:
          type: string
        company:
          type: string
        company_domain:
          type: string
        emails:
          $ref: "#/components/schemas/property_EnrichPerson_emails"
        telephones:
          $ref: "#/components/schemas/property_EnrichPerson_telephones"
        twitter_handle:
          type: string
        linkedin_url:
          type: string
        github_url:
          type: string
        github_username:
          type: string
        twitter_url:
          type: string
        facebook_url:
          type: string
        gender:
          type: string
          enum:
            - MALE
            - FEMALE
          x-speakeasy-unknown-values: allow
        address:
          $ref: "#/components/schemas/property_EnrichPerson_address"
        timezone:
          type: string
        utc_offset:
          type: number
        work_histories:
          $ref: "#/components/schemas/property_EnrichPerson_work_histories"
        raw:
          type: object
          additionalProperties: true
      description: A person object from an enrichment integration
    property_EnrichCompany_address:
      type: object
      properties:
        address1:
          type: string
        address2:
          type: string
        city:
          type: string
        region:
          type: string
        region_code:
          type: string
        postal_code:
          type: string
        country:
          type: string
        country_code:
          type: string
      description: The address of the company
    property_EnrichCompany_telephones:
      type: array
      items:
        $ref: "#/components/schemas/EnrichTelephone"
      description: An array of telephones for this company
    EnrichCompany:
      type: object
      properties:
        id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        name:
          type: string
        description:
          type: string
        domain:
          type: string
        twitter_handle:
          type: string
        twitter_url:
          type: string
        address:
          $ref: "#/components/schemas/property_EnrichCompany_address"
        telephones:
          $ref: "#/components/schemas/property_EnrichCompany_telephones"
        linkedin_url:
          type: string
        crunchbase_url:
          type: string
        facebook_url:
          type: string
        youtube_url:
          type: string
        instagram_url:
          type: string
        yelp_url:
          type: string
        logo_url:
          type: string
        exchange:
          type: string
        stock:
          type: string
        year_founded:
          type: number
        alexa_rank:
          type: number
        naics_code:
          type: number
        sic_code:
          type: number
        employees:
          type: string
        revenue:
          type: string
        industry:
          type: string
        raw:
          type: object
          additionalProperties: true
      description: A company object from an enrichment integration
paths:
  /enrich/{connection_id}/person:
    get:
      summary: Retrieve enrichment information for a person
      parameters:
        - schema:
            type: string
          name: email
          in: query
          required: false
          description: The email of the person to search
        - schema:
            type: string
          name: twitter
          in: query
          required: false
          description: The twitter handle of the person to search
        - schema:
            type: string
          name: name
          in: query
          required: false
          description: The name of the person to search
        - schema:
            type: string
          name: linkedin_url
          in: query
          required: false
          description: The LinkedIn URL of the person to search
        - schema:
            type: string
          name: company_name
          in: query
          required: false
          description: The name of the company the person is associated with.  Not valid by itself.
        - schema:
            type: string
          description: ID of the connection
          name: connection_id
          in: path
          required: true
      tags:
        - enrich
        - person
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EnrichPerson"
          description: Successful
      security:
        - jwt: []
      operationId: listEnrichPeople
  /enrich/{connection_id}/company:
    get:
      summary: Retrieve enrichment information for a company
      parameters:
        - schema:
            type: string
          name: domain
          in: query
          required: false
          description: The domain of the company to search
        - schema:
            type: string
          name: name
          in: query
          required: false
          description: The name of the company to search
        - schema:
            type: string
          description: ID of the connection
          name: connection_id
          in: path
          required: true
      tags:
        - enrich
        - company
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EnrichCompany"
          description: Successful
      security:
        - jwt: []
      operationId: listEnrichCompanies
