Docs
Get API key

Lists

Move leads to another list

POST/lists/{listId}/leads/move

Moves people from this list to another: they join that list and leave this one. Send up to 1,000 leads, or all: true for everyone in the list. A campaign that already has them keeps going.

Try itSend a real request with your API key

This changes your workspace, as the same change in the app would. Your key stays in this page and goes only to Salesteam.

Path

  • listIdstringRequired

    The list they’re in now.

Headers

  • Idempotency-Keystring

    Any unique value up to 255 characters, like a UUID. The request runs once; repeats within 24 hours get the first answer, with Idempotent-Replayed: true. Up to 255 characters.

Body

  • toListIdstringRequired

    The list they go to.

  • leadsarray of LeadReference or null

    Up to 1,000.

    Each item
    • leadIdstring or null

      Up to 180 characters.

    • idstring or null

      The same as leadId. Up to 180 characters.

    • linkedinUrlstring or null

      Up to 1,000 characters.

    • emailstring · email or null

      Up to 254 characters.

  • allboolean or null

    true: everyone in the list. One of true.

Answer

200 OK What was moved.

  • dataMoveLeadsResultRequired
    Inside it
    • fromobjectRequired
      Inside it
      • idstringRequired
      • namestringRequired
    • toobjectRequired
      Inside it
      • idstringRequired
      • namestringRequired
    • movedinteger

      Move: how many left this list for the other.

    • copiedinteger

      Copy: how many are in both lists now.

    • alreadyInListintegerRequired

      Of those, how many were in the other list already.

    • skippedintegerRequired
    • resultsarray of MemberResult

      One per lead sent; left out for all: true.

      Each item
      • indexintegerRequired
      • leadIdstring or nullRequired
      • statusstringRequired

        One of removed, moved, copied, skipped.

      • reasonstring

        One of not_in_list, not_found, ambiguous_email, duplicate_in_request, invalid_request.

      • messagestring
      • notestring

        Set when the person is still in a campaign that uses the list: taking them off the list doesn’t stop it.

Errors

  • 400 Bad requestinvalid_request invalid_json duplicate_in_request
  • 401 Unauthorizedunauthorized
  • 404 Not foundnot_found not_in_campaign
  • 409 Conflictconflict idempotency_in_progress workspace_busy campaign_finished campaign_without_list tag_limit lead_has_history campaign_not_launched campaign_cannot_resume ambiguous_email
  • 413 Too largetoo_large
  • 415 Wrong content typeunsupported_media_type
  • 422 Can’t processidempotency_key_reused
  • 429 Too many requestsrate_limited
  • 500 Server errorserver_error

Every error has the same shape. See Errors.

POST /lists/{listId}/leads/move
curl -X POST "https://app.salesteam.dev/api/v1/lists/LIST_ID/leads/move" \
  -H "Authorization: Bearer $SALESTEAM_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "toListId": "list_77c2",
  "leads": [
    {
      "leadId": "lead_8f2c"
    }
  ]
}'
200 answer
{
  "data": {
    "from": {
      "id": "id_7Qm2xT9a",
      "name": "Founders Q4"
    },
    "to": {
      "id": "id_7Qm2xT9a",
      "name": "Founders Q4"
    },
    "moved": 1,
    "copied": 1,
    "alreadyInList": 1,
    "skipped": 1,
    "results": [
      {
        "index": 1,
        "leadId": "lead_7Qm2xT9a",
        "status": "removed",
        "reason": "not_in_list",
        "message": "This campaign wasn’t found in this workspace.",
        "note": "note"
      }
    ]
  }
}