Welcome to the GenPage External API documentation. This guide will help you integrate with our platform and access our powerful features programmatically.
Visit https://app.genpage.ai and create your account.
All API requests should be made to:
Need a test account? If you're a developer requiring a test account, please contact us at team@genpage.ai and we'll be happy to help you get started.
Include your Bearer API token in the Authorization
header of all requests, like this:
This documentation aims to provide all the information you need to work with our API.
This documentation provides comprehensive information for working with our API, including:
Ready to get started? Explore the endpoints below to begin integrating with GenPage!
Have the user get the Bearer API token from the GenPage website.
Call /workspaces/get-list
to get the list of workspaces the user has access to. The workspace value has to be added to most calls, to specify which workspace this applies to.
Call /campaigns/get-list
and /audiences/get-list
. Let the user select which campaign and audience they want to add the leads to.
Call the /workspaces/get-variable-list
endpoint to get the list of all the existing variables / columns for that workspace.
Use the response to know which columns already exists, and to do a mapping between values in your system and the GenPage system. These keys should be used when calling Upsert lead.
Note that Upsert lead accepts keys that does not exist yet, it will then create new columns/variables with that key name.
Call the Upsert (update or insert) endpoint. You will get a JobId in return. Send the following data:
Check the status of the job by calling the /leads/get-status
endpoint with the JobId you received from /leads/upsert
.
Get the latest value of the leads by calling /leads/get-leads
.
In the response from /leads/get-leads
, you will get a genpage_url
- this is the URL to the custom GenPage's that have been generated.
To authenticate requests, include a Authorization
header with the value "Bearer <Token>"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
This endpoint is used to get the list of audiences.
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/audiences/get-list" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"workspace_id\": 16
}"
{
"audiences": [
{
"id": 1,
"name": "Default Audience"
}
]
}
This endpoint returns the generated token to be used in the external integration.
curl --request POST \
"https://backend.genpage.ai/api/external/v1/generate-api-token" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"b\",
\"workspace_id\": 16
}"
{
"token": "Bearer <Bearer token>"
}
This endpoint is used to test the authentication.
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/hello-world" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
{
"message": "Hello World"
}
This endpoint is used to get the list of campaigns.
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/campaigns/get-list" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"workspace_id\": 16
}"
{
"campaigns": [
{
"id": 1,
"name": "Test Campaign 1",
"slug": "test-campaign-1"
},
{
"id": 2,
"name": "Saas Outreach",
"slug": "saas-outreach"
}
]
}
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/get-api-tokens" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"workspace_id\": 16
}"
curl --request DELETE \
"https://backend.genpage.ai/api/external/v1/delete-api-token" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"token_id\": \"architecto\"
}"
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/hello-world-user" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
This endpoint is used to upsert (update or insert) leads.
The leads are sent in the request body. The leads are an array of objects. The leads.*.values are key/value pairs with the values of the lead.
To create a new lead, at least one of:
email
linkedin_profile_url
To update an existing lead, at least one of:
lead_id
(GenPage Lead ID)genpage_url
(GenPage URL)first_name
company_name
company_domain
The response is the job ID.
The job ID can be used to get the status of the job, and get all the leads that were upserted by this request.
curl --request POST \
"https://backend.genpage.ai/api/external/v1/leads/upsert-leads" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"from\": \"MyCompanyName\",
\"campaign_id\": 1,
\"audience_id\": 1,
\"leads\": [
{
\"values\": {
\"last_name\": \"Doe\",
\"company_domain\": \"amazon.com\",
\"my_custom_variable\": \"My custom value\"
}
}
]
}"
{
"job_id": "1234567890"
}
This endpoint is used to get the status of the job. Once the job is completed, the status will be "completed".
The status can be:
Once the job is completed, please use the getLeads endpoint to get all the leads that were upserted by this request.
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/leads/get-status" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"job_id\": \"architecto\"
}"
{
"status": "pending",
"processed_rows": 10,
"total_rows": 100
}
This endpoint is used to get the leads that were upserted by a job.
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/leads/get-leads" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"workspace_id\": 16,
\"job_id\": \"architecto\"
}"
{
"leads": [
{
"lead_id": 56789,
"workspace_id": 222,
"campaign_id": 333,
"job_id": "1234567890",
"values": {
"name": "John Doe",
"email": "john@aws.com",
"company_name": "AWS",
"url_slug": "aws-john",
"logo": "https://aws.com/logo.png",
"logo_color": "#000000",
"genpage_url": "https://myworkspace.genpa.ge/aws-john"
}
}
]
}
This endpoint is used to get the list of workspaces the user has access to.
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/workspaces/get-list" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
[
{
"id": 1,
"name": "My Company Name",
"slug": "my-company-name"
}
{
"id": 2,
"name": "SAAS Outreach",
"slug": "saas-outreach"
}
]
This endpoint retrieves all available variables/columns for a specific workspace. It returns both default variables (first_name, email, company_name, company_domain) and any custom variables that have been created for the workspace.
When updating or inserting a lead, you can use the variables/columns from this endpoint to add the values to the specific variable/column for the lead.
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/workspaces/get-variable-list?workspace_id=16" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
[
{
"key": "first_name"
},
{
"key": "email"
},
{
"key": "company_name"
},
{
"key": "company_domain"
},
{
"key": "linkedin_profile_url"
},
{
"key": "My Custom Variable1"
},
{
"key": "custom_variable2"
}
]
The structure of the request is:
This endpoint is used to test the authentication.
curl --request GET \
--get "https://backend.genpage.ai/api/external/v1/zapier/test" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
{
"message": "Hello World"
"user": {
"id": 123,
"name": "John Doe",
"email": "john@example.com"
}
}
curl --request POST \
"https://backend.genpage.ai/api/external/v1/zapier/upsert-lead" \
--header "Authorization: Bearer <Token>" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"project_slug\": \"architecto\",
\"campaign_id\": 16,
\"is_test\": false,
\"linkedin_profile_url\": \"http:\\/\\/www.bailey.biz\\/quos-velit-et-fugiat-sunt-nihil-accusantium-harum.html\",
\"company_domain\": \"architecto\",
\"email\": \"zbailey@example.net\",
\"callback_url\": \"https:\\/\\/www.gulgowski.com\\/nihil-accusantium-harum-mollitia-modi-deserunt\"
}"