Prospects / TypeScript SDK

Add prospects bulk

Add multiple prospects to a campaign at once. Maximum 1000 per request. Each prospect must include a valid linkedinUrl (https://linkedin.com/in/<slug>); firstName/lastName/email/company/position are optional. Custom fields beyond those are stored as customFields. For imports >1000, chunk client-side: omit prospectListId on the first call to create a list (response returns prospectListId), then pass that same prospectListId on subsequent calls so all chunks land in the same list. The Pipeline CLI exposes a sugar wrapper `pipeline import-prospects --file leads.csv --campaign-id X` that handles the chunking automatically. Returns { added, failed, errors, prospectListId }.

pipeline.addProspectsBulkDeterministic operation

Parameters

workspaceIdOptional · string
Optional workspace ID or slug. Required when this credential can access multiple workspaces and no workspace was configured on the client.
campaignIdRequired · string
See the input schema for this field.
prospectsRequired · array
See the input schema for this field.
prospectListIdOptional · string
Optional. Append to this existing prospect list instead of creating a new one. Returned in the response of the first chunk - pass it back on subsequent chunks of a paginated import.
prospectListNameOptional · string
Optional. Custom name for the prospect list created when prospectListId is omitted.
Request example
await pipeline.addProspectsBulk({
  "campaignId": "00000000-0000-4000-8000-000000000000",
  "prospects": [
    {}
  ]
})
Full input schema
Input schema
{
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "minLength": 1,
      "description": "Optional workspace ID or slug. Required when this credential can access multiple workspaces and no workspace was configured on the client."
    },
    "campaignId": {
      "type": "string"
    },
    "prospects": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1000,
      "items": {
        "type": "object",
        "properties": {
          "linkedinUrl": {
            "type": "string"
          },
          "firstName": {
            "type": "string"
          },
          "lastName": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "company": {
            "type": "string"
          },
          "position": {
            "type": "string"
          },
          "customFields": {
            "type": "object",
            "description": "Per-lead custom variables. Values must be strings, numbers, booleans, or null. Pre-render variables inside imported message values.",
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean",
                "null"
              ]
            }
          },
          "custom_fields": {
            "type": "object",
            "description": "Alias of customFields.",
            "additionalProperties": {
              "type": [
                "string",
                "number",
                "boolean",
                "null"
              ]
            }
          }
        },
        "additionalProperties": true
      }
    },
    "prospectListId": {
      "type": "string",
      "description": "Optional. Append to this existing prospect list instead of creating a new one. Returned in the response of the first chunk - pass it back on subsequent chunks of a paginated import."
    },
    "prospectListName": {
      "type": "string",
      "description": "Optional. Custom name for the prospect list created when prospectListId is omitted."
    }
  },
  "required": [
    "campaignId",
    "prospects"
  ]
}
See this operation inCLI MCP REST API
TypeScript SDK | Pipeline v2 preview