openapi: "3.1.0"
info:
  title: "Up2Data API ({legacy})"
  version: "1.0.0"
  description: "The API allows you to programmatically enrich LinkedIn profiles
    and companies. This documentation covers the Open API endpoints available
    for external integrations: enqueue profiles, companies, posts and Sales
    Navigator searches for bulk enrichment, or enrich a single profile or
    company synchronously. Authenticate with an API key exchanged for a
    short-lived JWT, then read results back by polling the queue endpoints or by
    webhook."
  license:
    name: "Proprietary"
    identifier: "UNLICENSED"
servers:
  - url: "https://api.up2data.ai/api"
security:
  - ApiKeyAuth: []
tags:
  - name: "Auth"
    description: "Auth operations."
  - name: "Profiles"
    description: "Profiles operations."
  - name: "Companies"
    description: "Companies operations."
  - name: "Posts"
    description: "Posts operations."
  - name: "Sales Navigator"
    description: "Sales Navigator operations."
  - name: "Queues"
    description: "Queues operations."
paths:
  /api-auth/authenticate:
    post:
      operationId: "auth-authenticate"
      summary: "Authenticate"
      description: "Exchange an API key for a JWT access token."
      tags:
        - "Auth"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                apiKey:
                  type: "string"
              required:
                - "apiKey"
            example:
              apiKey: "your-api-key-here"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                accessToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
        "401":
          description: "Error The API key is invalid or missing."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    error: "Not authorized"
                not-authorized:
                  summary: "Not authorized"
                  value:
                    message: "The API key is invalid or missing."
      security: []
  /open-refresh/profile:
    post:
      operationId: "profiles-sync"
      summary: "Enrich a profile (sync)"
      description: "Enrich a single LinkedIn profile right now and return the result
        directly."
      tags:
        - "Profiles"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                profile:
                  type: "string"
                withFollowersAndConnections:
                  type: "boolean"
              required:
                - "profile"
            example:
              profile: "https://www.linkedin.com/in/johndoe"
              withFollowersAndConnections: false
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                url: "johndoe"
                firstName: "John"
                lastName: "Doe"
                headline: "VP of Engineering at Acme Corp"
                location: "San Francisco, California, United States"
                experience:
                  - companyName: "Acme Corp"
                    title: "VP of Engineering"
                    companyUrl: "acme-corp"
                    start:
                      year: 2021
                      month: 3
                    end: null
              schema:
                $ref: "#/components/schemas/Profile"
        "400":
          description: "The input is not a LinkedIn profile URL (linkedin.com/in/) or a
            bare slug, or the team's daily or monthly spending cap has been
            reached."
          content:
            application/json:
              example:
                message: "The input is not a LinkedIn profile URL (linkedin.com/in/) or a bare
                  slug, or the team's daily or monthly spending cap has been
                  reached."
        "403":
          description: "Not enough credits on the team."
          content:
            application/json:
              example:
                message: "Not enough credits on the team."
        "404":
          description: "Error No profile was found on LinkedIn for the given URL or slug."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "Profile not found on LinkedIn"
                profile-not-found-on-linkedin:
                  summary: "Profile not found on LinkedIn"
                  value:
                    message: "No profile was found on LinkedIn for the given URL or slug."
        "429":
          description: "More than 10 requests in 10 seconds for the team. The response
            carries Retry-After."
          content:
            application/json:
              example:
                message: "More than 10 requests in 10 seconds for the team. The response carries
                  Retry-After."
        "503":
          description: "No worker became available within 10 seconds, or the crawl could
            not be completed. Retry later."
          content:
            application/json:
              example:
                message: "No worker became available within 10 seconds, or the crawl could not
                  be completed. Retry later."
  /open-refresh/profiles-bulk:
    post:
      operationId: "profiles-bulk"
      summary: "Enqueue profiles"
      description: "Enqueue LinkedIn profiles for enrichment in bulk."
      tags:
        - "Profiles"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                name:
                  type: "string"
                profiles:
                  type: "array"
                  items:
                    type: "string"
                priority:
                  type: "number"
                withFollowersAndConnections:
                  type: "boolean"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "name"
                - "profiles"
                - "priority"
            example:
              name: "Q1 Leads Enrichment"
              profiles:
                - "https://www.linkedin.com/in/johndoe"
                - "https://www.linkedin.com/in/janedoe"
                - "johndoe123"
              priority: 2
              withFollowersAndConnections: true
              webhookTags:
                - "prod"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "3 items have been enqueued."
                queueId: "507f1f77bcf86cd799439011"
                enqueued: 3
                skipped:
                  invalid: 0
                  duplicates: 0
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "Error Every entry in profiles was invalid or a duplicate after
            normalization, so no queue was created. One or more webhookTags do
            not match any webhook on the team."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "No valid profiles to enqueue: of 4 submitted, 1 were invalid and 3
                      were duplicates."
                no-valid-profiles-to-enqueue:
                  summary: "No valid profiles to enqueue"
                  value:
                    message: "Every entry in profiles was invalid or a duplicate after
                      normalization, so no queue was created."
                no-webhook-matches-webhooktags:
                  summary: "No webhook matches webhookTags"
                  value:
                    message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/activity:
    post:
      operationId: "profiles-activity"
      summary: "Enqueue activity"
      description: "Enqueue LinkedIn profiles for activity enrichment."
      tags:
        - "Profiles"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                profiles:
                  type: "array"
                  items:
                    type: "string"
                name:
                  type: "string"
                priority:
                  type: "number"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "profiles"
            example:
              name: "Q1 Leads Activity"
              profiles:
                - "https://www.linkedin.com/in/johndoe"
                - "https://www.linkedin.com/in/janedoe"
                - "johndoe123"
              priority: 2
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "3 activity items have been enqueued (12 credits)."
                queueId: "507f1f77bcf86cd799439011"
                enqueued: 3
                skipped:
                  invalid: 0
                  duplicates: 0
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "Error Every entry in profiles was invalid or a duplicate after
            normalization, so no queue was created. One or more webhookTags do
            not match any webhook on the team."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "No valid profiles to enqueue: of 4 submitted, 1 were invalid and 3
                      were duplicates."
                no-valid-profiles-to-enqueue:
                  summary: "No valid profiles to enqueue"
                  value:
                    message: "Every entry in profiles was invalid or a duplicate after
                      normalization, so no queue was created."
                no-webhook-matches-webhooktags:
                  summary: "No webhook matches webhookTags"
                  value:
                    message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/posts:
    post:
      operationId: "profiles-posts"
      summary: "Enqueue posts"
      description: "Enqueue LinkedIn profiles and get back only the posts each one
        published."
      tags:
        - "Profiles"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                profiles:
                  type: "array"
                  items:
                    type: "string"
                name:
                  type: "string"
                priority:
                  type: "number"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "profiles"
            example:
              name: "Q1 Leads Posts"
              profiles:
                - "https://www.linkedin.com/in/johndoe"
                - "https://www.linkedin.com/in/janedoe"
                - "johndoe123"
              priority: 2
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "3 activity posts items have been enqueued (6 credits)."
                queueId: "507f1f77bcf86cd799439011"
                enqueued: 3
                skipped:
                  invalid: 0
                  duplicates: 0
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "Error Every entry in profiles was invalid or a duplicate after
            normalization, so no queue was created. One or more webhookTags do
            not match any webhook on the team."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "No valid profiles to enqueue: of 4 submitted, 1 were invalid and 3
                      were duplicates."
                no-valid-profiles-to-enqueue:
                  summary: "No valid profiles to enqueue"
                  value:
                    message: "Every entry in profiles was invalid or a duplicate after
                      normalization, so no queue was created."
                no-webhook-matches-webhooktags:
                  summary: "No webhook matches webhookTags"
                  value:
                    message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/comments:
    post:
      operationId: "profiles-comments"
      summary: "Enqueue comments"
      description: "Enqueue LinkedIn profiles and get back only the comments each one left."
      tags:
        - "Profiles"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                profiles:
                  type: "array"
                  items:
                    type: "string"
                name:
                  type: "string"
                priority:
                  type: "number"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "profiles"
            example:
              name: "Q1 Leads Comments"
              profiles:
                - "https://www.linkedin.com/in/johndoe"
                - "https://www.linkedin.com/in/janedoe"
                - "johndoe123"
              priority: 2
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "3 activity comments items have been enqueued (6 credits)."
                queueId: "507f1f77bcf86cd799439011"
                enqueued: 3
                skipped:
                  invalid: 0
                  duplicates: 0
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "Error Every entry in profiles was invalid or a duplicate after
            normalization, so no queue was created. One or more webhookTags do
            not match any webhook on the team."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "No valid profiles to enqueue: of 4 submitted, 1 were invalid and 3
                      were duplicates."
                no-valid-profiles-to-enqueue:
                  summary: "No valid profiles to enqueue"
                  value:
                    message: "Every entry in profiles was invalid or a duplicate after
                      normalization, so no queue was created."
                no-webhook-matches-webhooktags:
                  summary: "No webhook matches webhookTags"
                  value:
                    message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/reactions:
    post:
      operationId: "profiles-reactions"
      summary: "Enqueue reactions"
      description: "Enqueue LinkedIn profiles and get back only the posts each one
        reacted to."
      tags:
        - "Profiles"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                profiles:
                  type: "array"
                  items:
                    type: "string"
                name:
                  type: "string"
                priority:
                  type: "number"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "profiles"
            example:
              name: "Q1 Leads Reactions"
              profiles:
                - "https://www.linkedin.com/in/johndoe"
                - "https://www.linkedin.com/in/janedoe"
                - "johndoe123"
              priority: 2
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "3 activity reactions items have been enqueued (6 credits)."
                queueId: "507f1f77bcf86cd799439011"
                enqueued: 3
                skipped:
                  invalid: 0
                  duplicates: 0
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "Error Every entry in profiles was invalid or a duplicate after
            normalization, so no queue was created. One or more webhookTags do
            not match any webhook on the team."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "No valid profiles to enqueue: of 4 submitted, 1 were invalid and 3
                      were duplicates."
                no-valid-profiles-to-enqueue:
                  summary: "No valid profiles to enqueue"
                  value:
                    message: "Every entry in profiles was invalid or a duplicate after
                      normalization, so no queue was created."
                no-webhook-matches-webhooktags:
                  summary: "No webhook matches webhookTags"
                  value:
                    message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/latest-post:
    post:
      operationId: "profiles-latest-post"
      summary: "Enqueue latest post"
      description: "Enqueue LinkedIn profiles for latest post enrichment."
      tags:
        - "Profiles"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                profiles:
                  type: "array"
                  items:
                    type: "string"
                name:
                  type: "string"
                priority:
                  type: "number"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "profiles"
            example:
              name: "Q1 Leads Latest Post"
              profiles:
                - "https://www.linkedin.com/in/johndoe"
                - "https://www.linkedin.com/in/janedoe"
                - "johndoe123"
              priority: 2
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "3 latest post items have been enqueued (15 credits)."
                queueId: "507f1f77bcf86cd799439011"
                enqueued: 3
                skipped:
                  invalid: 0
                  duplicates: 0
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "Error Every entry in profiles was invalid or a duplicate after
            normalization, so no queue was created. One or more webhookTags do
            not match any webhook on the team."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "No valid profiles to enqueue: of 4 submitted, 1 were invalid and 3
                      were duplicates."
                no-valid-profiles-to-enqueue:
                  summary: "No valid profiles to enqueue"
                  value:
                    message: "Every entry in profiles was invalid or a duplicate after
                      normalization, so no queue was created."
                no-webhook-matches-webhooktags:
                  summary: "No webhook matches webhookTags"
                  value:
                    message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/company:
    post:
      operationId: "companies-sync"
      summary: "Enrich a company (sync)"
      description: "Enrich a single LinkedIn company right now and return the result
        directly."
      tags:
        - "Companies"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                company:
                  type: "string"
              required:
                - "company"
            example:
              company: "https://www.linkedin.com/company/acme-corp"
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                name: "Acme Corp"
                linkedinId: "1234567"
                linkedinSlug: "acme-corp"
                industry: "Software Development"
                website: "https://acme.example.com"
              schema:
                $ref: "#/components/schemas/Company"
        "400":
          description: "The input is not a LinkedIn company URL (linkedin.com/company/) or
            a bare slug, or the team's daily or monthly spending cap has been
            reached."
          content:
            application/json:
              example:
                message: "The input is not a LinkedIn company URL (linkedin.com/company/) or a
                  bare slug, or the team's daily or monthly spending cap has
                  been reached."
        "403":
          description: "Not enough credits on the team."
          content:
            application/json:
              example:
                message: "Not enough credits on the team."
        "404":
          description: "Error No company was found on LinkedIn for the given URL or slug."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "Company not found on LinkedIn"
                company-not-found-on-linkedin:
                  summary: "Company not found on LinkedIn"
                  value:
                    message: "No company was found on LinkedIn for the given URL or slug."
        "429":
          description: "More than 10 requests in 10 seconds for the team. The response
            carries Retry-After."
          content:
            application/json:
              example:
                message: "More than 10 requests in 10 seconds for the team. The response carries
                  Retry-After."
        "503":
          description: "No worker became available within 10 seconds, or the crawl could
            not be completed. Retry later."
          content:
            application/json:
              example:
                message: "No worker became available within 10 seconds, or the crawl could not
                  be completed. Retry later."
  /open-refresh/companies-bulk:
    post:
      operationId: "companies-bulk"
      summary: "Enqueue companies"
      description: "Enqueue LinkedIn companies for enrichment in bulk."
      tags:
        - "Companies"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                name:
                  type: "string"
                companies:
                  type: "array"
                  items:
                    type: "string"
                priority:
                  type: "number"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "name"
                - "companies"
                - "priority"
            example:
              name: "Company Enrichment Batch"
              companies:
                - "https://www.linkedin.com/company/acme-corp"
                - "https://www.linkedin.com/company/globex"
                - "acme-corp"
              priority: 2
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "3 items have been enqueued."
                queueId: "507f1f77bcf86cd799439011"
                enqueued: 3
                skipped:
                  invalid: 0
                  duplicates: 0
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "Error Every entry in companies was invalid or a duplicate after
            normalization, so no queue was created. One or more webhookTags do
            not match any webhook on the team."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "No valid companies to enqueue: of 4 submitted, 1 were invalid and 3
                      were duplicates."
                no-valid-companies-to-enqueue:
                  summary: "No valid companies to enqueue"
                  value:
                    message: "Every entry in companies was invalid or a duplicate after
                      normalization, so no queue was created."
                no-webhook-matches-webhooktags:
                  summary: "No webhook matches webhookTags"
                  value:
                    message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/post-by-url:
    post:
      operationId: "posts-by-url"
      summary: "Enqueue posts by URL"
      description: "Scrape individual LinkedIn posts from their own permalinks."
      tags:
        - "Posts"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                posts:
                  type: "array"
                  items:
                    type: "string"
                name:
                  type: "string"
                priority:
                  type: "number"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "posts"
            example:
              name: "Competitor Launch Posts"
              posts:
                - "https://www.linkedin.com/feed/update/urn:li:activity:7245678\
                  901234567890"
                - "https://www.linkedin.com/posts/johndoe_were-hiring-activity-\
                  7245678901234567891-Ab1c"
                - "https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7245\
                  678901234567892"
              priority: 2
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "3 post-by-url items have been enqueued (3 credits)."
                queueId: "507f1f77bcf86cd799439011"
                enqueued: 3
                skipped:
                  invalid: 0
                  duplicates: 0
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "Error Every entry in posts was invalid or a duplicate after
            normalization, so no queue was created. One or more webhookTags do
            not match any webhook on the team."
          content:
            application/json:
              examples:
                response:
                  summary: "Error"
                  value:
                    message: "No valid post urls to enqueue: of 4 submitted, 1 were invalid and 3
                      were duplicates."
                no-valid-post-urls-to-enqueue:
                  summary: "No valid post urls to enqueue"
                  value:
                    message: "Every entry in posts was invalid or a duplicate after normalization,
                      so no queue was created."
                no-webhook-matches-webhooktags:
                  summary: "No webhook matches webhookTags"
                  value:
                    message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/search:
    post:
      operationId: "sales-search"
      summary: "Search and enrich"
      description: "Discover and enrich profiles and companies from Sales Navigator
        search URLs."
      tags:
        - "Sales Navigator"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: "object"
              properties:
                name:
                  type: "string"
                salesNavigatorLinks:
                  type: "array"
                  items:
                    type: "object"
                    properties:
                      url:
                        type: "string"
                      limit:
                        type: "number"
                    required:
                      - "url"
                priority:
                  type: "number"
                withFollowersAndConnections:
                  type: "boolean"
                webhookTags:
                  type: "array"
                  items:
                    type: "string"
              required:
                - "name"
                - "salesNavigatorLinks"
                - "priority"
            example:
              name: "Sales Nav Search"
              salesNavigatorLinks:
                - url: "https://www.linkedin.com/sales/search/people?query=..."
                  limit: 500
              priority: 2
              withFollowersAndConnections: true
      responses:
        "200":
          description: "Success"
          content:
            application/json:
              example:
                message: "Sales Navigator Enrichment successfully requested"
                queueIds:
                  - "507f1f77bcf86cd799439011"
                webhooks:
                  - _id: "6512c1a4f1b2c3d4e5f60789"
                    name: "Production"
                    url: "https://api.example.com/hooks/up2data"
        "400":
          description: "One or more webhookTags do not match any webhook on the team."
          content:
            application/json:
              example:
                message: "One or more webhookTags do not match any webhook on the team."
  /open-refresh/list:
    get:
      operationId: "queues-list"
      summary: "List queue results"
      description: "List the enriched results of a queue."
      tags:
        - "Queues"
      parameters:
        - name: "queueId"
          in: "query"
          required: true
          schema:
            type: "string"
          description: "Required."
          example: "507f1f77bcf86cd799439011"
        - name: "page"
          in: "query"
          required: true
          schema:
            type: "string"
          description: "Required, 0-indexed."
          example: "0"
        - name: "limit"
          in: "query"
          required: true
          schema:
            type: "string"
          description: "Required, 1-25."
          example: "10"
        - name: "failed"
          in: "query"
          required: false
          schema:
            type: "boolean"
          description: "Optional, defaults to false."
      responses:
        "200":
          description: "Response schema"
          content:
            application/json:
              example:
                items: "Profile[] | Company[] | Activity[]"
                total: "number"
                totalResults: "number (Sales Navigator queues only)"
  /open-refresh/status:
    get:
      operationId: "queues-status"
      summary: "Check queue status"
      description: "Check the status of an enrichment queue."
      tags:
        - "Queues"
      parameters:
        - name: "queueId"
          in: "query"
          required: true
          schema:
            type: "string"
          example: "507f1f77bcf86cd799439011"
      responses:
        "200":
          description: "Response schema / Success"
          content:
            application/json:
              examples:
                response-schema:
                  summary: "Response schema"
                  value:
                    queueId: "string"
                    status: "string (\"pending\" | \"completed\")"
                    processed: "number"
                    total: "number"
                success:
                  summary: "Success"
                  value:
                    queueId: "507f1f77bcf86cd799439011"
                    status: "pending"
                    processed: 35
                    total: 50
components:
  securitySchemes:
    ApiKeyAuth:
      type: "apiKey"
      in: "header"
      name: "Authorization"
      description: "Exchange an API key for an access token with POST
        /api-auth/authenticate, then send that token here."
  schemas:
    Profile:
      description: "The enriched LinkedIn profile object, returned directly by
        profiles-sync or found in result when a callback's type is \"Profile\"."
      type: "object"
      properties:
        _id:
          type: "string"
        objectId:
          type: "number"
        linkedinId:
          type: "string"
        url:
          type: "string"
        fullUrl:
          type: "string"
        firstName:
          type: "string"
        lastName:
          type: "string"
        headline:
          type: "string"
        location:
          type: "string"
        summary:
          type: "string"
        imageUrl:
          type: "string"
        openToWork:
          type: "boolean"
        isPremium:
          type: "boolean"
        connectionsCount:
          type: "number"
        followersCount:
          type: "number"
        skills:
          type: "array"
          items:
            type: "string"
        publications:
          type: "array"
          items:
            type: "object"
            properties:
              name:
                type: "string"
              description:
                type: "string"
              url:
                type: "string"
              publisher:
                type: "string"
              publishedOn:
                type: "object"
                description: "{ year: number, month: number, day: number }"
              publicationId:
                type: "string"
              authors:
                type: "array"
                items:
                  type: "object"
                  properties:
                    name:
                      type: "string"
                    firstName:
                      type: "string"
                    lastName:
                      type: "string"
                    publicIdentifier:
                      type: "string"
                    headline:
                      type: "string"
        patents:
          type: "array"
          items:
            type: "object"
            properties:
              title:
                type: "string"
              patentNumber:
                type: "string"
              issuer:
                type: "string"
              issuedOn:
                type: "object"
                description: "{ year: number, month: number, day: number }"
              description:
                type: "string"
              patentId:
                type: "string"
              inventors:
                type: "array"
                items:
                  type: "object"
                  properties:
                    name:
                      type: "string"
                    firstName:
                      type: "string"
                    lastName:
                      type: "string"
                    publicIdentifier:
                      type: "string"
                    headline:
                      type: "string"
        awards:
          type: "array"
          items:
            type: "object"
            properties:
              title:
                type: "string"
              issuer:
                type: "string"
              issuedOn:
                type: "object"
                description: "{ year: number, month: number, day: number }"
              description:
                type: "string"
              honorId:
                type: "string"
              positionId:
                type: "string"
        experience:
          type: "array"
          items:
            type: "object"
            properties:
              positionId:
                type: "string"
              companyName:
                type: "string"
              title:
                type: "string"
              industry:
                type: "string"
              companyUrl:
                type: "string"
              companyLinkedinId:
                type: "string"
              description:
                type: "string"
              logo:
                type: "string"
              skills:
                type: "array"
              company:
                type: "string"
              start:
                type: "object"
                description: "{ year: number, month: number }"
              end:
                type:
                  - "object"
                  - "null"
                description: "{ year: number, month: number }"
        education:
          type: "array"
          items:
            type: "object"
            properties:
              educationId:
                type: "string"
              schoolName:
                type: "string"
              degreeName:
                type: "string"
              fieldOfStudy:
                type: "string"
              description:
                type: "string"
              logo:
                type: "string"
              start:
                type: "object"
                description: "{ year: number }"
              end:
                type: "object"
                description: "{ year: number }"
        certifications:
          type: "array"
          items:
            type: "object"
            properties:
              name:
                type: "string"
              authority:
                type: "string"
              companyId:
                type: "string"
              licenseNumber:
                type: "string"
              url:
                type: "string"
              start:
                type: "object"
                description: "{ year: number, month: number }"
              end:
                type: "object"
                description: "{ year: number, month: number }"
        languages:
          type: "array"
          items:
            type: "object"
            properties:
              name:
                type: "string"
              proficiency:
                type: "string"
        primaryLocale:
          type: "object"
          description: "{ country: string, language: string }"
        birthDateOn:
          type: "object"
          description: "{ month: number, day: number, year: number }"
        additionalDataJson:
          type: "object"
          description: "{ certificates: [], languages: [], projects: [] }"
        interests:
          type: "object"
          description: "{ companies: [], groups: [], influencers: [], newsletters: [],
            schools: [] }"
        recommendations:
          type: "object"
          description: "{ given: [], received: [] }"
        changeLog:
          type: "array"
          items:
            type: "object"
            properties:
              timestamp:
                type: "string"
              type:
                type: "string"
              description:
                type: "string"
              data:
                type: "object"
        createdAt:
          type: "string"
        updatedAt:
          type: "string"
    Company:
      description: "The enriched company object, returned directly by companies-sync
        or found in result when a callback's type is \"Company\". Includes
        LinkedIn data and Crunchbase data when available."
      type: "object"
      properties:
        _id:
          type: "string"
        name:
          type: "string"
        linkedinId:
          type: "string"
        linkedinSlug:
          type: "string"
        linkedin:
          type: "string"
        website:
          type: "string"
        logo:
          type: "string"
        industry:
          type: "string"
        location:
          type: "string"
        headquarters:
          type: "object"
          description: "{ country: string, city: string, postalCode: string, line1:
            string, line2: string, latitude: number, longitude: number }"
        tagline:
          type: "string"
        description:
          type: "string"
        shortDescription:
          type: "string"
        companyType:
          type: "string"
        numberOfEmployees:
          type: "number"
        employeesRange:
          type: "object"
          description: "{ from: number, to: number }"
        specialities:
          type: "array"
          items:
            type: "string"
        hubTags:
          type: "array"
          items:
            type: "string"
        activelyHiring:
          type: "boolean"
        phoneNumber:
          type: "string"
        legalName:
          type: "string"
        uuid:
          type: "string"
        rankOrgCompany:
          type: "number"
        foundedOn:
          type: "object"
          description: "{ year: number, month: number, day: number }"
        locationIdentifiers:
          type: "array"
          items:
            type: "object"
            properties:
              value:
                type: "string"
              type:
                type: "string"
        socialNetworks:
          type: "array"
          items:
            type: "object"
            properties:
              socialNetworkType:
                type: "string"
              url:
                type: "string"
        categories:
          type: "array"
          items:
            type: "string"
        categoryGroups:
          type: "array"
          items:
            type: "string"
        operatingStatus:
          type: "string"
        ipoStatus:
          type: "string"
        fundingStage:
          type: "string"
        fundingTotal:
          type: "object"
          description: "{ currency: string, amount: number }"
        equityFundingTotal:
          type: "object"
          description: "{ currency: string, amount: number }"
        numFundingRounds:
          type: "number"
        numInvestors:
          type: "number"
        numLeadInvestors:
          type: "number"
        lastFundingType:
          type: "string"
        lastEquityFundingType:
          type: "string"
        lastFundingAt:
          type: "object"
          description: "{ day: number, month: number, year: number }"
        lastFundingTotal:
          type: "object"
          description: "{ currency: string, amount: number }"
        fundingRounds:
          type: "array"
          items:
            type: "object"
            properties:
              announced_on:
                type: "string"
              num_investors:
                type: "number"
              investmentType:
                type: "string"
              money_raised:
                type: "object"
                description: "{ currency: string, amount: number }"
              identifier:
                type: "object"
                description: "{ value: string, image_id: string, permalink: string }"
              lead_investor_identifiers:
                type: "array"
                items:
                  type: "object"
                  description: "{ value: string, image_id: string, permalink: string }"
        investorIdentifiers:
          type: "array"
          items:
            type: "object"
            properties:
              name:
                type: "string"
        investorsList:
          type: "array"
          items:
            type: "object"
            properties:
              identifier:
                type: "object"
                description: "{ value: string, permalink: string }"
              funding_round_identifier:
                type: "object"
                description: "{ value: string, image_id: string, permalink: string }"
              investor_identifier:
                type: "object"
                description: "{ value: string, image_id: string, permalink: string }"
        ipoSummary:
          type: "object"
          properties:
            ipoSharePrice:
              type: "object"
              description: "{ value: number, currency: string, valueUsd: number }"
            stockLink:
              type: "object"
              description: "{ label: string, value: string }"
            wentPublicOn:
              type: "string"
        acquirerIdentifier:
          type: "object"
          description: "{ name: string }"
        acquisitionAnnouncedOn:
          type: "object"
          description: "{ day: number, month: number, year: number }"
        acquisitionPrice:
          type: "object"
          description: "{ currency: string, amount: number }"
        acquisitionType:
          type: "string"
        acquisitions:
          type: "array"
          items:
            type: "object"
            properties:
              acquiree_identifier:
                type: "object"
                description: "{ value: string, image_id: string, permalink: string, role: string
                  }"
              announced_on:
                type: "object"
                description: "{ value: string, precision: string }"
              identifier:
                type: "object"
                description: "{ value: string, image_id: string, permalink: string }"
              price:
                type: "object"
                description: "{ currency: string, amount: number }"
        lastKeyEmployeeChangeDate:
          type: "object"
          description: "{ day: number, month: number, year: number }"
        lastLayoffDate:
          type: "object"
          description: "{ day: number, month: number, year: number }"
        signalsLayoffs:
          type: "array"
          items:
            type: "object"
            properties:
              identifier:
                type: "object"
                description: "{ value: string }"
              activity_entities:
                type: "array"
                items:
                  type: "object"
                  description: "{ value: string, image_id: string, permalink: string }"
              activity_properties:
                type: "object"
                description: "{ url: string, title: string, author: string, publisher: string }"
              activity_date:
                type: "string"
        createdAt:
          type: "string"
        updatedAt:
          type: "string"
    Activity:
      description: "One document per profile from profiles-activity, holding the posts
        it published, the comments it left and the posts it reacted to. A repost
        is not a separate list - it is a post with isRepost set and the original
        in repostedPost."
      type: "object"
      properties:
        _id:
          type: "string"
        profile:
          $ref: "#/components/schemas/Profile"
        linkedinObjectId:
          type: "number"
        profileUrn:
          type: "string"
        slug:
          type: "string"
        profileUrl:
          type: "string"
        scrapedAt:
          type: "string"
        partial:
          type: "object"
          description: "{ posts: boolean, comments: boolean, reactions: boolean }"
        posts:
          type: "array"
          items:
            type: "object"
            properties:
              url:
                type: "string"
              urn:
                type: "string"
              shareUrn:
                type: "string"
              author:
                type: "object"
                description: "{ name: string, url: string, headline: string, avatarUrl: string
                  }"
              text:
                type: "string"
              postedAt:
                type: "string"
              reactionsCount:
                type: "number"
              commentsCount:
                type: "number"
              repostsCount:
                type: "number"
              reactionsByType:
                type: "array"
                items:
                  type: "object"
                  description: "{ type: string, count: number }"
              contentType:
                type: "string"
              media:
                type: "array"
                items:
                  type: "object"
                  properties:
                    type:
                      type: "string"
                    url:
                      type: "string"
                    thumbnailUrl:
                      type: "string"
                    title:
                      type: "string"
                    durationMs:
                      type: "number"
              article:
                type: "object"
                description: "{ title: string, subtitle: string, url: string, thumbnailUrl:
                  string }"
              isRepost:
                type: "boolean"
              repostedPost:
                type: "string"
                description: "TargetPost"
              isEdited:
                type: "boolean"
              mentions:
                type: "array"
                items:
                  type: "object"
                  properties:
                    name:
                      type: "string"
                    publicIdentifier:
                      type: "string"
                    url:
                      type: "string"
                    urn:
                      type: "string"
              companyMentions:
                type: "array"
                items:
                  type:
                    - "string"
                    - "object"
                  description: "Mention"
              hashtags:
                type: "array"
                items:
                  type: "string"
        comments:
          type: "array"
          items:
            type: "object"
            properties:
              urn:
                type: "string"
              url:
                type: "string"
              text:
                type: "string"
              postedAt:
                type: "string"
              repliesCount:
                type: "number"
              targetPost:
                type: "string"
                description: "TargetPost"
        reactions:
          type: "array"
          items:
            type: "object"
            properties:
              reactionType:
                type: "string"
              reactedAt:
                type: "string"
              targetPost:
                type: "string"
                description: "TargetPost"
        createdAt:
          type: "string"
        updatedAt:
          type: "string"
    Post:
      description: "The most recent item a profile has published, returned by
        profiles-latest-post: one document per profile holding a single post,
        repost, reaction or comment. In a webhook callback the post fields sit
        under result.post next to result.profile."
      type: "object"
      properties:
        _id:
          type: "string"
        profile:
          $ref: "#/components/schemas/Profile"
        linkedinObjectId:
          type: "number"
        slug:
          type: "string"
        profileUrl:
          type: "string"
        content:
          type: "string"
        date:
          type: "string"
        type:
          type: "string"
        isOwnContent:
          type: "boolean"
        originalAuthor:
          type: "string"
        originalContent:
          type: "string"
        scrapedAt:
          type: "string"
        createdAt:
          type: "string"
        updatedAt:
          type: "string"
    PostByUrl:
      description: "A single LinkedIn post scraped from its own permalink by
        posts-by-url, keyed by the post's own URN. There is no profile field -
        the author arrives embedded in post.author."
      type: "object"
      properties:
        _id:
          type: "string"
        urn:
          type: "string"
        shareUrn:
          type: "string"
        postUrl:
          type: "string"
        requestedUrl:
          type: "string"
        post:
          type: "object"
        scrapedAt:
          type: "string"
        createdAt:
          type: "string"
        updatedAt:
          type: "string"
    CallbackItem:
      description: "The envelope every webhook POST body item carries. type says what
        kind of record result holds."
      type: "object"
      properties:
        queueId:
          type: "string"
        name:
          type: "string"
        url:
          type: "string"
        type:
          type: "string"
        status:
          type: "number"
        _id:
          type: "string"
        totalResults:
          type: "number"
        result:
          type: "object"
