> ## Documentation Index
> Fetch the complete documentation index at: https://api.lensmor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get contact unlock task

> Poll an email-unlock task created by the contact email submission endpoint.

Store the returned `task_id` and use it here to make the workflow resumable across background jobs, frontend refreshes, or retries. Continue polling while `taskStatus` is `pending` or `processing`, then stop when it reaches `completed` or `failed`. Use a controlled polling interval and treat each read as a status check, not a new unlock request.

Task completion does not guarantee an email for every submitted person. Process item-level status, email, and error information independently, persist successful results, and do not retry the same task after it reaches a terminal state.



## OpenAPI

````yaml /openapi.json get /external/contacts/unlock-tasks/{taskId}
openapi: 3.1.0
info:
  title: Lensmor API
  version: 0.27.0
  description: >-
    Lensmor Event Intelligence API for event discovery, exhibitor research,
    personnel lookup, credits, and profile matching.
  license:
    name: Lensmor Terms of Service
    url: https://www.lensmor.com/terms
servers:
  - url: https://platform.lensmor.com
security:
  - bearerAuth: []
tags:
  - name: Credits
    description: Inspect the credit balance available to the authenticated API key owner.
  - name: Actions
    description: Preflight access and credit-sensitive actions before executing them.
  - name: Events
    description: Discover, inspect, score, rank, and unlock trade show event records.
  - name: Exhibitors
    description: Search and inspect exhibiting companies and their related events.
  - name: Personnel
    description: >-
      Browse event personnel, related events, LinkedIn activity, and outreach
      content.
  - name: Contacts
    description: Search contacts and run asynchronous email or phone unlock workflows.
  - name: Profile Matching
    description: Apply a buyer profile to rank events and recommend exhibitors.
paths:
  /external/contacts/unlock-tasks/{taskId}:
    get:
      tags:
        - Contacts
      summary: Get contact unlock task
      description: >-
        Poll an email-unlock task created by the contact email submission
        endpoint.


        Store the returned `task_id` and use it here to make the workflow
        resumable across background jobs, frontend refreshes, or retries.
        Continue polling while `taskStatus` is `pending` or `processing`, then
        stop when it reaches `completed` or `failed`. Use a controlled polling
        interval and treat each read as a status check, not a new unlock
        request.


        Task completion does not guarantee an email for every submitted person.
        Process item-level status, email, and error information independently,
        persist successful results, and do not retry the same task after it
        reaches a terminal state.
      operationId: getContactUnlockTask
      parameters:
        - name: taskId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9]+$
          description: >-
            Email-unlock task identifier returned as `task_id` by the submission
            endpoint.
          example: '321'
      responses:
        '200':
          description: Unlock task status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContactUnlockTask'
              example:
                taskId: '321'
                taskStatus: processing
                items:
                  - personnelId: '789'
                    status: unlocked
                    email: jane@acme.example
                  - personnelId: '790'
                    status: processing
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    ContactUnlockTask:
      type: object
      required:
        - taskId
        - taskStatus
        - items
      properties:
        taskId:
          type: string
          description: Asynchronous task identifier.
          pattern: ^[0-9]+$
          example: '321'
        taskStatus:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          description: Current task lifecycle state.
        items:
          type: array
          items:
            type: object
            required:
              - personnelId
              - status
            properties:
              personnelId:
                type: string
                description: >-
                  Personnel Id returned as part of this contact unlock task
                  object.
              status:
                type: string
                enum:
                  - pending
                  - processing
                  - unlocked
                  - failed
                description: >-
                  Current normalized status for the submission, task, or
                  generated content.
              email:
                type:
                  - string
                  - 'null'
                description: Email address when already accessible; otherwise `null`.
              errorCode:
                type: string
                description: >-
                  Error Code returned as part of this contact unlock task
                  object.
          description: Records returned on the current page or in the current batch.
      description: Asynchronous email unlock task and its item-level results.
    ApiError:
      type: object
      required:
        - code
        - message
        - errorKey
        - traceId
      properties:
        code:
          type: integer
          description: >-
            Numeric or symbolic code that identifies the response or business
            condition.
        message:
          type: string
          description: >-
            Human-readable explanation suitable for logs or user-facing error
            handling.
        errorKey:
          type: string
          description: Stable machine-readable error key for branching and analytics.
        traceId:
          type: string
          description: Request trace identifier to include in support or incident reports.
        details:
          description: >-
            Optional structured business or validation context. Omitted when the
            error has no additional details.
      description: Shared error envelope returned by public Lensmor API endpoints.
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            code: 401
            message: Invalid API key
            errorKey: INVALID_API_KEY
            traceId: 2be6d7f4-3b2d-4d11-8e2d-7a2e4c3e9a10
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            code: 404
            message: Resource not found
            errorKey: NOT_FOUND
            traceId: 2be6d7f4-3b2d-4d11-8e2d-7a2e4c3e9a10
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            code: 429
            message: Rate limit exceeded
            errorKey: RATE_LIMIT_EXCEEDED
            traceId: 2be6d7f4-3b2d-4d11-8e2d-7a2e4c3e9a10
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Business sk API key
      description: >-
        Send the full Business API key from Settings -> API Keys, for example
        `Authorization: Bearer sk_your_api_key`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.