---
title: "Preview Routing"
method: POST
path: "/v1.0/leads/assignee"
tags: ["Leads"]
---

# Preview Routing

`POST /v1.0/leads/assignee`

Returns the assignees that would be selected by routing rules for a hypothetical lead matching the supplied name, email and other attributes. Useful for previewing routing before creating the lead.

Notes:
- firstName and email are required.
- The response lists one entry per role matched by routing.

## Headers

- `Authorization` string, required
- `Content-Type` string, required

## Request body

- LeadAssigneeRequest — Hypothetical lead info used to resolve assignees.
  - `firstName` string, required — The first name of the lead
  - `lastName` string — The last name of the lead
  - `email` string, required — The email address associated with the lead
  - `phone` string — The phone number associated with the lead. (No more than 20 characters per phone）
  - `birthday` string — The birthday of the lead(pattern:MMM d, yyyy)

## Response `200`

Assignee matches for the supplied lead info.

- LeadCustomRoleAssigneeInfo[]
  - `leadId` integer — leadId
  - `leadUserId` integer — leadUserId
  - `firstName` string — lead firstName
  - `lastName` string — lead lastName
  - `customRoleAssignees` CustomRoleAssignee[] — lead customRoleAssignees
    - `agentFullName` string — Agent Full Name
    - `roleId` integer — The ID of this custom role
    - `role` string — The name of this custom role
    - `assigneeId` integer — The user id of this custom role
    - `assignee` string — The user account of this custom role
    - `permissionProfileName` string — The permission profile name of this custom role

## Other responses

- `400` — firstName missing (PARAM_FIRST_NAME_FILL) or email missing (PARAM_EMAIL_MUST_FILL).
- `401` — Missing or invalid authentication token.
- `500` — Internal server error.

---

[API](https://skmtc.net/lofty/apis/lofty-service-open-apis.md) · [All operations](https://skmtc.net/lofty/apis/lofty-service-open-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lofty/lofty-service-open-apis/versions/23e640467118/schema)
