Leadspace Intent Only API

Refreshes buyer-intent values for accounts, returning top surging intent topics and scored intent-modeling projects sourced from Leadspace Intent or Bombora, on a weekly cadence.

OpenAPI Specification

leadspace-intent-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Leadspace Intent Only API
  description: >-
    The Leadspace Intent Only API refreshes buyer-intent values for accounts. It
    accepts a bulk of companies, returns a polling URI, and yields surging
    intent topics plus scored intent-modeling projects sourced from Leadspace
    Intent or Bombora. This document was generated by API Evangelist from
    Leadspace's published technical specifications; Leadspace does not publish a
    machine-readable OpenAPI definition.
  version: '1.0'
  contact:
    name: Leadspace Support
    url: https://support.leadspace.com/hc/en-us
    email: support@leadspace.com
  termsOfService: https://www.leadspace.com/service-support-terms
externalDocs:
  description: Leadspace Intent Only API documentation
  url: https://support.leadspace.com/hc/en-us/articles/360012583400-Leadspace-Intent-Only-API
servers:
  - url: https://apigw.leadspace.com
    description: Leadspace API gateway (production)
tags:
  - name: Intent
    description: Buyer-intent scoring and refresh
  - name: Results
    description: Polling for asynchronous intent results
security:
  - bearerAuth: []
paths:
  /v1/intent/score/:
    post:
      operationId: scoreCompanyIntent
      summary: Submit companies for intent scoring
      description: >-
        Submits a bulk of companies for intent refresh. Company name is
        required. Returns a polling URI.
      tags:
        - Intent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntentRequest'
      responses:
        '202':
          description: The bulk job has successfully been accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntentAccepted'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '427':
          $ref: '#/components/responses/InsufficientCredits'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/intent/results/{jobId}:
    get:
      operationId: getIntentResults
      summary: Poll for intent scoring results
      tags:
        - Results
      parameters:
        - name: jobId
          in: path
          required: true
          description: The Leadspace bulk identifier returned when the job was accepted
          schema:
            type: string
      responses:
        '200':
          description: Intent results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntentResults'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Authorization header in the form 'Bearer API_KEY'
  responses:
    BadRequest:
      description: >-
        The request failed due to insufficient basic input, or the JSON format
        is invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized request (wrong credentials or credentials have expired)
    InsufficientCredits:
      description: Insufficient credits or program ID is invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    IntentRequest:
      type: object
      required: [data]
      properties:
        data:
          type: array
          items:
            type: object
            properties:
              company:
                $ref: '#/components/schemas/IntentCompanyInput'
              external_id:
                type: string
        external_bulk_id:
          type: string
    IntentCompanyInput:
      type: object
      required: [name]
      properties:
        name:
          type: string
          description: Name of the company (required)
        website:
          type: string
        phone:
          type: string
        address:
          type: object
          properties:
            country:
              type: string
            state:
              type: string
            city:
              type: string
    IntentAccepted:
      type: object
      properties:
        id:
          type: string
          description: The polling endpoint URI to extract the bulk results
          examples: ['/v1/intent/results/a4b6e123-8905-4dff-a966-50c3ce8f78ft']
    IntentResults:
      type: object
      properties:
        status:
          type: string
          enum: [Success, Failure]
        external_id:
          type: string
        data:
          $ref: '#/components/schemas/IntentData'
    IntentData:
      type: object
      properties:
        status:
          type: string
          enum: [Success, Failure]
        domain_used:
          type: string
        domain_intent:
          type: string
          description: >-
            Company's top surging intent topics; "No Surging Topics" when empty
        intent_modeling_scores:
          type: object
          properties:
            project_name:
              type: string
            project_score:
              type: string
              description: >-
                By default 0-1 No Intent, 1-75 Low, 75-95 Medium, 95-100 High
            surging_topics:
              type: array
              items:
                type: string
    Error:
      type: object
      properties:
        error:
          type: string
        tracking_id:
          type: string
        request_timestamp:
          type: string
        details:
          type: string