openapi: 3.1.0 info: title: Leadspace Authorization Discovery API description: The Leadspace Discovery (Expansion) API finds net-new contacts inside target accounts. A bulk request expands up to 500 accounts, ranking discovered people against persona, region, and required-contact-information criteria, and returns a polling URI for asynchronous retrieval. This document was generated by API Evangelist from Leadspace's published technical specifications; Leadspace does not publish a machine-readable OpenAPI definition. version: '2.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 servers: - url: https://apigw.leadspace.com description: Leadspace API gateway (production) security: - bearerAuth: [] tags: - name: Discovery description: Bulk account expansion into net-new contacts paths: /v2/expansion/company: post: operationId: discoverCompanyContacts summary: Submit a bulk account discovery (expansion) job description: Expands up to 500 accounts into ranked contacts. Either companyName or companyWebsite is mandatory for each account. tags: - Discovery requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DiscoveryRequest' responses: '202': description: Bulk job successfully accepted content: application/json: schema: $ref: '#/components/schemas/DiscoveryAccepted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': description: Program ID is invalid '427': $ref: '#/components/responses/InsufficientCredits' '500': $ref: '#/components/responses/ServerError' callbacks: discoveryComplete: '{$request.body#/callbackUrl}': post: operationId: discoveryCompleteCallback summary: Discovery completion callback requestBody: content: application/json: schema: $ref: '#/components/schemas/DiscoveryCallback' responses: '200': description: Callback acknowledged components: schemas: DiscoveryContactCriteria: type: object properties: persona: type: array maxItems: 5 description: Persona criteria used to rank discovery results items: type: string contactRegions: type: array items: type: string contactCountries: type: array items: type: string contactState: type: array items: type: string Error: type: object properties: error: type: string tracking_id: type: string request_timestamp: type: string details: type: string RequiredResultsFields: type: object properties: directPhone: type: boolean companyPhone: type: boolean verifiedEmail: type: boolean DiscoveryAccepted: type: object properties: id: type: string description: The polling endpoint URI to extract the bulk results examples: - /v1/expansion/results/a4b6e123-8905-4dff-a966-50c3ce8f78ft DiscoveryAccount: type: object description: Either companyName or companyWebsite is mandatory properties: companyName: type: string companyWebsite: type: string companylinkedinUrl: type: string DiscoveryItem: type: object properties: account: $ref: '#/components/schemas/DiscoveryAccount' contact: $ref: '#/components/schemas/DiscoveryContactCriteria' requiredResultsFields: $ref: '#/components/schemas/RequiredResultsFields' limits: type: object properties: resultPerAccount: type: integer minimum: 1 maximum: 100 default: 10 description: Max leads retrieved per expanded account location: type: object properties: country: type: string description: Required person location. Multiple values are comma delimited. Omit entirely to receive all locations. external_id: type: string DiscoveryCallback: type: object properties: bulkId: type: string callbackMethod: type: object properties: callbackUrl: type: string pollingUrl: type: string bulkStatus: type: string DiscoveryRequest: type: object required: - data properties: data: type: array maxItems: 500 description: Up to 500 accounts per bulk request items: $ref: '#/components/schemas/DiscoveryItem' external_bulk_id: type: string callbackUrl: type: string description: URL Leadspace calls back when bulk processing completes responses: InsufficientCredits: description: Insufficient credits to process this request content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Unauthorized request (wrong credentials or credentials have expired) ServerError: description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Request fails basic input validation or JSON format is invalid content: application/json: schema: $ref: '#/components/schemas/Error' securitySchemes: bearerAuth: type: http scheme: bearer description: Authorization header in the form 'Bearer API_KEY' externalDocs: description: Leadspace Discovery API documentation url: https://support.leadspace.com/hc/en-us/articles/360011926619-Leadspace-Discovery-API