Campaign

Campaign

Campaign endpoints

Get All

Description


Get all marketing campaigns.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

Responses


Type:

Array of Campaign objects


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

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/campaign/

Request

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

Get by id

Description


Find the campaign that matches the {campaignId} query parameter.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

campaignId

string

Required

Description:

The id of the campaign

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Campaign object


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

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/campaign/:campaignId

Request

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

Create

Description


Create a campaign.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

Responses


Type:

Campaign object


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

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/campaign/

Request

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

Update

Description


Update a campaign.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

Responses


Type:

Campaign object


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

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/campaign/:campaignId

Request

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

Update Status

Description


Update the status of a campaign.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

campaignId

string

Required

Description:

The id of the campaign

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Campaign object


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

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/campaign/:campaignId/status

Request

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

Delete

Description


Delete a campaign.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

campaignId

string

Required

Description:

The id of the campaign

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Campaign object


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

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/campaign/:campaignId

Request

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

Archive

Description


Archive a campaign.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

campaignId

string

Required

Description:

The id of the campaign

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Campaign object


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

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/campaign/:campaignId/archive

Request

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

Unarchive

Description


Unarchive a campaign.

Parameters


headers

Authorization

string

Required

Description:

Bearer token - JWT

Example:

"Bearer <token>"

params

campaignId

string

Required

Description:

The id of the campaign

Example:

"0f9c0b0b4f0c6b0017f0e3b1"

Responses


Type:

Campaign object


Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

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/campaign/:campaignId/unarchive

Request

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

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    _id: "0f9c0b0b4f0c6b0017f0e3b1",
    institution: "1a2b3c4d5e6f7g8h9i0j1k2l",
    pipelines: [
        "0f9c0b0b4f0c6b0017f0e3b1"
    ],
    name: "Q4 Growth Campaign",
    description: "End of year marketing campaign targeting new investors",
    status: "active",
    startDate: "2025-01-18T06:04:42.114Z",
    endDate: "2025-01-18T06:04:42.114Z",
    metrics: {},
    createdAt: "2025-01-18T06:04:42.114Z",
    updatedAt: "2025-01-18T06:04:42.114Z"
}

Copyright © Fassport 2025 • Terms • Privacy •