Getting Started
Making your first request.
API Access Tokens
You will first need an API access token (a.k.a. "API key") to start communicating with the API.
π Remember that API access tokens are generated per team. Thus, an access token offers access to all the data associated with workspaces belonging to that team.
β οΈ The API access tokens can be seen by all team admins.
It's important to store the access tokens in a secure way and not share them with third parties. If you really have to share them, make sure they are not exposed publicly and are shared in a secure (e.g. as a One Time Secret).
Get your API key
To get an API key, you need to have a platform application that the API key belongs to.
Creating a platform application
From your main dashboard, head over to your team settings by clicking Teams List > Your Team > Team Settings:
In your Team settings, go to Developer Portal and click Add new platform application:
Fill out the information needed for your platform application and click Create platform application:
You can create multiple platform applications. You might want to have different client applications for different use cases. For example, one of your platform applications could periodically poll the API's Contacts List endpoint to run some automations on recent contacts. At the same time, you could have a second platform application where you let ClickFunnels users connect their accounts via OAuth to your app so you can provide your services to them. For example, there is a login button in Zapier that allows you to connect your ClickFunnels account to Zapier. After authorizing Zapier, their platform application can make changes in your account, like creating contacts or knowing when a new form was submitted.
We won't be looking into OAuth in this quick Getting Started intro, you can go through our step-by-step OAuth guide for that. Instead, we are setting you up to communicate directly with your ClickFunnels account data via the API Access Token.
Getting your API key
So after creating the platform application, you can now copy the API access token:
You can have multiple access tokens per platform application. For example, you might want to give different keys to different developers.
Let's see now how you can make your first requests and create a setup for the requests to come.
Make your first requests
For most of your calls, you will need a team_id
, a workspace_id
, or the exact ID of a resource, like an order_id
. Let's walk you through how to create a setup
You can do the below by grabbing the public IDs of a team and workspace from the URLs of your ClickFunnels UI, for example:
- You can find the Team ID in the ClickFunnels team settings: https://accounts.myclickfunnels.com/account/teams/JNzNaa
- You can find the Workspace ID on the ClickFunnels home dashboard: https://richstone.myclickfunnels.com/account/workspaces/jWMWXZ
But since we are in API land, let's see how we could do the same via the API. Also, while you can use the public_id
in URLs, you can't use it in POST body payloads, so we encourage you to prefer the raw id
fields.
You can now use the API access token as a Bearer token from the previous section in an Authorization header:
you should use the accounts.
subdomain, when your API calls are not specific to workspace data
$ curl 'https://accounts.myclickfunnels.com/api/v2/teams' \
--header 'Authorization: Bearer VZeIl6IkzMQCdfSBQdvjSb7-KLllCKrE390QMKcmC6M'
[
{
"id": 3,
"public_id": "JNzNaa",
"name": "Richard Steinmetz's Team",
# more team information output...
It usually makes the most sense to query the Workspaces List endpoint next to pick up the workspace ID you want to work with because the Create and List endpoints require a workspace ID:
we are still using the accounts.
subdomain since we are requesting information about the children of a non-workspace resource (the Team
resource).
$ curl 'https://accounts.myclickfunnels.com/api/v2/teams/3/workspaces' \
--header 'Authorization: Bearer VZeIl6IkzMQCdfSBQdvjSb7-KLllCKrE390QMKcmC6M'
[
{
"id": 42,
"public_id": ,
"team_id": 3,
"name": "Hammer Workspace",
# more workspace information and potentially other workspaces...
Once you have the Workspaces ID of the workspace that you want to work on, you can proceed with exploring your data, like hitting the Contacts List endpoint:
note the use of the workspace subdomain you plan to operate on. You should use the correct subdomain for your workspace to ensure compatibility of all API features and security.
$ curl 'https://richstone.myclickfunnels.com/api/v2/workspaces/42/contacts' \
--header 'Authorization: Bearer VZeIl6IkzMQCdfSBQdvjSb7-KLllCKrE390QMKcmC6M'
[
{
"id": 33,
"email": "[email protected]",
# more contacts information output...
Now you are all set! π
And remember to keep your Access Tokens secure at all times. π
Still questions or doubts? You can share your use case and ask a question over at the Discussion Forum.
Updated about 21 hours ago