Lead

Lead

Lead endpoints

Get All

Description


Get all leads.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

Responses


Type:

Array of Lead objects


Example:

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Invalid Role",
    message: "You do not have the required role to access this resource",
    status: 401
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Entity not found",
    message: "Entity not found",
    status: 404
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Internal Server Error",
    message: "Internal Server Error",
    status: 500
}

get

/institution/:institutionId/lead/

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/ \
    -X GET \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Get by id

Description


Find the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the lead

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Lead object


Example:

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Invalid Role",
    message: "You do not have the required role to access this resource",
    status: 401
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Entity not found",
    message: "Entity not found",
    status: 404
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Internal Server Error",
    message: "Internal Server Error",
    status: 500
}

get

/institution/:institutionId/lead/:leadId

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId \
    -X GET \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Create

Description


Create a lead.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

Responses


Type:

Lead object


Example:

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Invalid Role",
    message: "You do not have the required role to access this resource",
    status: 401
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Entity not found",
    message: "Entity not found",
    status: 404
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Internal Server Error",
    message: "Internal Server Error",
    status: 500
}

post

/institution/:institutionId/lead/

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/ \
    -X POST \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Update

Description


Update the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the application

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Lead object


Example:

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Invalid Role",
    message: "You do not have the required role to access this resource",
    status: 401
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Entity not found",
    message: "Entity not found",
    status: 404
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Internal Server Error",
    message: "Internal Server Error",
    status: 500
}

put

/institution/:institutionId/lead/:leadId

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId \
    -X PUT \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Update Image

Description


Update the image of the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the lead

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Lead object


Example:

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

put

/institution/:institutionId/lead/:leadId/image

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId/image \
    -X PUT \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Delete

Description


Delete the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the lead

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Lead object


Example:

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Invalid Role",
    message: "You do not have the required role to access this resource",
    status: 401
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Entity not found",
    message: "Entity not found",
    status: 404
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Internal Server Error",
    message: "Internal Server Error",
    status: 500
}

delete

/institution/:institutionId/lead/:leadId

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId \
    -X DELETE \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Archive

Description


Archive the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the lead

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Lead object


Example:

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

put

/institution/:institutionId/lead/:leadId/archive

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId/archive \
    -X PUT \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Unarchive

Description


Unarchive the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the lead

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Lead object


Example:

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

put

/institution/:institutionId/lead/:leadId/unarchive

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId/unarchive \
    -X PUT \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    firstname: "John",
    lastname: "Doe",
    email: "john.doe@example.com",
    phone: "555-555-5555",
    company: "Acme Inc.",
    createdAt: "2023-05-17T12:00:00Z",
    updatedAt: "2023-05-17T12:00:00Z"
}

Get Events

Description


Get the events of the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the lead

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Event object


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    type: "updated",
    message: "User 0f9c0b0b4f0c6b0017f0e3b1 updated forwarder 0f9c0b0b4f0c6b0017f0e3b1",
    user: "0f9c0b0b4f0c6b0017f0e3b1",
    entity: "0f9c0b0b4f0c6b0017f0e3b1",
    entityType: "Application",
    refs: [
        {
            entity: "0f9c0b0b4f0c6b0017f0e3b1",
            entityType: "Application"
        },
        {
            entity: "0f9c0b0b4f0c6b0017f0e3b1",
            entityType: "Business"
        }
    ]
}

get

/institution/:institutionId/lead/:leadId/events

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId/events \
    -X GET \
    -H 'Authorization: Bearer <token>' \
    

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    type: "updated",
    message: "User 0f9c0b0b4f0c6b0017f0e3b1 updated forwarder 0f9c0b0b4f0c6b0017f0e3b1",
    user: "0f9c0b0b4f0c6b0017f0e3b1",
    entity: "0f9c0b0b4f0c6b0017f0e3b1",
    entityType: "Application",
    refs: [
        {
            entity: "0f9c0b0b4f0c6b0017f0e3b1",
            entityType: "Application"
        },
        {
            entity: "0f9c0b0b4f0c6b0017f0e3b1",
            entityType: "Business"
        }
    ]
}

Get Documents

Description


Get the documents of the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the lead

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Error object


Example:

1
2
3
4
5
{
    name: "Invalid Role",
    message: "You do not have the required role to access this resource",
    status: 401
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Entity not found",
    message: "Entity not found",
    status: 404
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Internal Server Error",
    message: "Internal Server Error",
    status: 500
}

get

/institution/:institutionId/lead/:leadId/documents

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId/documents \
    -X GET \
    -H 'Authorization: Bearer <token>' \
    

Response

1

Send Lead User Invite

Description


Send the lead user invite to the lead that matches the {leadId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

leadId

string

Required

Description:

The id of the lead

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Error object


Example:

1
2
3
4
5
{
    name: "Invalid Role",
    message: "You do not have the required role to access this resource",
    status: 401
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Entity not found",
    message: "Entity not found",
    status: 404
}

Type:

Error object


Example:

1
2
3
4
5
{
    name: "Internal Server Error",
    message: "Internal Server Error",
    status: 500
}

post

/institution/:institutionId/lead/:leadId/send-user-invite

Request

1
2
3
4
curl https://app.fassport.co/api/v1/institution/:institutionId/lead/:leadId/send-user-invite \
    -X POST \
    -H 'Authorization: Bearer <token>' \
    

Response

1

Copyright © Fassport 2025 • Terms • Privacy •