NAV
HTTP

Introduction

Welcome to the LeadPages Account API documentation.

This API adheres to the LeadPages HTTP API Standards document.

Endpoints

/account/v1

Ping

/account/v1/ping

A no-op endpoint that can be used to check what the currently-deployed version of the API is.

http GET https://api.leadpages.io/account/v1/ping
{
    "_meta": {
        "_version": "0.1.0"
    },
    "_status": {
        "code": 200
    }
}

Request

GET /account/v1/ping

Body
Empty

Response

Body
_meta._version String
The current internal version number of the API.
_meta Dictionary
Responses
200 OK
Errors
Empty


Auth

/account/v1/auth

An endpoint for authenticating a user. It does NOT create a new session. It simply verifies if username and password are correct.

Request

POST /account/v1/auth

Body
username Email
The email address of the user to be authenticated.
password String
The password of the user to use for authentication.

Response

Body
fullName String
The full name of the user, computed by concatenating the user's first and last names
firstName String?
The first name or given name of the user.
lastName String?
The last name or family name of the user.
accountId Integer?
The ID of the account.
isSeatedUser Boolean
Whether the user is a seated user (not the account owner)
enabled Boolean
Whether the user is enabled or not.
hasPendingInvite Boolean
If the user is a seated user that has not accepted their invite.
email Email
The email address of the user.
organizationUuid String
The UUID of the organization to which the user belongs.
role Integer
The role of the user.
profiles ValueDictionary[Profile]
policies List?[Policy]
A list of policies applying to the user.
primaryPaymentMethodUuid String?
The UUID of the user's primary payment method.
passwordIsUnset Boolean
Whether the users password is null or not. SSO users are expected to have null passwords, but this is not required.
_meta Meta
Meta information about the resource.
Responses
200 OK
Errors
Empty


Usersearches

/account/v1/user-searches

An endpoint used to search users.

Request

POST /account/v1/user-searches

Body
email Email
The email address to use when searching for a user.

Response

Body
_items List[User]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
401 Unauthorized Not Authorized


Users

/account/v1/users

Request

GET /account/v1/users

Body
Empty
Query string
cursor String?
A string representing where a previous request "left off".
limit Regexp?(\d+)
The maximum number of items to return in the response.

Response

Body
_items List[User]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header


Request

POST /account/v1/users

This is the method of adding Users to the account API, in order to add a user it must be associated with an existing account.

If the user has signed up through SSO, no password is required. The users stored password hash will be the hashed value of an empty string.

Creating a user through this process will also create a Stargate User.

Body
plaintextPassword String?
The password of the user
googleOpenidName String?
The google openid name of the user
accountId Integer
The ID of the account to associate this user with. Must not have an existing user.
googleOpenidEmail String?
The google openid email of the user
name String?
The name of the user
googleOpenidSubject String?
The google openid subject of the user
email Email
The email of the user.
userUuid String
The UUID of the user

Response

Body
fullName String
The full name of the user, computed by concatenating the user's first and last names
firstName String?
The first name or given name of the user.
lastName String?
The last name or family name of the user.
accountId Integer?
The ID of the account.
isSeatedUser Boolean
Whether the user is a seated user (not the account owner)
enabled Boolean
Whether the user is enabled or not.
hasPendingInvite Boolean
If the user is a seated user that has not accepted their invite.
email Email
The email address of the user.
organizationUuid String
The UUID of the organization to which the user belongs.
role Integer
The role of the user.
profiles ValueDictionary[Profile]
policies List?[Policy]
A list of policies applying to the user.
primaryPaymentMethodUuid String?
The UUID of the user's primary payment method.
passwordIsUnset Boolean
Whether the users password is null or not. SSO users are expected to have null passwords, but this is not required.
_meta Meta
Meta information about the resource.
Responses
201 Created
Errors
400 Bad Request unknown message
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header


User

/account/v1/users/{uuid}

Request

GET /account/v1/users/{uuid}

Body
Empty

Response

Body
fullName String
The full name of the user, computed by concatenating the user's first and last names
firstName String?
The first name or given name of the user.
lastName String?
The last name or family name of the user.
accountId Integer?
The ID of the account.
isSeatedUser Boolean
Whether the user is a seated user (not the account owner)
enabled Boolean
Whether the user is enabled or not.
hasPendingInvite Boolean
If the user is a seated user that has not accepted their invite.
email Email
The email address of the user.
organizationUuid String
The UUID of the organization to which the user belongs.
role Integer
The role of the user.
profiles ValueDictionary[Profile]
policies List?[Policy]
A list of policies applying to the user.
primaryPaymentMethodUuid String?
The UUID of the user's primary payment method.
passwordIsUnset Boolean
Whether the users password is null or not. SSO users are expected to have null passwords, but this is not required.
_meta Meta
Meta information about the resource.
Responses
200 OK
Errors
401 Unauthorized Not Authorized
404 Not Found User '{}' not found
404 Not Found unknown message


Request

PATCH /account/v1/users/{uuid}

Sync the users fields through the sync process outlined in this Confluence document:

https://leadpages.atlassian.net/wiki/spaces/LP/pages/3444670466/Migrating+passwords+to+the+User+model+from+the+Account+model#%F0%9F%94%84-Sync-Process

Body
Empty

Response

Body
fullName String
The full name of the user, computed by concatenating the user's first and last names
firstName String?
The first name or given name of the user.
lastName String?
The last name or family name of the user.
accountId Integer?
The ID of the account.
isSeatedUser Boolean
Whether the user is a seated user (not the account owner)
enabled Boolean
Whether the user is enabled or not.
hasPendingInvite Boolean
If the user is a seated user that has not accepted their invite.
email Email
The email address of the user.
organizationUuid String
The UUID of the organization to which the user belongs.
role Integer
The role of the user.
profiles ValueDictionary[Profile]
policies List?[Policy]
A list of policies applying to the user.
primaryPaymentMethodUuid String?
The UUID of the user's primary payment method.
passwordIsUnset Boolean
Whether the users password is null or not. SSO users are expected to have null passwords, but this is not required.
_meta Meta
Meta information about the resource.
Responses
200 OK
Errors
400 Bad Request Seated users cannot be synced
404 Not Found User '{}' not found
404 Not Found User not found
500 Internal Server Error Account not found


Userpaymentmethods

/account/v1/users/{uuid}/payment-methods

Payment methods are the record of customer/contact records in external payment provider services.

Request

GET /account/v1/users/{uuid}/payment-methods

Body
Empty
Query string
cursor String?
A string representing where a previous request "left off".
limit Regexp?(\d+)
The maximum number of items to return in the response.

Response

Body
_items List[PaymentMethod]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header


Request

POST /account/v1/users/{uuid}/payment-methods

Body
paymentMethod Or[ClientTokens, CustomerIds]
kind Enum('ClientTokens', 'CustomerIds')

Response

Body
addressCountryCode String?
Billing Address Country in 2 character ISO format
addressCity String?
Billing Address City
_meta Meta
Meta information about the resource.
expirationYear String?
The expiration year of the card.
braintreeId String
Customer ID in Braintree.
expired Boolean
Whether the card is expired.
brand String?
The brand/type of card (e.g. 'Visa')
addressStreet2 String?
Billing Address Street Line 2
kind Enum('unknown', 'credit', 'debit', 'prepaid')
The kind of card.
expirationMonth String?
The expiration month of the card.
addressStreet String?
Billing Address Street Line 1
lastFour String?
Last 4 digits of the card number.
addressState String?
Billing Address State or Region
stripeId String
Customer ID in Stripe.
addressCountry String?
Billing Address Country
addressZip String?
Billing Address Postal Code
Responses
200 OK
Errors
400 Bad Request unknown message
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header


Useremailverification

/account/v1/users/{uuid}/email-verification

Request

GET /account/v1/users/{uuid}/email-verification

Gets the most recent email verification for a user.

Body
Empty

Response

Body
_meta Meta
Meta information about the resource.
email Email
Email address for the verification.
expiresAt DateTime
Time at which the verification expires.
verifiedAt DateTime?
Time at which the email was verified.
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
404 Not Found no email_verification found for user '%s'
404 Not Found email_verification '%s' not found


Request

POST /account/v1/users/{uuid}/email-verification

Creates a new email verification record and sends the generated code to the user via email.

Body
password String
The password of the user to use for authentication.
email Email
Email address for the verification.

Response

Body
Empty
Responses
204 No Content
Errors
400 Bad Request failed to parse JSON request
400 Bad Request account with email is already in use
400 Bad Request bad content type
400 Bad Request Authorization failed for user '%s'
400 Bad Request missing Content-Type header


Verifyemail

/account/v1/users/{uuid}/email-verification/verify

Request

POST /account/v1/users/{uuid}/email-verification/verify

Verifies the code for an email verification record

Body
code String
Code used for verifying the user email.

Response

Body
Empty
Responses
204 No Content
Errors
400 Bad Request Email has already been verified
400 Bad Request missing Content-Type header
400 Bad Request bad content type
400 Bad Request failed to parse JSON request
404 Not Found user '%s' not found
404 Not Found no email_verification found for user '%s'
404 Not Found email_verification '%s' not found
422 Unprocessable Entity Validation Failed


Userbundle

/account/v1/users/{uuid}/bundles/{bundle_uuid}

Request

PUT /account/v1/users/{uuid}/bundles/{bundle_uuid}

Body
Empty

Response

Body
fullName String
The full name of the user, computed by concatenating the user's first and last names
firstName String?
The first name or given name of the user.
lastName String?
The last name or family name of the user.
accountId Integer?
The ID of the account.
isSeatedUser Boolean
Whether the user is a seated user (not the account owner)
enabled Boolean
Whether the user is enabled or not.
hasPendingInvite Boolean
If the user is a seated user that has not accepted their invite.
email Email
The email address of the user.
organizationUuid String
The UUID of the organization to which the user belongs.
role Integer
The role of the user.
profiles ValueDictionary[Profile]
policies List?[Policy]
A list of policies applying to the user.
primaryPaymentMethodUuid String?
The UUID of the user's primary payment method.
passwordIsUnset Boolean
Whether the users password is null or not. SSO users are expected to have null passwords, but this is not required.
_meta Meta
Meta information about the resource.
Responses
200 OK
Errors
401 Unauthorized Not Authorized
404 Not Found bundle '{}' not found
404 Not Found user '{}' not found


Request

DELETE /account/v1/users/{uuid}/bundles/{bundle_uuid}

Body
Empty

Response

Body
Empty
Responses
204 No Content
Errors
401 Unauthorized Not Authorized
404 Not Found user '{}' not found


Passwordresetcomplete

/account/v1/password/reset/complete

Request

POST /account/v1/password/reset/complete

This method is used to complete a password reset process, a URL to this endpoint will be included in the email sent from the /password/reset endpoint.

Takes the reset_token and new_password as a query parameter. If the reset_token is valid, it will update the user's password

Body
newPassword String
The new password for the user.
resetToken String
The token for the password reset.

Response

Body
Empty
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
400 Bad Request reset_token expired
404 Not Found reset_token not found


Publickeys

/account/v1/public-keys

Public keys needed by 3rd party clients for interacting with the account api

Request

GET /account/v1/public-keys

Body
Empty

Response

Body
braintree String
Braintree client token.
stripe_client_id String
Stripe client id.
stripe String
Stripe publishable key.
Responses
200 OK
Errors
Empty


Sessions

/account/v1/sessions

Request

GET /account/v1/sessions

Body
Empty
Query string
cursor String?
A string representing where a previous request "left off".
limit Regexp?(\d+)
The maximum number of items to return in the response.

Response

Body
_items List[Session]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
Empty


Request

POST /account/v1/sessions

Body
hours Integer?(1 < n < 87600)
clientType Enum('wp-plugin', 'account')
loginAs Boolean?

Response

Body
_meta Meta
Meta information about the resource.
securityToken String
The security token for the session.
profiles ValueDictionary[Profile]
The profiles for the session.
headers ValueDictionary?[String]
The headers from the request that created the session.
accessId String
The ID of the user that owns the session.
ipAddress Or?[IPv4, IPv6]
The IP address that was used to create the session.
Responses
201 Created
Errors
400 Bad Request unknown message
403 Forbidden Login is forbidden for the specified user
404 Not Found User '{}' not found


Session

/account/v1/sessions/{uuid}

Request

GET /account/v1/sessions/{uuid}

Body
Empty

Response

Body
_meta Meta
Meta information about the resource.
securityToken String
The security token for the session.
profiles ValueDictionary[Profile]
The profiles for the session.
headers ValueDictionary?[String]
The headers from the request that created the session.
accessId String
The ID of the user that owns the session.
ipAddress Or?[IPv4, IPv6]
The IP address that was used to create the session.
Responses
200 OK
Errors
404 Not Found session '{}' not found


Request

DELETE /account/v1/sessions/{uuid}

Body
Empty

Response

Body
Empty
Responses
204 No Content
Errors
404 Not Found session '{}' not found


Keys

/account/v1/keys

Keys are API keys for the user.

Request

GET /account/v1/keys

Body
Empty
Query string
cursor String?
A string representing where a previous request "left off".
limit Regexp?(\d+)
The maximum number of items to return in the response.

Response

Body
_items List[Key]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
400 Bad Request unknown message
404 Not Found User '{}' not found


Request

POST /account/v1/keys

Body
label String?
Label for the API key

Response

Body
status Enum('enabled', 'disabled')
_meta Meta
Meta information about the resource.
value String
The API key itself
label String?
Label for the API key
Responses
200 OK
Errors
400 Bad Request unknown message
404 Not Found User '{}' not found


Key

/account/v1/keys/{uuid}

Request

GET /account/v1/keys/{uuid}

Body
Empty

Response

Body
status Enum('enabled', 'disabled')
_meta Meta
Meta information about the resource.
value String
The API key itself
label String?
Label for the API key
Responses
200 OK
Errors
404 Not Found key '{}' not found
404 Not Found User '{}' not found


Request

PATCH /account/v1/keys/{uuid}

Body
status Enum('enabled', 'disabled')
label String?
Label for the API key

Response

Body
status Enum('enabled', 'disabled')
_meta Meta
Meta information about the resource.
value String
The API key itself
label String?
Label for the API key
Responses
200 OK
Errors
400 Bad Request unknown message
400 Bad Request JSON decode error
404 Not Found key '{}' not found
404 Not Found User '{}' not found


Request

DELETE /account/v1/keys/{uuid}

Body
Empty

Response

Body
Empty
Responses
204 No Content
Errors
404 Not Found key '{}' not found
404 Not Found User '{}' not found


Changepassword

/account/v1/password/change

Request

POST /account/v1/password/change

This method is used to change a user's password

Some users may not have their passwords set, in these cases you can just send in an empty string as the old password

Body
new_password String
The new password for the user.
old_password String
The old password for the user.

Response

Body
Empty
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
400 Bad Request Incorrect old password


Credentials

/account/v1/credentials

Request

GET /account/v1/credentials

Body
Empty

Response

Body
accessKey String
securityToken String?
encoded_profiles ValueDictionary[String]
session_id String?
profiles ValueDictionary[Profile]
Responses
200 OK
Errors
400 Bad Request unknown message


Request

POST /account/v1/credentials

Body
headers Dictionary

Response

Body
accessKey String
securityToken String?
encoded_profiles ValueDictionary[String]
session_id String?
profiles ValueDictionary[Profile]
Responses
200 OK
Errors
400 Bad Request unknown message


Emails

/account/v1/emails

Endpoint for verifying an email is available for signup.

A 404 response indicates the email is available. A 500 response indicates something went wrong decoding the token. A 200 response indicates the email is already taken.

Request

POST /account/v1/emails

Body
googleToken String?
Google OpenID token to decode and verify email availability.
email String?
Email to check availability for.

Response

Body
Empty
Responses
200 OK
404 Not Found
Errors
400 Bad Request '{}' is not a valid email address.
400 Bad Request missing Content-Type header
400 Bad Request bad content type
400 Bad Request failed to parse JSON request
400 Bad Request Email or token required.
500 Internal Server Error Something went wrong, please refresh and try again.


Organizations

/account/v1/organizations

Organizations are API organizations for the user.

Request

GET /account/v1/organizations

Body
Empty
Query string
cursor String?
A string representing where a previous request "left off".
limit Regexp?(\d+)
The maximum number of items to return in the response.

Response

Body
_items List[Organization]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
404 Not Found User '{}' not found


Request

POST /account/v1/organizations

Body
name String?
Name for the organization

Response

Body
group String
The rendered group for the organization.
name String?
Name for the organization
_meta Meta
Meta information about the resource.
Responses
201 Created
Errors
404 Not Found User '{}' not found


Organization

/account/v1/organizations/{uuid}

Request

GET /account/v1/organizations/{uuid}

Body
Empty

Response

Body
group String
The rendered group for the organization.
name String?
Name for the organization
_meta Meta
Meta information about the resource.
Responses
200 OK
Errors
404 Not Found organization '{}' not found


Request

PUT /account/v1/organizations/{uuid}

Body
name String?
Name for the organization

Response

Body
group String
The rendered group for the organization.
name String?
Name for the organization
_meta Meta
Meta information about the resource.
Responses
200 OK
Errors
404 Not Found organization '{}' not found


Request

DELETE /account/v1/organizations/{uuid}

Body
Empty

Response

Body
Empty
Responses
204 No Content
Errors
404 Not Found organization '{}' not found


Users

/account/v1/organizations/{uuid}/users

Request

GET /account/v1/organizations/{uuid}/users

For listing users within an organization.

Body
Empty

Response

Body
_items List[OrganizationUser]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
404 Not Found Organization UUID not provided
404 Not Found Organization not found


Request

POST /account/v1/organizations/{uuid}/users

For creating a seated user.

New seated users are made so anyone with a role of "ADMIN" or higher can read/modify them within their organization.

Body
name String
The full name of the user to be created.
email Email
Email of the new user, must be unique in our database.

Response

Body
fullName String
The full name of the user, computed by concatenating the user's first and last names
firstName String?
The first name or given name of the user.
lastName String?
The last name or family name of the user.
accountId Integer?
The ID of the account.
isSeatedUser Boolean
Whether the user is a seated user (not the account owner)
enabled Boolean
Whether the user is enabled or not.
hasPendingInvite Boolean
If the user is a seated user that has not accepted their invite.
email Email
The email address of the user.
organizationUuid String
The UUID of the organization to which the user belongs.
role Integer
The role of the user.
profiles ValueDictionary[Profile]
policies List?[Policy]
A list of policies applying to the user.
primaryPaymentMethodUuid String?
The UUID of the user's primary payment method.
passwordIsUnset Boolean
Whether the users password is null or not. SSO users are expected to have null passwords, but this is not required.
_meta Meta
Meta information about the resource.
Responses
201 Created
Errors
400 Bad Request User already exists
400 Bad Request missing Content-Type header
400 Bad Request bad content type
400 Bad Request failed to parse JSON request
404 Not Found Organization UUID not provided
404 Not Found Organization not found


Disableaccount

/account/v1/organizations/{uuid}/disable_account

Request

POST /account/v1/organizations/{uuid}/disable_account

Handles all the logic for disabling an account and all related side effects. Operations are idempotent, so they are safe to retry.

Must be an owner

Body
Empty

Response

Body
Empty
Responses
200 OK
Errors
404 Not Found Organization UUID not provided
404 Not Found Organization not found


User

/account/v1/organizations/{uuid}/users/{user_uuid}

Request

DELETE /account/v1/organizations/{uuid}/users/{user_uuid}

For soft-deleting a seated user in an organization.

Must be an admin or higher

Body
Empty

Response

Body
Empty
Responses
200 OK
Errors
403 Forbidden Cannot delete self
403 Forbidden Cannot delete owner
404 Not Found Organization UUID not provided
404 Not Found User not found
404 Not Found Organization not found


Bundles

/account/v1/bundles

Bundles are an indicator of account access to promotional materials.

Request

GET /account/v1/bundles

Body
Empty
Query string
cursor String?
A string representing where a previous request "left off".
limit Regexp?(\d+)
The maximum number of items to return in the response.

Response

Body
_items List[Bundle]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
Empty


Request

POST /account/v1/bundles

Body
expirationDate DateTime?
When this bundle will no longer be available
enabled Boolean
Whether or not the bundle is enabled
name String
Name for the bundle
details BundleDetails?
Details about the bundle

Response

Body
group String
The rendered group for the bundle
_meta Meta
Meta information about the resource.
expirationDate DateTime?
When this bundle will no longer be available
enabled Boolean
Whether or not the bundle is enabled
createdBy Email
The email address of the account that created the bundle
name String
Name for the bundle
details BundleDetails?
Details about the bundle
updatedBy Email
The email address of the account that last updated the bundle
Responses
201 Created
Errors
401 Unauthorized Not Authorized
404 Not Found User '{}' not found


Bundle

/account/v1/bundles/{uuid}

Request

GET /account/v1/bundles/{uuid}

Body
Empty

Response

Body
group String
The rendered group for the bundle
_meta Meta
Meta information about the resource.
expirationDate DateTime?
When this bundle will no longer be available
enabled Boolean
Whether or not the bundle is enabled
createdBy Email
The email address of the account that created the bundle
name String
Name for the bundle
details BundleDetails?
Details about the bundle
updatedBy Email
The email address of the account that last updated the bundle
Responses
200 OK
Errors
404 Not Found bundle '{}' not found


Request

PUT /account/v1/bundles/{uuid}

Body
expirationDate DateTime?
When this bundle will no longer be available
enabled Boolean
Whether or not the bundle is enabled
name String
Name for the bundle
details BundleDetails?
Details about the bundle

Response

Body
group String
The rendered group for the bundle
_meta Meta
Meta information about the resource.
expirationDate DateTime?
When this bundle will no longer be available
enabled Boolean
Whether or not the bundle is enabled
createdBy Email
The email address of the account that created the bundle
name String
Name for the bundle
details BundleDetails?
Details about the bundle
updatedBy Email
The email address of the account that last updated the bundle
Responses
200 OK
Errors
401 Unauthorized Not Authorized
404 Not Found bundle '{}' not found


Request

DELETE /account/v1/bundles/{uuid}

Body
Empty

Response

Body
Empty
Responses
204 No Content
Errors
401 Unauthorized Not Authorized
404 Not Found bundle '{}' not found


Paymentmethods

/account/v1/payment-methods

Payment methods are the record of customer/contact records in external payment provider services.

Request

GET /account/v1/payment-methods

Body
Empty
Query string
cursor String?
A string representing where a previous request "left off".
limit Regexp?(\d+)
The maximum number of items to return in the response.

Response

Body
_items List[PaymentMethod]
_meta ListingMeta
Meta information about the response.
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header


Request

POST /account/v1/payment-methods

Body
paymentMethod Or[ClientTokens, CustomerIds]
kind Enum('ClientTokens', 'CustomerIds')

Response

Body
addressCountryCode String?
Billing Address Country in 2 character ISO format
addressCity String?
Billing Address City
_meta Meta
Meta information about the resource.
expirationYear String?
The expiration year of the card.
braintreeId String
Customer ID in Braintree.
expired Boolean
Whether the card is expired.
brand String?
The brand/type of card (e.g. 'Visa')
addressStreet2 String?
Billing Address Street Line 2
kind Enum('unknown', 'credit', 'debit', 'prepaid')
The kind of card.
expirationMonth String?
The expiration month of the card.
addressStreet String?
Billing Address Street Line 1
lastFour String?
Last 4 digits of the card number.
addressState String?
Billing Address State or Region
stripeId String
Customer ID in Stripe.
addressCountry String?
Billing Address Country
addressZip String?
Billing Address Postal Code
Responses
200 OK
Errors
400 Bad Request unknown message
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
404 Not Found User '{}' not found


Paymentmethod

/account/v1/payment-methods/{uuid}

Request

GET /account/v1/payment-methods/{uuid}

Body
Empty

Response

Body
addressCountryCode String?
Billing Address Country in 2 character ISO format
addressCity String?
Billing Address City
_meta Meta
Meta information about the resource.
expirationYear String?
The expiration year of the card.
braintreeId String
Customer ID in Braintree.
expired Boolean
Whether the card is expired.
brand String?
The brand/type of card (e.g. 'Visa')
addressStreet2 String?
Billing Address Street Line 2
kind Enum('unknown', 'credit', 'debit', 'prepaid')
The kind of card.
expirationMonth String?
The expiration month of the card.
addressStreet String?
Billing Address Street Line 1
lastFour String?
Last 4 digits of the card number.
addressState String?
Billing Address State or Region
stripeId String
Customer ID in Stripe.
addressCountry String?
Billing Address Country
addressZip String?
Billing Address Postal Code
Responses
200 OK
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
404 Not Found {} '{}' not found


Request

PUT /account/v1/payment-methods/{uuid}

Body
stripeToken String
The token of the billing source to be used to pay for the subscription, as generated by the JS library.
braintreeToken String
The token of billing source to be used for creating a customer in braintree for future use, as generated by the JS library.

Response

Body
addressCountryCode String?
Billing Address Country in 2 character ISO format
addressCity String?
Billing Address City
_meta Meta
Meta information about the resource.
expirationYear String?
The expiration year of the card.
braintreeId String
Customer ID in Braintree.
expired Boolean
Whether the card is expired.
brand String?
The brand/type of card (e.g. 'Visa')
addressStreet2 String?
Billing Address Street Line 2
kind Enum('unknown', 'credit', 'debit', 'prepaid')
The kind of card.
expirationMonth String?
The expiration month of the card.
addressStreet String?
Billing Address Street Line 1
lastFour String?
Last 4 digits of the card number.
addressState String?
Billing Address State or Region
stripeId String
Customer ID in Stripe.
addressCountry String?
Billing Address Country
addressZip String?
Billing Address Postal Code
Responses
200 OK
Errors
400 Bad Request unknown message
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
404 Not Found {} '{}' not found


Request

DELETE /account/v1/payment-methods/{uuid}

Body
Empty

Response

Body
Empty
Responses
204 No Content
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
401 Unauthorized Not Authorized
404 Not Found {} '{}' not found


Oauth2

/account/v1/oauth2

Authorizationcodes

/account/v1/oauth2/authorization-codes

Request

POST /account/v1/oauth2/authorization-codes

Create a new authorization code

Body
scopes List[Regexp]
A list of API scopes. For example: `integration-rw`.
state String?
An arbitrary string to pass through to the redirect_uri.
code_challenge String?
The code challenge for PKCE authorization.
clientId String
An OAuth2 Application's client id.
redirectUri URI
The URI the user will be taken to on success/failure.

Response

Body
scopes List[Regexp]
A list of API scopes. For example: `integration-rw`.
state String?
The arbitrary string to pass through to the redirect_uri.
code String
The authorization code. Use this to request access tokens.
clientId String
The client id of the OAuth2 application this request token belongs to.
redirectUri URI
The URI the user should be taken to when this authorization code was created.
Responses
200 OK
Errors
400 Bad Request invalid redirect uri
400 Bad Request unknown message
400 Bad Request missing Content-Type header
400 Bad Request invalid client id
400 Bad Request bad content type
400 Bad Request failed to parse JSON request
404 Not Found User '{}' not found


Refreshtokens

/account/v1/oauth2/refresh-tokens

Refreshtoken

/account/v1/oauth2/refresh-tokens/{token}

Request

DELETE /account/v1/oauth2/refresh-tokens/{token}

Revoke a refresh token.

Body
Empty

Response

Body
status Enum('active', 'revoked')
The refresh token's status.
scopes List[Regexp]
A list of API scopes. For example: `integration-rw`.
state String?
The arbitrary string that was passed through to the redirect_uri.
redirectUri URI
The URI the user was taken to when this refresh token was created.
clientId String
The client id of the OAuth2 application this request token belongs to.
refreshToken String
The refresh token string. Use this to generate access tokens.
Responses
200 OK
Errors
404 Not Found {} '{}' not found


Accesstokens

/account/v1/oauth2/access-tokens

Request

POST /account/v1/oauth2/access-tokens

Create a new access token.

Body
Empty

Response

Body
access_token String
The access token.
token_type String
The type of the returned token.
expires_in Integer
The amount of time, in seconds, the token will be valid for.
refresh_token String
The refresh token string. Use this to generate access tokens.
Responses
200 OK
Errors
400 Bad Request cannot use PKCE flow without providing code_challenge
400 Bad Request invalid code_verifier
400 Bad Request redirect_uri mismatch
400 Bad Request client does not own this authorization code
400 Bad Request PKCE flow should provide code_verifier and not client_secret
400 Bad Request missing Content-Type header
400 Bad Request refresh token not found
400 Bad Request authorization code not found
400 Bad Request bad content type
400 Bad Request authorization code has expired
400 Bad Request refresh token has been revoked
400 Bad Request client does not own this refresh_token
400 Bad Request invalid client id/secret pair
400 Bad Request authorization code has been used


Tasks

/account/v1/tasks

Emailverificationtask

/account/v1/tasks/email-verification/{uuid}

An endpoint for triggering email verification sends

Request

POST /account/v1/tasks/email-verification/{uuid}

Body
user_uuid String
The UUID for the user requesting the email verification.
location String
Location at which the request originated.

Response

Body
Empty
Responses
204 No Content
Errors
400 Bad Request failed to parse JSON request
400 Bad Request bad content type
400 Bad Request missing Content-Type header
403 Forbidden Forbidden
404 Not Found unknown message


Apicredentials

/account/v1/api-credentials

Request

POST /account/v1/api-credentials

Body
kind Enum('Firebase')
apiCredentials Or[CreateFirebaseApiCredentials]

Response

Body
kind Enum('Firebase')
apiCredentials Or[FirebaseApiCredentials]
Responses
201 Created
Errors
Empty


Passwordreset

/account/v1/password/reset

Request

POST /account/v1/password/reset

This method is used to reset a user's password if they forgot it

Takes the email address as a query parameter. Always returns a 204, if the user is not found it doesn't do anything.

Sets the User.reset_token to a UUID, the user will receive an email to complete the password reset process. They have 24 hours before the link expires.

Body
Empty

Response

Body
Empty
Responses
200 OK
Errors
Empty


Definitions

Profile

Profile
firstName String?
The first name or given name of the user.
lastName String?
The last name or family name of the user.
accountId Integer?
The ID of the account.
enabled Boolean
Whether the user is enabled or not.
accessId String
The UUID of the user.
policy ProfilePolicy
email Email
The email address of the user.

ProfilePolicy

ProfilePolicy
role Integer(0 < n < 9001)
groups List[String]

Policy

Policy
organizationUuids List[String]
A list of UUIDs for the organizations to which this user belongs.
_meta Meta
Meta information about the resource.
userUuid String
The UUID of the user for which this policy applies.
bundleUuids List[String]
A list of UUIDs for the bundles which this user has.
role Integer
An integer representing the user's effective role for this policy.
config Dictionary?
productUuid String
The UUID of the product for which this policy applies.

Meta

Meta
updated DateTime
When the resource was last updated.
created DateTime
When the resource was created.
uri String
The resource's absolute URI.
id String
The resource's unique identifier.

User

User
policies List?[Policy]
A list of policies applying to the user.
firstName String?
The first name or given name of the user.
lastName String?
The last name or family name of the user.
accountId Integer?
The ID of the account.
isSeatedUser Boolean
Whether the user is a seated user (not the account owner)
enabled Boolean
Whether the user is enabled or not.
hasPendingInvite Boolean
If the user is a seated user that has not accepted their invite.
passwordIsUnset Boolean
Whether the users password is null or not. SSO users are expected to have null passwords, but this is not required.
organizationUuid String
The UUID of the organization to which the user belongs.
role Integer
The role of the user.
profiles ValueDictionary[Profile]
fullName String
The full name of the user, computed by concatenating the user's first and last names
primaryPaymentMethodUuid String?
The UUID of the user's primary payment method.
email Email
The email address of the user.
_meta Meta
Meta information about the resource.

ListingMeta

ListingMeta
count Integer
The total number of items in the response.
hasMore Boolean?
if the listing response has more entries
total Integer?
The number of items in the database.
limit Integer
The requested limit on the number of items.
cursor String?
This is used in conjunction with limit to paginate through lists of items.

PaymentMethod

PaymentMethod
addressCountryCode String?
Billing Address Country in 2 character ISO format
addressCity String?
Billing Address City
_meta Meta
Meta information about the resource.
expirationYear String?
The expiration year of the card.
addressCountry String?
Billing Address Country
braintreeId String
Customer ID in Braintree.
expired Boolean
Whether the card is expired.
brand String?
The brand/type of card (e.g. 'Visa')
addressStreet2 String?
Billing Address Street Line 2
kind Enum('unknown', 'credit', 'debit', 'prepaid')
The kind of card.
expirationMonth String?
The expiration month of the card.
addressStreet String?
Billing Address Street Line 1
lastFour String?
Last 4 digits of the card number.
addressState String?
Billing Address State or Region
stripeId String
Customer ID in Stripe.
addressZip String?
Billing Address Postal Code

ClientTokens

ClientTokens
stripeToken String
The token of the billing source to be used to pay for the subscription, as generated by the JS library.
braintreeToken String
The token of billing source to be used for creating a customer in braintree for future use, as generated by the JS library.

CustomerIds

CustomerIds
braintreeId String
The user's Braintree contact ID.
stripeId String?
The user's Stripe customer ID.

Session

Session
_meta Meta
Meta information about the resource.
securityToken String
The security token for the session.
profiles ValueDictionary[Profile]
The profiles for the session.
headers ValueDictionary?[String]
The headers from the request that created the session.
accessId String
The ID of the user that owns the session.
ipAddress Or?[IPv4, IPv6]
The IP address that was used to create the session.

Key

Key
status Enum('enabled', 'disabled')
_meta Meta
Meta information about the resource.
value String
The API key itself
label String?
Label for the API key

OrganizationUser

OrganizationUser
uuid String
The UUID for the user.
last_active DateTime?
When the users most recent session was created, can be null
has_pending_invite Boolean
Whether the user has accepted their invite email and set their password
role Integer
The role for the user
email Email
Email address for the user.
name String
Name for the user.

Organization

Organization
group String
The rendered group for the organization.
name String?
Name for the organization
_meta Meta
Meta information about the resource.

BundleDetails?

BundleDetails?
kind Enum('Exclusive Templates', 'Account Settings')
What this is a bundle of
enabledForTrial Boolean?
Whether or not this bundle is available for trial sign-up
validPlans List?[String]
The plan levels this bundle is available for
orderSummary OrderSummary?
Details about the bundle displayed in an order summary during purchasing flows
enabledForUpgrade Boolean?
Whether or not this bundle is available when upgrading
value Integer?
The monetary value of the bundle
accountSettings List?[AccountSetting]
A list of property names and values to set on an account after purchasing with a bundle
templateType Enum('LeadpageTemplate', 'SiteTemplate')
The type of templates in a template bundle
planCompare PlanCompare?
Details about the bundle displayed when comparing plans
infoSheet InfoSheet?
Details about the bundle displayed in an info sheet
postPurchaseToast Toast?
Text displayed in a toast after purchasing with a bundle offer
enabledForReactivation Boolean?
Whether or not this bundle is available when reactivating
size Integer?
The number of items in the bundle

OrderSummary?

OrderSummary?
lineItemTitle String?
Title for line item in order summary tables

AccountSetting

AccountSetting
name String
Name of account property to set
value Or[String, Boolean, Integer]
Value to set on account property

PlanCompare?

PlanCompare?
lineItemTooltip String?
Tooltip text displayed when hovered over feature line item in plan comparision tables
lineItemText String?
Text displayed as a feature line item in plan comparison tables

InfoSheet?

InfoSheet?
reactivationDescription String?
A description of the bundle for info sheets displayed when reactivating
headline String?
Headline text for the info sheet
enabled Boolean?
Whether or not the info sheet should be shown for this bundle offer
linkURL String?
The URL of a link in the info sheet
callout String?
Text displayed at the top of the info sheet
upgradeDescription String?
A description of the bundle for info sheets displayed when upgrading
textColor String?
The text color of the info sheet
linkLabel String?
The label of a link in the info sheet
backgroundColor String?
The background color of the info sheet
image String?
The URL to an image to display in the info sheet
trialDescription String?
A description of the bundle for info sheets displayed for trial sign-up

Toast?

Toast?
message String?
Message text for the toast
detail String?
Additional descriptive messaging for the toast

Bundle

Bundle
group String
The rendered group for the bundle
_meta Meta
Meta information about the resource.
expirationDate DateTime?
When this bundle will no longer be available
enabled Boolean
Whether or not the bundle is enabled
createdBy Email
The email address of the account that created the bundle
details BundleDetails?
Details about the bundle
updatedBy Email
The email address of the account that last updated the bundle
name String
Name for the bundle

CreateFirebaseApiCredentials

CreateFirebaseApiCredentials
instance Enum('builder', 'center')

FirebaseApiCredentials

FirebaseApiCredentials
instance Enum('builder', 'center')
token String