• curl
  • Ruby
  • JavaScript

Getting Started

Welcome

The Unbounce API is currently under heavy development, but we're opening up access as early as possible so we can get your feedback and build an API that lets you build useful and fun solutions on top of the Unbounce platform. Just send us an email requesting early access, tell us a little bit about your interest in our API and what you're hoping to do, and we'll get you hooked up.

Get API Access

Do you have a burning need to integrate your product or service with the Unbounce platform? Are you dying to incorporate Unbounce deeply into your own workflow and tools? Well then you're in the right place. There's just one small thing...

While we'd love to open up Unbounce API access for everyone right now, we're still under development so fill out this form to request early access and we'll get you hooked up as soon as we're ready!

Exploring the API

One of the ways we make it easy for you to get started is by providing a browsable and discoverable API. That means that once you have an API key, you can use your browser to explore our API using your own data! So you can start just by browsing the API Console and experiment with the different resources available there.

Security

API Keys

You can use HTTP Basic Auth to interact with our API via API keys. Use your Unbounce API Key as the username and nothing as the password.

curl -u API_KEY: -X GET https://api.unbounce.com

All connections require encryption via SSL, so make sure you use the HTTPS protocol in your requests.

Permissions

API keys currently act like Unbounce account administrators.

An API key allows the client application to view every resource that an administrator of your account can view.

Managing API Keys

Once we've enabled API access for your account, you'll need to create one or more API keys (and yes, OAuth really is coming soon).

  1. Log in to your Unbounce account and navigate to your account management screen.

    Account Preferences

  2. Open the API Keys tab and create a new API key.

    Create API key

  3. Test your new API Key by running:

    curl -u API_KEY: -X GET https://api.unbounce.com/accounts
    

    Or alternatively, browse the API Console and use your API key as the username, leaving the password field blank.

Global API

Global API meta-information.

get

/

Retrieve the global API meta-information.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Describes the main API entry points, supported formats and specification locations.",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "documentation",
        "related",
        "specifications",
        "supported_formats"
    ],
    "properties": {
        "documentation": {
            "type": "string",
            "format": "uri"
        },
        "related": {
            "type": "object",
            "additionalProperties": false,
            "required": [
                "accounts",
                "pages"
            ],
            "properties": {
                "accounts": {
                    "type": "string",
                    "format": "uri"
                },
                "pages": {
                    "type": "string",
                    "format": "uri"
                }
            }
        },
        "specifications": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "href",
                    "type",
                    "version"
                ],
                "properties": {
                    "href": {
                        "type": "string",
                        "format": "uri"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "raml"
                        ]
                    },
                    "version": {
                        "type": "string"
                    }
                }
            }
        },
        "supported_formats": {
            "type": "array",
            "item": {
                "type": "string"
            }
        }
    }
}

Accounts

The accounts collection is the entry point to the rest of the Unbounce API. Your API key will give you access to all of the clients owned by your primary account.

get

/accounts

Retrieve the accounts collection.

Authentication Required
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc

Example Request

GET
https://api.unbounce.com/accounts.json/?sort_order=asc

Example Response

This is an example response.

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of account entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["accounts", "metadata"],
    "properties": {
        "accounts": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "account.json"
            }
        },
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        }
    }
}
get

/accounts/{account_id}

Retrieve the details of a single account.

Authentication Required
URI Parameters
  • account_id

    required string

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Representation of a single account entity.",
    "type": "object",
    "additionalProperties": false,
    "required": [
                 "created_at",
                 "id",
                 "metadata",
                 "name",
                 "state"],
    "properties": {
        "created_at": {
            "$ref": "common/definitions_v2.0.json#/date"
        },
        "id": {
            "type": "string"
        },
        "metadata": {
            "$ref": "metadata.json#/account_metadata"
        },
        "name": {
            "type": "string"
        },
        "state": {
            "type": "string",
            "enum": ["active", "suspended"]
        }
    }
}
get

/accounts/{account_id}/sub_accounts

Retrieve all sub-accounts for the specified account.

Authentication Required
URI Parameters
  • account_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of sub-account entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        },
        "sub_accounts": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "sub_account.json"
            }
        }
    }
}
get

/accounts/{account_id}/pages

Retrieve a list of all pages for the specified account.

Authentication Required
URI Parameters
  • account_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of page entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        },
        "pages": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "page.json"
            }
        }
    }
}

Sub Accounts

Unbounce users can use sub-accounts to manage multiple projects or clients. Each sub-account has it's own collection of pages, domains and other objects. For interactive applications, you'd often want to allow users to select a particular sub-account to work with.

get

/sub_accounts/{sub_account_id}

Retrieve the details of a single sub-account.

Authentication Required
URI Parameters
  • sub_account_id

    required string

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Representation of a sub-account entity (API sub-accounts are Unbounce Clients).",
    "type": "object",
    "additionalProperties": false,
    "required": ["created_at",
                 "domains_count",
                 "id",
                 "account_id",
                 "metadata",
                 "name"],
    "properties": {
        "created_at": {
            "$ref": "common/definitions_v2.0.json#/date"
        },
        "domains_count": {
            "type": "integer"
        },
        "id": {
            "type": "string"
        },
        "account_id": {
            "type": "string"
        },
        "metadata": {
            "$ref": "metadata.json#/sub_account_metadata"
        },
        "name": {
            "type": "string"
        },
        "website": {
            "type": "string"
        }
    }
}
get

/sub_accounts/{sub_account_id}/domains

Retrieve a list of all custom domains belonging to a given sub-account.

Authentication Required
URI Parameters
  • sub_account_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of domain entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "domains": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "domain.json"
            }
        },
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        }
    }
}
get

/sub_accounts/{sub_account_id}/leads

Retrieve a list of all leads for a given sub-account.

Authentication Required
URI Parameters
  • sub_account_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of leads entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "leads": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "lead.json"
            }
        },
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        }
    }
}
get

/sub_accounts/{sub_account_id}/page_groups

Retrieve a list of all page groups for a given sub-account.

Authentication Required
URI Parameters
  • sub_account_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of form fields entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        },
        "page_groups": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "page_group.json"
            }
        }
    }
}
get

/sub_accounts/{sub_account_id}/pages

Retrieve a list of all pages for a given sub-account.

Authentication Required
URI Parameters
  • sub_account_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of page entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        },
        "pages": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "page.json"
            }
        }
    }
}

Domains

Customers can register custom domains with Unbounce, then publish pages to those domains.

get

/domains/{domain_id}

Retrieve a custom domain that has been registered with Unbounce.

Authentication Required
URI Parameters
  • domain_id

    required string

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Representation of a single custom domain entity.",
    "type": "object",
    "additionalProperties": false,
    "required": ["id", "metadata", "name"],
    "properties": {
        "id": {
            "type": "string"
        },
        "metadata": {
            "$ref": "metadata.json#/domain_metadata"
        },
        "name": {
            "type": "string"
        }
    }
}
get

/domains/{domain_id}/pages

Retrieve a list of all pages based on the domain.

Authentication Required
URI Parameters
  • domain_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of page entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        },
        "pages": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "page.json"
            }
        }
    }
}

Pages

Access all pages for the authenticated principal. An authenticated principal is either an API Key, or an OAuth client. We provide this top-level resource specifically for OAuth clients. Any Unbounce customer can be invited to author or view a page on a different client than their own. The legacy Pages resource we provide doesn't allow for accessing these external pages. This top-level resource allows you to additionally filter pages based on the specified role.

get

/pages

Retrieve a list of all pages.

Authentication Required
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100
  • with_stats

    boolean

    When true, include page stats for the collection.

    Example: true
  • role

    one of viewer, author

    Restricts the scope of the returned pages.

    Example: author

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of page entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        },
        "pages": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "page.json"
            }
        }
    }
}
get

/pages/{page_id}

Retrieve a single page.

Authentication Required
URI Parameters
  • page_id

    required string

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Representation of a single page entity, which includes page statistics such as which variant is the winner or loser.",
    "type": "object",
    "additionalProperties": false,
    "required": [
                 "created_at",
                 "domain",
                 "id",
                 "integrations",
                 "integrations_count",
                 "integrations_errors_count",
                 "metadata",
                 "name",
                 "state",
                 "sub_account_id",
                 "url",
                 "variants_count"
                 ],
    "properties": {
        "created_at": {
            "$ref": "common/definitions_v2.0.json#/date"
        },
        "domain": {
            "type": "string"
        },
        "id": {
            "type": "string"
        },
        "integrations": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "integration.json"
            }
        },
        "integrations_count": {
            "type": "integer"
        },
        "integrations_errors_count": {
            "type": "integer"
        },
        "last_published_at": {
            "$ref": "common/definitions_v2.0.json#/date"
        },
        "metadata": {
            "$ref": "metadata.json#/page_metadata"
        },
        "name": {
            "type": "string"
        },
        "state": {
            "type": "string",
            "enum": ["unpublished", "published"]
        },
        "sub_account_id": {
            "type": "string"
        },
        "tests": {
            "$ref": "tests.json"
        },
        "url": {
            "type": "string",
            "format": "uri"
        },
        "variants_count": {
            "type": "integer"
        }
    }
}
get

/pages/{page_id}/form_fields

Retrieve a full list of all form fields across all page variants of a specific page.

Authentication Required
URI Parameters
  • page_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of form fields entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "form_fields": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "form_field.json"
            }
        },
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        }
    }
}
get

/pages/{page_id}/leads

Retrieve a list of all leads for a given page.

Authentication Required
URI Parameters
  • page_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of leads entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "leads": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "lead.json"
            }
        },
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        }
    }
}
post

/pages/{page_id}/leads

Create a new lead. New leads created via the API are marked distinctly from those created through the webapp. Leads created via the API will have a new attribute in their extra_data field:

{ 'created_by': 'api' }
Authentication Required
URI Parameters
  • page_id

    required string

Example Request

{
    "conversion": true,
    "visitor_id": "127.0.0.123543254378923893",
    "form_submission": {
        "variant_id": "a",
        "submitter_ip": "127.0.0.1",
        "form_data": {
            "first_name": "John",
            "last_name": "Doe",
            "email": "jqdoe@unbounce.com"
        }
    }
}

Page Groups

Pages may optionally be organized into groups. Each page group provides a link to the pages it contains in its meta data collection.

get

/page_groups/{page_group_id}/pages

Retrieve a list of all pages that belong to a given page group.

Authentication Required
URI Parameters
  • page_group_id

    required string
Query Parameters
  • sort_order

    one of asc, desc default: asc

    Sort by creation date.

    Example: desc
  • count

    boolean

    When true, don't return the response's collection attribute.

    Example: true
  • from

    string

    Limit results to those created after from.

    Example: 2014-12-31T00:00:00.000Z
  • to

    string

    Limit results to those created before to.

    Example: 2014-12-31T23:59:59.999Z
  • offset

    integer

    Omit the first offset number of results.

    Example: 3
  • limit

    integer default: 50 maximum: 1000

    Only return limit number of results.

    Example: 100

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Collection of page entities.",
    "type": "object",
    "additionalProperties": false,
    "required": ["metadata"],
    "properties": {
        "metadata": {
            "$ref": "common/entities_v2.0.json#/collection_metadata"
        },
        "pages": {
            "type": "array",
            "minItems": 0,
            "uniqueItems": true,
            "items": {
                "$ref": "page.json"
            }
        }
    }
}

Leads

There are two sets of data associated with each lead; the form data submitted when the lead was collected, and any optional extra data provided by 3rd party integrations with Unbounce (such as lead scoring or social data). Fields within the form data collection use a normalized form of the form field name.

get

/leads/{lead_id}

Retrieve a single lead.

Authentication Required
URI Parameters
  • lead_id

    required string

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "Representation of a single lead entity.",
    "type": "object",
    "additionalProperties": false,
    "required": ["created_at",
                 "id",
                 "extra_data",
                 "form_data",
                 "metadata",
                 "page_id",
                 "submitter_ip",
                 "variant_id"],
    "properties": {
        "created_at": {
            "$ref": "common/definitions_v2.0.json#/date"
        },
        "id": {
            "type": "string"
        },
        "extra_data": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "rapleaf": {
                    "type": "object"
                },
                "cookies": {
                    "type": "object"
                },
                "request_id": {
                    "type": "string"
                },
                "created_by" : {
                    "type": "string",
                    "enum": ["api"]
                }
            }
        },
        "form_data": {
            "type": "object"
        },
        "metadata": {
            "$ref": "metadata.json#/lead_metadata"
        },
        "page_id": {
            "type": "string"
        },
        "submitter_ip": {
            "type": "string"
        },
        "variant_id": {
            "type": "string"
        }
    }
}

Users

get

/users/self

Retrieve the current user.

Authentication Required

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "User entity include accounts and sub-account data.",
    "type": "object",
    "additionalProperties": false,
    "required": [
                 "id",
                 "first_name",
                 "last_name",
                 "email",
                 "metadata"
                 ],
    "properties": {
        "first_name": {
            "type": "string"
        },
        "last_name": {
            "type": "string"
        },
        "id": {
            "type": "string"
        },
        "email": {
            "type": "string",
            "format": "email"
        },
        "metadata": {
            "$ref": "metadata.json#/user_metadata"
        }
    }
}
get

/users/{user_id}

Retrieves a particular user.

Authentication Required
URI Parameters
  • user_id

    required string

Schema

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "User entity include accounts and sub-account data.",
    "type": "object",
    "additionalProperties": false,
    "required": [
                 "id",
                 "first_name",
                 "last_name",
                 "email",
                 "metadata"
                 ],
    "properties": {
        "first_name": {
            "type": "string"
        },
        "last_name": {
            "type": "string"
        },
        "id": {
            "type": "string"
        },
        "email": {
            "type": "string",
            "format": "email"
        },
        "metadata": {
            "$ref": "metadata.json#/user_metadata"
        }
    }
}