Back to top

Blaize Admin API documentation

Account

Actions on resource Account

Accounts

Accounts
GET/v3/accounts

Retrieves a list of Accounts wrapped in the element “results”

Example URI

GET /v3/accounts
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "company_id": "123456789ABCD",
      "name": "Account name",
      "number_of_seats": 5,
      "allow_oversubscription": true,
      "notify_when_account_oversubscribed": true,
      "notify_on_each_registration_when_account_is_oversubscribed": true,
      "registration_code": "Registration code"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Account
POST/v3/accounts

Create a Account

Example URI

POST /v3/accounts
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "company_id": "123456789ABCD",
  "name": "Account name",
  "number_of_seats": 5,
  "allow_oversubscription": true,
  "notify_when_account_oversubscribed": true,
  "notify_on_each_registration_when_account_is_oversubscribed": true,
  "registration_code": "Registration code"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "company_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "number_of_seats": {
      "type": "number"
    },
    "allow_oversubscription": {
      "type": "boolean"
    },
    "notify_when_account_oversubscribed": {
      "type": "boolean"
    },
    "notify_on_each_registration_when_account_is_oversubscribed": {
      "type": "boolean"
    },
    "registration_code": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Account

Get Account
GET/v3/accounts/{id}

Get a single Account

Example URI

GET /v3/accounts/id
URI Parameters
HideShow
id
string (required) 

Unique Account identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "company_id": "123456789ABCD",
  "name": "Account name",
  "number_of_seats": 5,
  "allow_oversubscription": true,
  "notify_when_account_oversubscribed": true,
  "notify_on_each_registration_when_account_is_oversubscribed": true,
  "registration_code": "Registration code"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "company_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "number_of_seats": {
      "type": "number"
    },
    "allow_oversubscription": {
      "type": "boolean"
    },
    "notify_when_account_oversubscribed": {
      "type": "boolean"
    },
    "notify_on_each_registration_when_account_is_oversubscribed": {
      "type": "boolean"
    },
    "registration_code": {
      "type": "string"
    }
  }
}

Delete Account
DELETE/v3/accounts/{id}

Delete an Account

Example URI

DELETE /v3/accounts/id
URI Parameters
HideShow
id
string (required) 

Unique Account identifier

Response  200
Response  404

Update Account
PUT/v3/accounts/{id}

Update an Account

Example URI

PUT /v3/accounts/id
URI Parameters
HideShow
id
string (required) 

Unique Account identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "company_id": "123456789ABCD",
  "name": "Account name",
  "number_of_seats": 5,
  "allow_oversubscription": true,
  "notify_when_account_oversubscribed": true,
  "notify_on_each_registration_when_account_is_oversubscribed": true,
  "registration_code": "Registration code"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "company_id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "number_of_seats": {
      "type": "number"
    },
    "allow_oversubscription": {
      "type": "boolean"
    },
    "notify_when_account_oversubscribed": {
      "type": "boolean"
    },
    "notify_on_each_registration_when_account_is_oversubscribed": {
      "type": "boolean"
    },
    "registration_code": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Account User

Actions on resource Account User

Account Users

Account Users
GET/v3/accounts/users

Retrieves a list of Account Users

Example URI

GET /v3/accounts/users
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "user_id": "0123456789ABCD",
    "account_id": "0123456789ABCD"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Account User

Get Account User
GET/v3/accounts/{account_id}/users/{user_id}

Get a single Account User

Example URI

GET /v3/accounts/account_id/users/user_id
URI Parameters
HideShow
account_id
string (required) 

Unique Account identifier

user_id
string (required) 

Unique User identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user_id": "0123456789ABCD",
  "account_id": "0123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string"
    },
    "account_id": {
      "type": "string"
    }
  }
}

Delete Account User
DELETE/v3/accounts/{account_id}/users/{user_id}

Delete an Account User

Example URI

DELETE /v3/accounts/account_id/users/user_id
URI Parameters
HideShow
account_id
string (required) 

Unique Account identifier

user_id
string (required) 

Unique User identifier

Response  200
Response  404

Save Account User
PUT/v3/accounts/{account_id}/users/{user_id}

Save an Account User

Example URI

PUT /v3/accounts/account_id/users/user_id
URI Parameters
HideShow
account_id
string (required) 

Unique Account identifier

user_id
string (required) 

Unique User identifier

Response  200
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Admin User

Actions on resource Admin User

Users

Create Admin User
POST/v3/admin/users

Create a new Admin User

Example URI

POST /v3/admin/users
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "identifiers": {
    "email_address": "joe.blow@company.com"
  },
  "validators": {
    "password": "mysecurepassword123"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    },
    "validators": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "identifiers"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "user_id": "b859f5dd-8184-4d01-8bf9-e3e771f68a62",
  "message": "Admin user created successfully",
  "uri": "http://company.com/v3/admin/users/b859f5dd-8184-4d01-8bf9-e3e771f68a62"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string"
    },
    "message": {
      "type": "string"
    },
    "uri": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json

Login

Login
POST/v3/admin/login

Admin User Login

Example URI

POST /v3/admin/login
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "identifiers": {
    "email_address": "joe.blow@company.com"
  },
  "validators": {
    "password": "mysecurepassword123"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    },
    "validators": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "identifiers",
    "validators"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "cookie": "blaize_admin_session=...",
  "message": "Login successful"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "cookie": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: application/json

Logout

Logout
POST/v3/admin/logout

Admin User Logout

Example URI

POST /v3/admin/logout
Request
HideShow
Headers
blaize-admin-session: (string)
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Session deleted"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  }
}

Keypairs

Issue Key Pair
POST/v3/admin/users/{user_id}/keypairs

Issue a new Key Pair for the Admin User

Example URI

POST /v3/admin/users/user_id/keypairs
URI Parameters
HideShow
user_id
string (required) 

Unique User Identifier

Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "access_key": "access key...",
  "secret_key": "secret key...",
  "message": "Keypair created: you will not be able to recover the secret, so take note of it"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "access_key": {
      "type": "string"
    },
    "secret_key": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json

List Access Keys
GET/v3/admin/users/{user_id}/keypairs

List Access Keys for the Admin User

Example URI

GET /v3/admin/users/user_id/keypairs
URI Parameters
HideShow
user_id
string (required) 

Unique User Identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "access_key": "access key..."
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  404
HideShow
Headers
Content-Type: application/json

Keypair

Revoke Keypair
DELETE/v3/admin/users/{user_id}/keypairs/{access_key}

Revoke a Keypair

Example URI

DELETE /v3/admin/users/user_id/keypairs/access_key
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

access_key
string (required) 

Access Key identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Keypair revoked"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  }
}
Response  404

User Roles

User Roles
GET/v3/admin/users/{user_id}/roles

List Admin User Roles

Example URI

GET /v3/admin/users/user_id/roles
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "email": "admin@company.com",
    "role": "role..."
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  404
HideShow
Headers
Content-Type: application/json

User Tenant Roles

User Tenant Roles
GET/v3/admin/users/{user_id}/roles/{tenant}

List Admin User Roles by Tenant

Example URI

GET /v3/admin/users/user_id/roles/tenant
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

tenant
string (required) 

Tenant identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "email": "admin@company.com",
    "role": "role..."
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  404
HideShow
Headers
Content-Type: application/json

Admin Roles

Create Admin Role
POST/v3/admin/roles

Create Admin Roles

Example URI

POST /v3/admin/roles
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "email": "admin@company.com",
  "role": "role..."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "email": {
      "type": "string"
    },
    "role": {
      "type": "string"
    }
  },
  "required": [
    "email",
    "role"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Admin role created successfully"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json

List Roles
GET/v3/admin/roles

List Admin Roles by Tenant

Example URI

GET /v3/admin/roles
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "role_id": "0123456789ABCD",
    "email": "admin@company.com",
    "role": "role..."
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  404
HideShow
Headers
Content-Type: application/json

Admin Role

Update Role
PUT/v3/admin/roles/{role_id}

Update Admin Roles

Example URI

PUT /v3/admin/roles/role_id
URI Parameters
HideShow
role_id
string (required) 

Unique Role identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "email": "admin@company.com",
  "role": "role..."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "email": {
      "type": "string"
    },
    "role": {
      "type": "string"
    }
  },
  "required": [
    "email",
    "role"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Admin role updated successfully"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json

Get Role
GET/v3/admin/roles/{role_id}

Get Admin Role

Example URI

GET /v3/admin/roles/role_id
URI Parameters
HideShow
role_id
string (required) 

Unique Role identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "role_id": "0123456789ABCD",
  "email": "admin@company.com",
  "role": "role..."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "role_id": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "role": {
      "type": "string"
    }
  },
  "required": [
    "role_id",
    "email",
    "role"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json

Delete Role
DELETE/v3/admin/roles/{role_id}

Delete Admin Role

Example URI

DELETE /v3/admin/roles/role_id
URI Parameters
HideShow
role_id
string (required) 

Unique Role identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Admin role deleted successfully"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json

Session User

Get Session User
GET/v3/admin/sessions/{blaize_admin_session_id}

Get Admin User from session id

Example URI

GET /v3/admin/sessions/blaize_admin_session_id
URI Parameters
HideShow
blaize_admin_session_id
string (required) 

Admin User Session identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user_id": "123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json

Upsert Foreign Key

Upsert Foreign Key
PUT/v3/users/{user_id}/foreign-key/update/{key}

Upserts the provided foreign key

Example URI

PUT /v3/users/user_id/foreign-key/update/key
URI Parameters
HideShow
user_id
string (required) 

User Id

key
string (required) 

Foreign key name

Request  with body
HideShow
Headers
Content-Type: text/plain
Body
foreign key value
Response  200
Response  400

Bundle

Actions on resource Bundle

Bundles

Bundles
GET/v3/bundles

Retrieves a list of Bundles wrapped in the element “results”

Example URI

GET /v3/bundles
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "label": "Test bundle",
      "description": "This is a bundle",
      "includes": {
        "entitlements": [],
        "meters": [],
        "credits": [],
        "bundles": []
      },
      "auto_assign": "none"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Bundle
POST/v3/bundles

Create an Bundle

Example URI

POST /v3/bundles
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test bundle",
  "description": "This is a bundle",
  "includes": {
    "entitlements": [],
    "meters": [],
    "credits": [],
    "bundles": []
  },
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "includes": {
      "type": "object",
      "properties": {
        "entitlements": {},
        "meters": {},
        "credits": {},
        "bundles": {}
      }
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Bundle

Create Bundle
POST/v3/bundles/{id}

Create an Bundle

Example URI

POST /v3/bundles/id
URI Parameters
HideShow
id
string (required) 

Unique Bundle identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test bundle",
  "description": "This is a bundle",
  "includes": {
    "entitlements": [],
    "meters": [],
    "credits": [],
    "bundles": []
  },
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "includes": {
      "type": "object",
      "properties": {
        "entitlements": {},
        "meters": {},
        "credits": {},
        "bundles": {}
      }
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Get Bundle
GET/v3/bundles/{id}

Get a single Bundle

Example URI

GET /v3/bundles/id
URI Parameters
HideShow
id
string (required) 

Unique Bundle identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test bundle",
  "description": "This is a bundle",
  "includes": {
    "entitlements": [],
    "meters": [],
    "credits": [],
    "bundles": []
  },
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "includes": {
      "type": "object",
      "properties": {
        "entitlements": {},
        "meters": {},
        "credits": {},
        "bundles": {}
      }
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  404

Delete Bundle
DELETE/v3/bundles/{id}

Delete an Bundle

Example URI

DELETE /v3/bundles/id
URI Parameters
HideShow
id
string (required) 

Unique Bundle identifier

Response  200
Response  404

Cache Configurations

Actions on resource Cache Configurations

Cache Configurations

Cache Configurations List
GET/v3/cache-configurations

Retrieves a list of Cache Configurations wrapped in the element “results”

Example URI

GET /v3/cache-configurations
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "label": "Test",
      "conditions": {
        "url_pattern": "^/forum",
        "header_patterns": {
          "Content-Type": "^text/html"
        }
      },
      "cache": {
        "origin": false,
        "decision_points": false
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Cache Configuration
POST/v3/cache-configurations

Create a Cache Configuration

Example URI

POST /v3/cache-configurations
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test",
  "conditions": {
    "url_pattern": "^/forum",
    "header_patterns": {
      "Content-Type": "^text/html"
    }
  },
  "cache": {
    "origin": false,
    "decision_points": false
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "conditions": {
      "type": "object",
      "properties": {
        "url_pattern": {
          "type": "string"
        },
        "header_patterns": {
          "type": "object",
          "properties": {
            "Content-Type": {
              "type": "string"
            }
          }
        }
      }
    },
    "cache": {
      "type": "object",
      "properties": {
        "origin": {
          "type": "boolean"
        },
        "decision_points": {
          "type": "boolean"
        }
      }
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Cache Configuration

Get Cache Configuration
GET/v3/cache-configurations/{id}

Get a single Cache Configuration

Example URI

GET /v3/cache-configurations/id
URI Parameters
HideShow
id
string (required) 

Unique Cache Configuration identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test",
  "conditions": {
    "url_pattern": "^/forum",
    "header_patterns": {
      "Content-Type": "^text/html"
    }
  },
  "cache": {
    "origin": false,
    "decision_points": false
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "conditions": {
      "type": "object",
      "properties": {
        "url_pattern": {
          "type": "string"
        },
        "header_patterns": {
          "type": "object",
          "properties": {
            "Content-Type": {
              "type": "string"
            }
          }
        }
      }
    },
    "cache": {
      "type": "object",
      "properties": {
        "origin": {
          "type": "boolean"
        },
        "decision_points": {
          "type": "boolean"
        }
      }
    }
  }
}

Delete Cache Configuration
DELETE/v3/cache-configurations/{id}

Delete a Cache Configuration

Example URI

DELETE /v3/cache-configurations/id
URI Parameters
HideShow
id
string (required) 

Unique Cache Configuration identifier

Response  200
Response  404

Update Cache Configuration
PUT/v3/cache-configurations/{id}

Update a Cache Configuration

Example URI

PUT /v3/cache-configurations/id
URI Parameters
HideShow
id
string (required) 

Unique Cache Configuration identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test",
  "conditions": {
    "url_pattern": "^/forum",
    "header_patterns": {
      "Content-Type": "^text/html"
    }
  },
  "cache": {
    "origin": false,
    "decision_points": false
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "conditions": {
      "type": "object",
      "properties": {
        "url_pattern": {
          "type": "string"
        },
        "header_patterns": {
          "type": "object",
          "properties": {
            "Content-Type": {
              "type": "string"
            }
          }
        }
      }
    },
    "cache": {
      "type": "object",
      "properties": {
        "origin": {
          "type": "boolean"
        },
        "decision_points": {
          "type": "boolean"
        }
      }
    }
  }
}
Response  200
Response  400
HideShow
Headers
Content-Type: application/json

Cache Management

Cache Management

Evict Origin
POST/v3/cache-management/evict-origin

Evict all cached origin requests with path matching the supplied regular expression

Example URI

POST /v3/cache-management/evict-origin
Request  1 line containing valid Java Regular Expression
HideShow
Headers
Content-Type: text/plain
Body
/news/.*
Response  200
Response  400

Company

Actions on resource Company

Companies

Companies
GET/v3/companies

Retrieves a list of Companies wrapped in the element “results”

Example URI

GET /v3/companies
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "name": "Company name",
      "description": "Company description",
      "website": "company.com",
      "contact": "Company contact",
      "account_manager": "Company account manager"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Company
POST/v3/companies

Create a Company

Example URI

POST /v3/companies
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Company name",
  "description": "Company description",
  "website": "company.com",
  "contact": "Company contact",
  "account_manager": "Company account manager"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "website": {
      "type": "string"
    },
    "contact": {
      "type": "string"
    },
    "account_manager": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Company

Get Company
GET/v3/companies/{id}

Get a single Company

Example URI

GET /v3/companies/id
URI Parameters
HideShow
id
string (required) 

Unique Company identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Company name",
  "description": "Company description",
  "website": "company.com",
  "contact": "Company contact",
  "account_manager": "Company account manager"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "website": {
      "type": "string"
    },
    "contact": {
      "type": "string"
    },
    "account_manager": {
      "type": "string"
    }
  }
}

Delete Company
DELETE/v3/companies/{id}

Delete a Company

Example URI

DELETE /v3/companies/id
URI Parameters
HideShow
id
string (required) 

Unique Company identifier

Response  200
Response  404

Update Company
PUT/v3/companies/{id}

Update a Company

Example URI

PUT /v3/companies/id
URI Parameters
HideShow
id
string (required) 

Unique Company identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Company name",
  "description": "Company description",
  "website": "company.com",
  "contact": "Company contact",
  "account_manager": "Company account manager"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "website": {
      "type": "string"
    },
    "contact": {
      "type": "string"
    },
    "account_manager": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Configuration

Blaize tenant configuration

Configuration

Save Configuration
POST/v3/configuration

Creates/Updates tenant configuration

Example URI

POST /v3/configuration
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "db.tables.extendedProfiles": "value",
  "db.tables.grants": "value",
  "db.tables.forms": "value",
  "db.tables.features": "value",
  "db.tables.requestRules": "value",
  "db.tables.entitlements": "value",
  "db.tables.formFields": "value",
  "db.tables.companies": "value",
  "db.tables.accounts": "value",
  "db.tables.userSchemaFields": "value",
  "db.tables.users": "value",
  "db.tables.userAttributes": "value",
  "db.tables.accountUsers": "value",
  "db.tables.staticItems": "value",
  "db.tables.webhooks": "value",
  "db.tables.adminUserTenantRoles": "value",
  "db.tables.adminUsers": "value",
  "db.tables.adminKeyPairs": "value",
  "oauth.google.apis.host": "value",
  "oauth.linkedin.clientSecret": "value",
  "oauth.linkedin.apis.host": "value",
  "oauth.google.clientSecret": "value",
  "oauth.google.callbackUri": "value",
  "oauth.linkedin.clientId": "value",
  "oauth.linkedin.callbackUri": "value",
  "oauth.google.clientId": "value",
  "oauth.facebook.callbackUri": "value",
  "oauth.facebook.clientSecret": "value",
  "oauth.facebook.apis.host": "value",
  "oauth.facebook.clientId": "value",
  "cdn.origin": "value",
  "redis.port": "value",
  "elasticsearch.url": "value",
  "aws.region": "value",
  "redis.host": "value",
  "email.from": "value",
  "authentication.password.requireEmailVerfication": "value"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "db.tables.extendedProfiles": {
      "type": "string"
    },
    "db.tables.grants": {
      "type": "string"
    },
    "db.tables.forms": {
      "type": "string"
    },
    "db.tables.features": {
      "type": "string"
    },
    "db.tables.requestRules": {
      "type": "string"
    },
    "db.tables.entitlements": {
      "type": "string"
    },
    "db.tables.formFields": {
      "type": "string"
    },
    "db.tables.companies": {
      "type": "string"
    },
    "db.tables.accounts": {
      "type": "string"
    },
    "db.tables.userSchemaFields": {
      "type": "string"
    },
    "db.tables.users": {
      "type": "string"
    },
    "db.tables.userAttributes": {
      "type": "string"
    },
    "db.tables.accountUsers": {
      "type": "string"
    },
    "db.tables.staticItems": {
      "type": "string"
    },
    "db.tables.webhooks": {
      "type": "string"
    },
    "db.tables.adminUserTenantRoles": {
      "type": "string"
    },
    "db.tables.adminUsers": {
      "type": "string"
    },
    "db.tables.adminKeyPairs": {
      "type": "string"
    },
    "oauth.google.apis.host": {
      "type": "string"
    },
    "oauth.linkedin.clientSecret": {
      "type": "string"
    },
    "oauth.linkedin.apis.host": {
      "type": "string"
    },
    "oauth.google.clientSecret": {
      "type": "string"
    },
    "oauth.google.callbackUri": {
      "type": "string"
    },
    "oauth.linkedin.clientId": {
      "type": "string"
    },
    "oauth.linkedin.callbackUri": {
      "type": "string"
    },
    "oauth.google.clientId": {
      "type": "string"
    },
    "oauth.facebook.callbackUri": {
      "type": "string"
    },
    "oauth.facebook.clientSecret": {
      "type": "string"
    },
    "oauth.facebook.apis.host": {
      "type": "string"
    },
    "oauth.facebook.clientId": {
      "type": "string"
    },
    "cdn.origin": {
      "type": "string"
    },
    "redis.port": {
      "type": "string"
    },
    "elasticsearch.url": {
      "type": "string"
    },
    "aws.region": {
      "type": "string"
    },
    "redis.host": {
      "type": "string"
    },
    "email.from": {
      "type": "string"
    },
    "authentication.password.requireEmailVerfication": {
      "type": "string"
    }
  }
}
Response  200
Response  400
HideShow
Headers
Content-Type: application/json

Get Configuration
GET/v3/configuration

Retrieves the tenant configuration

Example URI

GET /v3/configuration
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "db.tables.extendedProfiles": "value",
  "db.tables.grants": "value",
  "db.tables.forms": "value",
  "db.tables.features": "value",
  "db.tables.requestRules": "value",
  "db.tables.entitlements": "value",
  "db.tables.formFields": "value",
  "db.tables.companies": "value",
  "db.tables.accounts": "value",
  "db.tables.userSchemaFields": "value",
  "db.tables.users": "value",
  "db.tables.userAttributes": "value",
  "db.tables.accountUsers": "value",
  "db.tables.staticItems": "value",
  "db.tables.webhooks": "value",
  "db.tables.adminUserTenantRoles": "value",
  "db.tables.adminUsers": "value",
  "db.tables.adminKeyPairs": "value",
  "oauth.google.apis.host": "value",
  "oauth.linkedin.clientSecret": "value",
  "oauth.linkedin.apis.host": "value",
  "oauth.google.clientSecret": "value",
  "oauth.google.callbackUri": "value",
  "oauth.linkedin.clientId": "value",
  "oauth.linkedin.callbackUri": "value",
  "oauth.google.clientId": "value",
  "oauth.facebook.callbackUri": "value",
  "oauth.facebook.clientSecret": "value",
  "oauth.facebook.apis.host": "value",
  "oauth.facebook.clientId": "value",
  "cdn.origin": "value",
  "redis.port": "value",
  "elasticsearch.url": "value",
  "aws.region": "value",
  "redis.host": "value",
  "email.from": "value",
  "authentication.password.requireEmailVerfication": "value"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "db.tables.extendedProfiles": {
      "type": "string"
    },
    "db.tables.grants": {
      "type": "string"
    },
    "db.tables.forms": {
      "type": "string"
    },
    "db.tables.features": {
      "type": "string"
    },
    "db.tables.requestRules": {
      "type": "string"
    },
    "db.tables.entitlements": {
      "type": "string"
    },
    "db.tables.formFields": {
      "type": "string"
    },
    "db.tables.companies": {
      "type": "string"
    },
    "db.tables.accounts": {
      "type": "string"
    },
    "db.tables.userSchemaFields": {
      "type": "string"
    },
    "db.tables.users": {
      "type": "string"
    },
    "db.tables.userAttributes": {
      "type": "string"
    },
    "db.tables.accountUsers": {
      "type": "string"
    },
    "db.tables.staticItems": {
      "type": "string"
    },
    "db.tables.webhooks": {
      "type": "string"
    },
    "db.tables.adminUserTenantRoles": {
      "type": "string"
    },
    "db.tables.adminUsers": {
      "type": "string"
    },
    "db.tables.adminKeyPairs": {
      "type": "string"
    },
    "oauth.google.apis.host": {
      "type": "string"
    },
    "oauth.linkedin.clientSecret": {
      "type": "string"
    },
    "oauth.linkedin.apis.host": {
      "type": "string"
    },
    "oauth.google.clientSecret": {
      "type": "string"
    },
    "oauth.google.callbackUri": {
      "type": "string"
    },
    "oauth.linkedin.clientId": {
      "type": "string"
    },
    "oauth.linkedin.callbackUri": {
      "type": "string"
    },
    "oauth.google.clientId": {
      "type": "string"
    },
    "oauth.facebook.callbackUri": {
      "type": "string"
    },
    "oauth.facebook.clientSecret": {
      "type": "string"
    },
    "oauth.facebook.apis.host": {
      "type": "string"
    },
    "oauth.facebook.clientId": {
      "type": "string"
    },
    "cdn.origin": {
      "type": "string"
    },
    "redis.port": {
      "type": "string"
    },
    "elasticsearch.url": {
      "type": "string"
    },
    "aws.region": {
      "type": "string"
    },
    "redis.host": {
      "type": "string"
    },
    "email.from": {
      "type": "string"
    },
    "authentication.password.requireEmailVerfication": {
      "type": "string"
    }
  }
}

Install

Install tenant
POST/v3/initialize

Installs a tenant in Blaize

Example URI

POST /v3/initialize
Response  200
Response  400
HideShow
Headers
Content-Type: application/json

Certs

Create Cert
POST/v3/certs

Creates a cert

Example URI

POST /v3/certs
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "company.com",
  "private_key": "private_key...",
  "cert": "cert..."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "private_key": {
      "type": "string"
    },
    "cert": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Delete Cert
DELETE/v3/certs

Delete a Cert

Example URI

DELETE /v3/certs
Response  200
Response  404

Credit

Actions on resource Credit

Credits

Credits
GET/v3/credits

Retrieves a list of Credits wrapped in the element “results”

Example URI

GET /v3/credits
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "label": "Test credit",
      "description": "This is an credit",
      "delivers": [
        "ENTITLEMENT_ID"
      ],
      "unit": "views",
      "quantity": 5,
      "auto_assign": "none"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Credit
POST/v3/credits

Create an Credit

Example URI

POST /v3/credits
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test credit",
  "description": "This is an credit",
  "delivers": [
    "ENTITLEMENT_ID"
  ],
  "unit": "views",
  "quantity": 5,
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "delivers": {
      "type": "array"
    },
    "unit": {
      "type": "string"
    },
    "quantity": {
      "type": "number"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Credit

Create Credit
POST/v3/credits/{id}

Create an Credit

Example URI

POST /v3/credits/id
URI Parameters
HideShow
id
string (required) 

Unique Credit identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test credit",
  "description": "This is an credit",
  "delivers": [
    "ENTITLEMENT_ID"
  ],
  "unit": "views",
  "quantity": 5,
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "delivers": {
      "type": "array"
    },
    "unit": {
      "type": "string"
    },
    "quantity": {
      "type": "number"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Get Credit
GET/v3/credits/{id}

Get a single Credit

Example URI

GET /v3/credits/id
URI Parameters
HideShow
id
string (required) 

Unique Credit identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test credit",
  "description": "This is an credit",
  "delivers": [
    "ENTITLEMENT_ID"
  ],
  "unit": "views",
  "quantity": 5,
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "delivers": {
      "type": "array"
    },
    "unit": {
      "type": "string"
    },
    "quantity": {
      "type": "number"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  404

Delete Credit
DELETE/v3/credits/{id}

Delete an Credit

Example URI

DELETE /v3/credits/id
URI Parameters
HideShow
id
string (required) 

Unique Credit identifier

Response  200
Response  404

Decision Engine

Decision Engine

Decision Engine
POST/v3/decision-engine

The Blaize Decision Engine can be invoked via the Admin API to calculate an HTTP Response based upon Request-Level Rules created in the Admin Console. This functionality is build into the Blaize Dynamic CDN but the API variant is useful for CMS or edge side integrations.

Example URI

POST /v3/decision-engine
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "path": "/x.html",
  "http_method": "POST",
  "session": "xxx-xxx-xxx",
  "foreign_keys": {},
  "request_headers": {
    "User-Agent": "<userAgent>"
  },
  "content_metadata": {
    "publishedDate": "<contentAge>"
  },
  "jwt": "xxx-xxx-xxx",
  "btr": "17e74b9e49e66282e55d4b7ec73de951"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "path": {
      "type": "string"
    },
    "http_method": {
      "type": "string"
    },
    "session": {
      "type": "string"
    },
    "foreign_keys": {
      "type": "object",
      "properties": {},
      "description": "Foreign system and ID used to identify the user"
    },
    "request_headers": {
      "type": "object",
      "properties": {
        "User-Agent": {
          "type": "string"
        }
      }
    },
    "content_metadata": {
      "type": "object",
      "properties": {
        "publishedDate": {
          "type": "string"
        }
      }
    },
    "jwt": {
      "type": "string"
    },
    "btr": {
      "type": "string",
      "description": "MD5-hex-encoding of: path + \"|\" + trusted referrer secret"
    }
  },
  "required": [
    "path"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "301",
  "body": "Redirecting to login page...",
  "headers": {
    "Location": "/login.html"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "status": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "headers": {
      "type": "object",
      "properties": {
        "Location": {
          "type": "string"
        }
      }
    }
  }
}
Response  409

Entitlement

Actions on resource Entitlement

Entitlements

Entitlements
GET/v3/entitlements

Retrieves a list of Entitlements wrapped in the element “results”

Example URI

GET /v3/entitlements
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "label": "Test entitlement",
      "description": "This is an entitlement",
      "auto_assign": "none"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Entitlement
POST/v3/entitlements

Create an Entitlement

Example URI

POST /v3/entitlements
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test entitlement",
  "description": "This is an entitlement",
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Entitlement

Create Entitlement
POST/v3/entitlements/{id}

Create an Entitlement

Example URI

POST /v3/entitlements/id
URI Parameters
HideShow
id
string (required) 

Unique Entitlement identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test entitlement",
  "description": "This is an entitlement",
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Get Entitlement
GET/v3/entitlements/{id}

Get a single Entitlement

Example URI

GET /v3/entitlements/id
URI Parameters
HideShow
id
string (required) 

Unique Entitlement identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test entitlement",
  "description": "This is an entitlement",
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  404

Delete Entitlement
DELETE/v3/entitlements/{id}

Delete an Entitlement

Example URI

DELETE /v3/entitlements/id
URI Parameters
HideShow
id
string (required) 

Unique Entitlement identifier

Response  200
Response  404

Products

Actions on resource Product

Products

Products
GET/v3/products

Retrieves all configured Products

Example URI

GET /v3/products
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "id": "one",
      "label": "One month access",
      "description": "One month access",
      "entitlement": {
        "id": "gold-bundle",
        "type": "bundle"
      },
      "mapping": {
        "braintree_one_off": {
          "price_points": [
            {
              "id": "ten",
              "label": "Ten Dollars",
              "price": 10
            }
          ]
        }
      }
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Product

Get Product
GET/v3/products/{id}

Get a single Product

Example URI

GET /v3/products/id
URI Parameters
HideShow
id
string (required) 

Unique Product identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "one",
  "label": "One month access",
  "description": "One month access",
  "entitlement": {
    "id": "gold-bundle",
    "type": "bundle"
  },
  "mapping": {
    "braintree_one_off": {
      "price_points": [
        {
          "id": "ten",
          "label": "Ten Dollars",
          "price": 10
        }
      ]
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "month-one-off (string) - `Product Id`"
    },
    "label": {
      "type": "string",
      "description": "`Product label`"
    },
    "description": {
      "type": "string"
    },
    "entitlement": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "`Entitlement ID/slug`"
        },
        "type": {
          "type": "string",
          "description": "`Entitlement type (always 'bundle')`"
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "mapping": {
      "type": "object",
      "properties": {},
      "oneOf": [
        {
          "properties": {
            "braintree_one_off": {
              "type": "object",
              "properties": {
                "price_points": {
                  "type": "array"
                }
              }
            }
          }
        },
        {
          "properties": {
            "braintree_recurring": {
              "type": "object",
              "properties": {
                "plan_id": {
                  "type": "string",
                  "description": "`Plan Id as configured in Braintree`"
                }
              }
            }
          }
        }
      ]
    }
  },
  "required": [
    "entitlement",
    "mapping"
  ]
}

Delete Product
DELETE/v3/products/{id}

Delete a Product

Example URI

DELETE /v3/products/id
URI Parameters
HideShow
id
string (required) 

Unique Product identifier

Response  200
Response  404

Save Product
PUT/v3/products/{id}

Save a Product

Example URI

PUT /v3/products/id
URI Parameters
HideShow
id
string (required) 

Unique Product identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "one",
  "label": "One month access",
  "description": "One month access",
  "entitlement": {
    "id": "gold-bundle",
    "type": "bundle"
  },
  "mapping": {
    "braintree_one_off": {
      "price_points": [
        {
          "id": "ten",
          "label": "Ten Dollars",
          "price": 10
        }
      ]
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "month-one-off (string) - `Product Id`"
    },
    "label": {
      "type": "string",
      "description": "`Product label`"
    },
    "description": {
      "type": "string"
    },
    "entitlement": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "`Entitlement ID/slug`"
        },
        "type": {
          "type": "string",
          "description": "`Entitlement type (always 'bundle')`"
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "mapping": {
      "type": "object",
      "properties": {},
      "oneOf": [
        {
          "properties": {
            "braintree_one_off": {
              "type": "object",
              "properties": {
                "price_points": {
                  "type": "array"
                }
              }
            }
          }
        },
        {
          "properties": {
            "braintree_recurring": {
              "type": "object",
              "properties": {
                "plan_id": {
                  "type": "string",
                  "description": "`Plan Id as configured in Braintree`"
                }
              }
            }
          }
        }
      ]
    }
  },
  "required": [
    "entitlement",
    "mapping"
  ]
}
Response  201
Response  200
Response  400
Response  409
HideShow
Headers
Content-Type: application/json

Form

Actions on resource Form

Forms

Forms
GET/v3/forms

Retrieves a list of Forms wrapped in the element “results”

Example URI

GET /v3/forms
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "title": "Test",
      "internal-description": "This form is for testing",
      "public-description": "Please provide some info",
      "registration": true,
      "fields": [
        {
          "slug": "first-name",
          "placeholder": "First name",
          "required": true,
          "order": 1
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Form

Get Form
GET/v3/forms/{slug}

Get a single Form

Example URI

GET /v3/forms/slug
URI Parameters
HideShow
slug
string (required) 

Unique Form identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "title": "Test",
  "internal-description": "This form is for testing",
  "public-description": "Please provide some info",
  "registration": true,
  "fields": [
    {
      "slug": "first-name",
      "placeholder": "First name",
      "required": true,
      "order": 1
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "internal-description": {
      "type": "string"
    },
    "public-description": {
      "type": "string"
    },
    "registration": {
      "type": "boolean"
    },
    "fields": {
      "type": "array"
    }
  }
}

Delete Form
DELETE/v3/forms/{slug}

Delete a Form

Example URI

DELETE /v3/forms/slug
URI Parameters
HideShow
slug
string (required) 

Unique Form identifier

Response  200
Response  404

Save Form
PUT/v3/forms/{slug}

Save a Form

Example URI

PUT /v3/forms/slug
URI Parameters
HideShow
slug
string (required) 

Unique Form identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "title": "Test",
  "internal-description": "This form is for testing",
  "public-description": "Please provide some info",
  "registration": true,
  "fields": [
    {
      "slug": "first-name",
      "placeholder": "First name",
      "required": true,
      "order": 1
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "title": {
      "type": "string"
    },
    "internal-description": {
      "type": "string"
    },
    "public-description": {
      "type": "string"
    },
    "registration": {
      "type": "boolean"
    },
    "fields": {
      "type": "array"
    }
  }
}
Response  201
Response  200
Response  400
HideShow
Headers
Content-Type: application/json

Feature Rules

Actions on resource Feature Rules

Feature Rules

Feature Rules
GET/v3/feature-rules

Retrieves a list of Feature Rules

Example URI

GET /v3/feature-rules
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "featureRuleId",
    "version": 1,
    "tags": [],
    "label": "Test feature",
    "description": "Test feature",
    "last_updated": "2011-11-11T11:11:11.000"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Feature Rule

Delete Feature Rule
DELETE/v3/feature-rules/{featureRuleId}

Delete a Feature Rule

Example URI

DELETE /v3/feature-rules/featureRuleId
URI Parameters
HideShow
featureRuleId
string (required) 

Unique Feature Rule identifier

Response  200
HideShow
Body
{
  "message": "featureRuleId deleted successfully"
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404

Feature Rule Versions

Get Feature Rule Version
GET/v3/feature-rules/{featureRuleId}/versions

Get all versions for a single Feature Rule

Example URI

GET /v3/feature-rules/featureRuleId/versions
URI Parameters
HideShow
featureRuleId
string (required) 

Unique Feature Rule identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "featureRuleId",
    "version": 1,
    "tags": [],
    "label": "Test feature",
    "description": "Test feature",
    "last_updated": "2011-11-11T11:11:11.000"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create Feature Rule
POST/v3/feature-rules/{featureRuleId}/versions

Create a Feature Rule Version

Example URI

POST /v3/feature-rules/featureRuleId/versions
URI Parameters
HideShow
featureRuleId
string (required) 

Unique Feature Rule identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test feature",
  "description": "Test feature",
  "requirements_script": "return []",
  "action_script": "return \"this is a test\"",
  "script_type": "javascript",
  "graph_state": "{\"property1\": \"value1\"}",
  "editing_mode": "manual"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "requirements_script": {
      "type": "string"
    },
    "action_script": {
      "type": "string"
    },
    "script_type": {
      "type": "string"
    },
    "graph_state": {
      "type": "string"
    },
    "editing_mode": {
      "type": "string"
    }
  }
}
Response  200
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Feature Rule created successfully",
  "uri": "http://host/v3/feature-rules/featureRuleId/versions"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "uri": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json

Feature Rule Version

Get Feature Rule Version
GET/v3/feature-rules/{featureRuleId}/versions/{versionId}

Get a version for a single Feature Rule

Example URI

GET /v3/feature-rules/featureRuleId/versions/versionId
URI Parameters
HideShow
featureRuleId
string (required) 

Unique Feature Rule identifier

versionId
string (required) 

Unique Version identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "featureRuleId",
  "version": 1,
  "tags": [],
  "label": "Test feature",
  "description": "Test feature",
  "requirements_script": "return []",
  "action_script": "return \"this is a test\"",
  "script_type": "javascript",
  "graph_state": "{\"property1\": \"value1\"}",
  "editing_mode": "manual",
  "last_updated": "2011-11-11T11:11:11.000"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "version": {
      "type": "number"
    },
    "tags": {},
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "requirements_script": {
      "type": "string"
    },
    "action_script": {
      "type": "string"
    },
    "script_type": {
      "type": "string"
    },
    "graph_state": {
      "type": "string"
    },
    "editing_mode": {
      "type": "string"
    },
    "last_updated": {
      "type": "string"
    }
  }
}

Delete Feature Rule Version
DELETE/v3/feature-rules/{featureRuleId}/versions/{versionId}

Delete a single version of a Feature Rule

Example URI

DELETE /v3/feature-rules/featureRuleId/versions/versionId
URI Parameters
HideShow
featureRuleId
string (required) 

Unique Feature Rule identifier

versionId
string (required) 

Unique Version identifier

Response  200
HideShow
Body
{
  "message": "featureRuleId deleted successfully"
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404

Feature Rule Version Tags

Save Feature Rule
PUT/v3/feature-rules/{featureRuleId}/versions/{versionId}/tags

Save a Feature Rule Version Tags

Example URI

PUT /v3/feature-rules/featureRuleId/versions/versionId/tags
URI Parameters
HideShow
featureRuleId
string (required) 

Unique Feature Rule identifier

versionId
string (required) 

Unique Version identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
[
  "tag1",
  "tag2"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  200
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "featureRuleId tag/s saved successfully",
  "uri": "http://host/v3/feature-rules/featureRuleId/versions/versionId/tags"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "uri": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json

Grants

Actions on resource Grant

User Grants

User Grants
GET/v3/users/{userId}/grants

Retrieves a list of User Grants

Example URI

GET /v3/users/userId/grants
URI Parameters
HideShow
userId
string (required) 

Unique User identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "grantId": "0123456789ABCD",
      "entitlement_type": "entitlement",
      "entitlement_id": "XX0123456789ABCD"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Grant
POST/v3/users/{userId}/grants

Create a User Grant

Example URI

POST /v3/users/userId/grants
URI Parameters
HideShow
userId
string (required) 

Unique User identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "entitlement_type": "entitlement",
  "entitlement_id": "XX0123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "entitlement_type": {
      "type": "string"
    },
    "entitlement_id": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

User Grant

Get Grant
GET/v3/users/{userId}/grants/{grantId}

Get a single Grant

Example URI

GET /v3/users/userId/grants/grantId
URI Parameters
HideShow
userId
string (required) 

Unique User identifier

grantId
string (required) 

Unique Grant identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "grantId": "0123456789ABCD",
  "entitlement_type": "entitlement",
  "entitlement_id": "XX0123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "grantId": {
      "type": "string"
    },
    "entitlement_type": {
      "type": "string"
    },
    "entitlement_id": {
      "type": "string"
    }
  }
}

Delete Grant
DELETE/v3/users/{userId}/grants/{grantId}

Delete a Grant

Example URI

DELETE /v3/users/userId/grants/grantId
URI Parameters
HideShow
userId
string (required) 

Unique User identifier

grantId
string (required) 

Unique Grant identifier

Response  200
Response  404

Create Grant
POST/v3/users/{userId}/grants/{grantId}

Create an Account Grant

Example URI

POST /v3/users/userId/grants/grantId
URI Parameters
HideShow
userId
string (required) 

Unique User identifier

grantId
string (required) 

Unique Grant identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "entitlement_type": "entitlement",
  "entitlement_id": "XX0123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "entitlement_type": {
      "type": "string"
    },
    "entitlement_id": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Access Model

User Access Model
GET/v3/users/{userId}/accessModel

Retrieves a user access model

Example URI

GET /v3/users/userId/accessModel
URI Parameters
HideShow
userId
string (required) 

Unique User identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "meters": {},
  "credits": {},
  "delivered_entitlements": [
    {
      "id": "0123456789ABCD",
      "direct": true,
      "meteredBy": [],
      "creditedBy": []
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "meters": {
      "type": "object",
      "properties": {}
    },
    "credits": {
      "type": "object",
      "properties": {}
    },
    "delivered_entitlements": {
      "type": "array"
    }
  }
}
Response  404

Account Grant

Get Grant
GET/v3/accounts/{accountId}/grants/{grantId}

Get a single Account Grant

Example URI

GET /v3/accounts/accountId/grants/grantId
URI Parameters
HideShow
accountId
string (required) 

Unique Account identifier

grantId
string (required) 

Unique Grant identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "grantId": "0123456789ABCD",
  "entitlement_type": "entitlement",
  "entitlement_id": "XX0123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "grantId": {
      "type": "string"
    },
    "entitlement_type": {
      "type": "string"
    },
    "entitlement_id": {
      "type": "string"
    }
  }
}

Delete Grant
DELETE/v3/accounts/{accountId}/grants/{grantId}

Delete an Account Grant

Example URI

DELETE /v3/accounts/accountId/grants/grantId
URI Parameters
HideShow
accountId
string (required) 

Unique Account identifier

grantId
string (required) 

Unique Grant identifier

Response  200
Response  404

Meter

Actions on resource Meter

Meters

Meters
GET/v3/meters

Retrieves a list of Meters wrapped in the element “results”

Example URI

GET /v3/meters
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "label": "Test meter",
      "description": "This is a meter",
      "unit": "views",
      "limit": 5,
      "cycle": "calendar",
      "period": "monthly",
      "timezone": "+0:00",
      "auto_assign": "none"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Meter
POST/v3/meters

Create an Meter

Example URI

POST /v3/meters
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test meter",
  "description": "This is a meter",
  "unit": "views",
  "limit": 5,
  "cycle": "calendar",
  "period": "monthly",
  "timezone": "+0:00",
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "unit": {
      "type": "string"
    },
    "limit": {
      "type": "number"
    },
    "cycle": {
      "type": "string"
    },
    "period": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Meter

Create Meter
POST/v3/meters/{id}

Create an Meter

Example URI

POST /v3/meters/id
URI Parameters
HideShow
id
string (required) 

Unique Meter identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test meter",
  "description": "This is a meter",
  "unit": "views",
  "limit": 5,
  "cycle": "calendar",
  "period": "monthly",
  "timezone": "+0:00",
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "unit": {
      "type": "string"
    },
    "limit": {
      "type": "number"
    },
    "cycle": {
      "type": "string"
    },
    "period": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Get Meter
GET/v3/meters/{id}

Get a single Meter

Example URI

GET /v3/meters/id
URI Parameters
HideShow
id
string (required) 

Unique Meter identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test meter",
  "description": "This is a meter",
  "unit": "views",
  "limit": 5,
  "cycle": "calendar",
  "period": "monthly",
  "timezone": "+0:00",
  "auto_assign": "none"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "unit": {
      "type": "string"
    },
    "limit": {
      "type": "number"
    },
    "cycle": {
      "type": "string"
    },
    "period": {
      "type": "string"
    },
    "timezone": {
      "type": "string"
    },
    "auto_assign": {
      "type": "string"
    }
  }
}
Response  404

Delete Meter
DELETE/v3/meters/{id}

Delete an Meter

Example URI

DELETE /v3/meters/id
URI Parameters
HideShow
id
string (required) 

Unique Meter identifier

Response  200
Response  404

Gifts

Gifts

List All Unclaimed Gifts
GET/v3/gift

Example URI

GET /v3/gift
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "58c3852bb23f3467",
    "created": "2018-04-27T09:15:28Z",
    "claimed": "Hello, world!",
    "uri": "/news/local/story",
    "cross_device_session": "Hello, world!"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create gift
POST/v3/gift

Example URI

POST /v3/gift
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "58c3852bb23f3467",
  "created": "2018-04-27T09:15:28Z",
  "claimed": "Hello, world!",
  "uri": "/news/local/story",
  "cross_device_session": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Gift Id (passed as ?gift parameter in claim link)"
    },
    "created": {
      "type": "string",
      "description": "UTC timestamp when gift was created"
    },
    "claimed": {
      "type": "string",
      "description": "UTC timestamp when gift was claimed"
    },
    "uri": {
      "type": "string",
      "description": "1823.html (string) - Path portion of URL gift will allow access to"
    },
    "cross_device_session": {
      "type": "string",
      "description": "ID of cross-device session of claiming user (if claimed)"
    }
  }
}
Response  200
HideShow
Body
{
  "gift": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "gift": {
      "type": "string",
      "description": "id: 65c7da04b734a15f (string)"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}

Gift

Delete Gift
DELETE/v3/gift/{giftId}

Example URI

DELETE /v3/gift/469efefbe4c4cae0
URI Parameters
HideShow
giftId
string (required) Example: 469efefbe4c4cae0
Response  200
Response  404

Request Rules

Actions on resource Request Rules

Request rules

Request Rules List
GET/v3/request-rules

Retrieves a list of Request Rules wrapped in the element “results”

Example URI

GET /v3/request-rules
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "label": "Test",
      "conditions": {
        "url_pattern": "^/forum",
        "method": "GET"
      },
      "requirements_script": "return []",
      "action_script": "return \"this is a test\"",
      "script_type": "javascript",
      "graph_state": "{\"property1\": \"value1\"}",
      "editing_mode": "manual"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Save Request Rule
PUT/v3/request-rules

Save a Request Rule

Example URI

PUT /v3/request-rules
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test",
  "conditions": {
    "url_pattern": "^/forum",
    "method": "GET"
  },
  "requirements_script": "return []",
  "action_script": "return \"this is a test\"",
  "script_type": "javascript",
  "graph_state": "{\"property1\": \"value1\"}",
  "editing_mode": "manual"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "conditions": {
      "type": "object",
      "properties": {
        "url_pattern": {
          "type": "string"
        },
        "method": {
          "type": "string"
        }
      }
    },
    "requirements_script": {
      "type": "string"
    },
    "action_script": {
      "type": "string"
    },
    "script_type": {
      "type": "string"
    },
    "graph_state": {
      "type": "string"
    },
    "editing_mode": {
      "type": "string"
    }
  }
}
Response  201
Response  200
Response  400
HideShow
Headers
Content-Type: application/json

Request Rule

Get Request Rule
GET/v3/request-rules/{id}

Get a single Request Rule

Example URI

GET /v3/request-rules/id
URI Parameters
HideShow
id
string (required) 

Unique Request Rule identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test",
  "conditions": {
    "url_pattern": "^/forum",
    "method": "GET"
  },
  "requirements_script": "return []",
  "action_script": "return \"this is a test\"",
  "script_type": "javascript",
  "graph_state": "{\"property1\": \"value1\"}",
  "editing_mode": "manual"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "conditions": {
      "type": "object",
      "properties": {
        "url_pattern": {
          "type": "string"
        },
        "method": {
          "type": "string"
        }
      }
    },
    "requirements_script": {
      "type": "string"
    },
    "action_script": {
      "type": "string"
    },
    "script_type": {
      "type": "string"
    },
    "graph_state": {
      "type": "string"
    },
    "editing_mode": {
      "type": "string"
    }
  }
}

Delete Request Rule
DELETE/v3/request-rules/{id}

Delete a Request Rule

Example URI

DELETE /v3/request-rules/id
URI Parameters
HideShow
id
string (required) 

Unique Request Rule identifier

Response  200
Response  404

Session

Actions on resource Session

Sessions

Create new Session
POST/v3/sessions

Create a new Session

Example URI

POST /v3/sessions
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "identifiers": {
    "email_address": "joe.blow@company.com"
  },
  "validators": {
    "password": "mysecurepassword123"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    },
    "validators": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "identifiers",
    "validators"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "expiryDate": "2018-11-15 14:29 PM UTC",
  "startDate": "2017-11-15 14:29 PM UTC",
  "authenticated": true,
  "session_id": "SS0123456789ABCD",
  "user_id": "UU0123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "expiryDate": {
      "type": "string"
    },
    "startDate": {
      "type": "string"
    },
    "authenticated": {
      "type": "boolean"
    },
    "session_id": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json

User

Get a Session
GET/v3/sessions/{id}

Lookup a Session

Example URI

GET /v3/sessions/id
URI Parameters
HideShow
id
string (required) 

Unique Session identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "session_variables": {},
  "user_id": "UU0123456789ABCD",
  "sessions": [
    {
      "expiryDate": "2018-11-15 14:29 PM UTC",
      "startDate": "2017-11-15 14:29 PM UTC",
      "authenticated": true,
      "session_id": "SS0123456789ABCD",
      "user_id": "UU0123456789ABCD"
    }
  ],
  "access_model": {
    "meters": [],
    "credits": [],
    "delivered_entitlements": []
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "session_variables": {
      "type": "object",
      "properties": {}
    },
    "user_id": {
      "type": "string"
    },
    "sessions": {
      "type": "array"
    },
    "access_model": {
      "type": "object",
      "properties": {
        "meters": {},
        "credits": {},
        "delivered_entitlements": {}
      }
    }
  }
}

V4 Session

Actions on resource Session

V4 Sessions

Create new session under a given site
POST/v4/sessions/{site}

Create a new session under a given site

Example URI

POST /v4/sessions/site
URI Parameters
HideShow
site
string (required) 

The site ID

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "identifiers": {
    "email_address": "joe.blow@company.com"
  },
  "validators": {
    "password": "mysecurepassword123"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    },
    "validators": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "identifiers",
    "validators"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "expiryDate": "2018-11-15 14:29 PM UTC",
  "startDate": "2017-11-15 14:29 PM UTC",
  "authenticated": true,
  "session_id": "SS0123456789ABCD",
  "user_id": "UU0123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "expiryDate": {
      "type": "string"
    },
    "startDate": {
      "type": "string"
    },
    "authenticated": {
      "type": "boolean"
    },
    "session_id": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    }
  }
}
Response  400
Response  401
Response  404

V4 Sessions

Lookup a session under a given site
GET/v4/sessions/{site}/{id}

Lookup a session under a given site

Example URI

GET /v4/sessions/site/id
URI Parameters
HideShow
site
string (required) 

The site ID

id
string (required) 

Unique session identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "session_variables": {},
  "user_id": "UU0123456789ABCD",
  "sessions": [
    {
      "expiryDate": "2018-11-15 14:29 PM UTC",
      "startDate": "2017-11-15 14:29 PM UTC",
      "authenticated": true,
      "session_id": "SS0123456789ABCD",
      "user_id": "UU0123456789ABCD"
    }
  ],
  "access_model": {
    "meters": [],
    "credits": [],
    "delivered_entitlements": []
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "session_variables": {
      "type": "object",
      "properties": {}
    },
    "user_id": {
      "type": "string"
    },
    "sessions": {
      "type": "array"
    },
    "access_model": {
      "type": "object",
      "properties": {
        "meters": {},
        "credits": {},
        "delivered_entitlements": {}
      }
    }
  }
}
Response  401
Response  404

Delete a session under a given site
DELETE/v4/sessions/{site}/{id}

Delete a session under a given site

Example URI

DELETE /v4/sessions/site/id
URI Parameters
HideShow
site
string (required) 

The site ID

id
string (required) 

Unique session identifier

Response  200
HideShow
Headers
Content-Type: application/json
Response  401
Response  404

V4 Sessions

Create an anonymous session under a given site
POST/v4/anonymous-sessions/{site}

Create an anonymous session under a given site

Example URI

POST /v4/anonymous-sessions/site
URI Parameters
HideShow
site
string (required) 

The site ID

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "expiryDate": "2018-11-15 14:29 PM UTC",
  "startDate": "2017-11-15 14:29 PM UTC",
  "authenticated": true,
  "session_id": "SS0123456789ABCD",
  "user_id": "UU0123456789ABCD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "expiryDate": {
      "type": "string"
    },
    "startDate": {
      "type": "string"
    },
    "authenticated": {
      "type": "boolean"
    },
    "session_id": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    }
  }
}
Response  401

Static Items

Actions on resource Static Item

Static items

Static Items
GET/v3/static

Retrieves a list of Static Item ids wrapped in the element “results”

Example URI

GET /v3/static
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "id": "123456789ABCD"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Static Item

Get Item
GET/v3/static/{id}

Get a single Static Item

Example URI

GET /v3/static/id
URI Parameters
HideShow
id
string (required) 

Unique Static Item identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "123456789ABCD",
  "item": "Lorem ipsum..."
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "item": {
      "type": "string"
    }
  }
}

Delete Item
DELETE/v3/static/{id}

Delete a Static Item

Example URI

DELETE /v3/static/id
URI Parameters
HideShow
id
string (required) 

Unique Static Item identifier

Response  200
Response  404

Save Item
PUT/v3/static/{id}

Save a Static Item

Example URI

PUT /v3/static/id
URI Parameters
HideShow
id
string (required) 

Unique Static Item identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
"Lorem ipsum..."
}
Response  201
Response  200
Response  400
HideShow
Headers
Content-Type: application/json

Third Party Authentication

Oauth2 Authorization Code Flow Token exchange

Token exchange

Token Exchange
POST/zephr/oauth2/token

Exchanges the Oauth2 authorization code for an access token that can be used to access user resources like account information and profile.

Example URI

POST /zephr/oauth2/token
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "code": "1234567890",
  "grant_type": "code",
  "redirect_uri": "https://someUrl.com/callback"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string",
      "description": "Oauth2 Authorization Code"
    },
    "grant_type": {
      "type": "string",
      "description": "Must be set to `authorization_code`"
    },
    "redirect_uri": {
      "type": "string",
      "description": "Client's redirection endpoint. Must be an absolute URI"
    }
  },
  "required": [
    "code",
    "grant_type",
    "redirect_uri"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "scope": "user.account:read user.profile:read user.profile:update",
  "access_token": "oa_nj1dfhecrs1jwxi0wd0xk49n",
  "token_type": "bearer",
  "expires_in": 3600,
  "refresh_token": "6kuabo4gug8t9h13x7gt43cm",
  "user_id": "1234567890"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "scope": {
      "type": "string",
      "description": "The scope of the access request. Supported scopes: user.account:read, user.profile:read and user.profile:update"
    },
    "access_token": {
      "type": "string",
      "description": "The access token that can be used to obtain account and profile information"
    },
    "token_type": {
      "type": "string",
      "description": "Token type to be used in the Authorization header when requesting the resource's owner information"
    },
    "expires_in": {
      "type": "number",
      "description": "The lifetime in seconds of the access token"
    },
    "refresh_token": {
      "type": "string",
      "description": "can be used to obtain new access tokens without the resource owner intervention"
    },
    "user_id": {
      "type": "string",
      "description": "Zephr user identifier"
    }
  }
}

Token Refresh
POST/zephr/oauth2/token

Provides a new access token with the same scope as the one consented to by the resource owner.

Example URI

POST /zephr/oauth2/token
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "refresh_token": "6kuabo4gug8t9h13x7gt43cm",
  "grant_type": "refresh_token"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "refresh_token": {
      "type": "string",
      "description": "can be used to obtain new access tokens without the resource owner intervention"
    },
    "grant_type": {
      "type": "string",
      "description": "Must be set to `refresh_token`"
    }
  },
  "required": [
    "grant_type"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "scope": "user.account:read user.profile:read user.profile:update",
  "access_token": "oa_nj1dfhecrs1jwxi0wd0xk49n",
  "token_type": "bearer",
  "expires_in": 3600,
  "user_id": "1234567890"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "scope": {
      "type": "string",
      "description": "The scope of the access request. Supported scopes: user.account:read, user.profile:read and user.profile:update"
    },
    "access_token": {
      "type": "string",
      "description": "The access token that can be used to obtain account and profile information"
    },
    "token_type": {
      "type": "string",
      "description": "Token type to be used in the Authorization header when requesting the resource's owner information"
    },
    "expires_in": {
      "type": "number",
      "description": "The lifetime in seconds of the access token"
    },
    "user_id": {
      "type": "string",
      "description": "Zephr user identifier"
    }
  }
}

Users

Actions on resource User

Important Info

The “attributes” object will contain the custom-defined attributes for a user.

Users

Users List
GET/v3/users

Retrieves a list of Users wrapped in the element “results”

Example URI

GET /v3/users
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "user_id": "123456789ABCD",
      "identifiers": {
        "email_address": "joe.blow@company.com"
      },
      "attributes": {
        "first_name": "Joe",
        "surname": "Blow"
      },
      "email_verified": true
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create User
POST/v3/users

Create a new User.

Example URI

POST /v3/users
Request  with body
HideShow

This endpoint also accepts an array of user objects.

Headers
Content-Type: application/json
Body
{
  "identifiers": {
    "email_address": "joe.blow@company.com"
  },
  "validators": {
    "password": "mysecurepassword123"
  },
  "attributes": {
    "first_name": "Joe",
    "surname": "Blow"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    },
    "validators": {
      "type": "object",
      "properties": {
        "password": {
          "type": "string"
        }
      }
    },
    "attributes": {
      "type": "object",
      "properties": {
        "first_name": {
          "type": "string"
        },
        "surname": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "identifiers",
    "validators"
  ]
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

User

Get a user
GET/v3/users/{user_id}

Get a single User

Example URI

GET /v3/users/user_id
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user_id": "123456789ABCD",
  "identifiers": {
    "email_address": "joe.blow@company.com"
  },
  "attributes": {
    "first_name": "Joe",
    "surname": "Blow"
  },
  "email_verified": true
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string"
    },
    "identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    },
    "attributes": {
      "type": "object",
      "properties": {
        "first_name": {
          "type": "string"
        },
        "surname": {
          "type": "string"
        }
      }
    },
    "email_verified": {
      "type": "boolean"
    }
  }
}

Delete a User
DELETE/v3/users/{user_id}

Delete a single User

Example URI

DELETE /v3/users/user_id
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Response  200
Response  404

User attributes

Update User attributes
PUT/v3/users/{user_id}/attributes

Replace a User’s attributes. This will replace any existing attributes for the user with the attributes in the payload. To leave existing attributes in place, use PATCH.

Example URI

PUT /v3/users/user_id/attributes
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "first_name": "Joe",
  "surname": "Blow"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "first_name": {
      "type": "string"
    },
    "surname": {
      "type": "string"
    }
  }
}
Response  200
Response  404
Response  400
HideShow
Headers
Content-Type: application/json

Update User attributes
PATCH/v3/users/{user_id}/attributes

Update a User attributes. Any of the user’s existing attributes not specified in the payload will be left in-place.

Example URI

PATCH /v3/users/user_id/attributes
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "first_name": "Joe",
  "surname": "Blow"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "first_name": {
      "type": "string"
    },
    "surname": {
      "type": "string"
    }
  }
}
Response  200
Response  404
Response  400
HideShow
Headers
Content-Type: application/json

User email

Important Info

To update a User email address, first is required to send a POST to request an email to be sent to the User’s new email address with a link for the user to click on so as to verify that he requested this email address change. If the Require Email Verification configuration is set, the verification email will be sent to the current email address.

Start email address update
POST/v3/users/{user_id}/update-email

Start email address update

Example URI

POST /v3/users/user_id/update-email
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "new_identifiers": {
    "email_address": "joe.blow@company.com"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "new_identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "new_identifiers"
  ]
}
Response  200
Response  404
Response  400
HideShow
Headers
Content-Type: application/json

User password

Important Info

To reset a User password, first is required to send a POST to request an email to be sent to the User’s email with a link for the user to click on so as to verify that he requested this password change.

Start password reset
POST/v3/users/reset

Start password reset

Example URI

POST /v3/users/reset
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "identifiers": {
    "email_address": "joe.blow@company.com"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "identifiers"
  ]
}
Response  200
Response  404
Response  400
HideShow
Headers
Content-Type: application/json

Passwordless Authentication

Important Info

For passwordless authentication, first is required to send a POST to request an email to be sent to the User’s email with a link for the user to click on to verify his email.

Passwordless Authentication
POST/v3/users/token-exchange

Start Passwordless Authentication

Example URI

POST /v3/users/token-exchange
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "identifiers": {
    "email_address": "joe.blow@company.com"
  },
  "delivery": {
    "method": "email",
    "destination": "joe.blow@company.com",
    "action": "login",
    "redirect": "/"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "identifiers": {
      "type": "object",
      "properties": {
        "email_address": {
          "type": "string"
        }
      }
    },
    "delivery": {
      "type": "object",
      "properties": {
        "method": {
          "type": "string"
        },
        "destination": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "redirect": {
          "type": "string"
        }
      }
    }
  },
  "required": [
    "identifiers",
    "delivery"
  ]
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Cross-device Session

Cross-device Session
GET/v3/users/{user_id}/session

Retrieves the user’s Cross-device Session

Example URI

GET /v3/users/user_id/session
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "session_variables": {},
  "user_id": "UU0123456789ABCD",
  "sessions": [
    {
      "expiryDate": "2018-11-15 14:29 PM UTC",
      "startDate": "2017-11-15 14:29 PM UTC",
      "authenticated": true,
      "session_id": "SS0123456789ABCD",
      "user_id": "UU0123456789ABCD"
    }
  ],
  "access_model": {
    "meters": [],
    "credits": [],
    "delivered_entitlements": []
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "session_variables": {
      "type": "object",
      "properties": {}
    },
    "user_id": {
      "type": "string"
    },
    "sessions": {
      "type": "array"
    },
    "access_model": {
      "type": "object",
      "properties": {
        "meters": {},
        "credits": {},
        "delivered_entitlements": {}
      }
    }
  }
}
Response  404

User Accounts

User Accounts
GET/v3/users/{user_id}/accounts

Retrieves the User’s Accounts

Example URI

GET /v3/users/user_id/accounts
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "user_id": "0123456789ABCD",
      "account_id": "0123456789ABCD"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}
Response  404

Refresh Access Model

Refresh Access Model
POST/v3/users/{user_id}/authorization/refresh

Refresh the user’s Access Model

Example URI

POST /v3/users/user_id/authorization/refresh
URI Parameters
HideShow
user_id
string (required) 

Unique User identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "meters": {},
  "credits": {},
  "delivered_entitlements": [
    {
      "id": "0123456789ABCD",
      "direct": true,
      "meteredBy": [],
      "creditedBy": []
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "meters": {
      "type": "object",
      "properties": {}
    },
    "credits": {
      "type": "object",
      "properties": {}
    },
    "delivered_entitlements": {
      "type": "array"
    }
  }
}
Response  404

Reset Legacy Password

Reset Legacy Password
POST/v3/users/legacyPassword

Set the current password to an empty string, also sets the legacy password to the provided string

Example URI

POST /v3/users/legacyPassword
Request  with body
HideShow
Headers
Content-Type: text/plain
Body
newLegacyPassword - raw string for the new legacy password
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Legacy Password updated successfully to be used instead of password",
  "user_id": "{userId}",
  "uri": "http://localhost:8080/v3/users/{userId}/legacyPassword"
}
Response  404

User Schema

Actions on resource User Schema

User Schema

User Schema
GET/v3/schema/users

Retrieves the User Schema

Example URI

GET /v3/schema/users
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "slug": "slug1",
    "label": "Test",
    "internal-description": "This is for testing",
    "public-description": "Please provide some info",
    "required": false,
    "decision-point": false,
    "validation-expression": "test",
    "input-type": "text",
    "select-options": "null",
    "range-start": 0,
    "range-end": 100,
    "range-step": 5
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Schema Slug

Get Schema Slug
GET/v3/schema/users/{slug}

Get a single Schema Slug

Example URI

GET /v3/schema/users/slug
URI Parameters
HideShow
slug
string (required) 

Unique identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "slug": "slug1",
  "label": "Test",
  "internal-description": "This is for testing",
  "public-description": "Please provide some info",
  "required": false,
  "decision-point": false,
  "validation-expression": "test",
  "input-type": "text",
  "select-options": "null",
  "range-start": 0,
  "range-end": 100,
  "range-step": 5
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "internal-description": {
      "type": "string"
    },
    "public-description": {
      "type": "string"
    },
    "required": {
      "type": "boolean"
    },
    "decision-point": {
      "type": "boolean"
    },
    "validation-expression": {
      "type": "string"
    },
    "input-type": {
      "type": "string"
    },
    "select-options": {
      "type": "string"
    },
    "range-start": {
      "type": "number"
    },
    "range-end": {
      "type": "number"
    },
    "range-step": {
      "type": "number"
    }
  }
}

Delete Schema Slug
DELETE/v3/schema/users/{slug}

Delete a Schema Slug

Example URI

DELETE /v3/schema/users/slug
URI Parameters
HideShow
slug
string (required) 

Unique identifier

Response  200
HideShow
Body
{
  "message": "Field removed from schema successfully"
}
Schema
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404

Save Schema Slug
PUT/v3/schema/users/{slug}

Save a Schema Slug

Example URI

PUT /v3/schema/users/slug
URI Parameters
HideShow
slug
string (required) 

Unique identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test",
  "internal-description": "This is for testing",
  "public-description": "Please provide some info",
  "required": false,
  "decision-point": false,
  "input-type": "text"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "internal-description": {
      "type": "string"
    },
    "public-description": {
      "type": "string"
    },
    "required": {
      "type": "boolean"
    },
    "decision-point": {
      "type": "boolean"
    },
    "input-type": {
      "type": "string"
    }
  }
}
Response  200
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Field added to user schema successfully",
  "uri": "http://host/v3/schema/users/slug"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    },
    "uri": {
      "type": "string"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json

User Export

User Export

User Export
GET/v3/user-export{?attributes,appIds}

Download all users

Example URI

GET /v3/user-export?attributes=true&appIds=quiz1,survey4
URI Parameters
HideShow
attributes
string (required) Example: true

(boolean) - Whether or not to include core attributes

appIds
string (required) Example: quiz1,survey4

Comma-delimited list of appIds to retrieve extended profile data for. If appIds is present and attributes isn’t, only users with matching extended profiles will be returned.

Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "seq-no": 1,
    "user": {
      "identifiers": {
        "email_address": "joe.blow@company.com"
      },
      "attributes": {
        "first_name": "Joe",
        "surname": "Blow"
      }
    }
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Webhook

Actions on resource Webhook

Webhooks

Webhooks
GET/v3/webhooks

Retrieves a list of Webhooks wrapped in the element “results”

Example URI

GET /v3/webhooks
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "results": [
    {
      "webhook_id": "01234567890ABCD",
      "label": "Test webhook",
      "triggers": [
        "user.create",
        "user.delete"
      ],
      "method": "POST",
      "target": "http://localhost:9999"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "results": {
      "type": "array"
    }
  }
}

Create Webhook
POST/v3/webhooks

Create a Webhook

Example URI

POST /v3/webhooks
Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "label": "Test webhook",
  "triggers": [
    "user.create",
    "user.delete"
  ],
  "method": "POST",
  "target": "http://localhost:9999"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "triggers": {
      "type": "array"
    },
    "method": {
      "type": "string"
    },
    "target": {
      "type": "string"
    }
  }
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/json

Webhook

Get Webhook
GET/v3/webhooks/{id}

Get a single Webhook

Example URI

GET /v3/webhooks/id
URI Parameters
HideShow
id
string (required) 

Unique Webhook identifier

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "webhook_id": "01234567890ABCD",
  "label": "Test webhook",
  "triggers": [
    "user.create",
    "user.delete"
  ],
  "method": "POST",
  "target": "http://localhost:9999"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "webhook_id": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "triggers": {
      "type": "array"
    },
    "method": {
      "type": "string"
    },
    "target": {
      "type": "string"
    }
  }
}

Delete Webhook
DELETE/v3/webhooks/{id}

Delete an Webhook

Example URI

DELETE /v3/webhooks/id
URI Parameters
HideShow
id
string (required) 

Unique Webhook identifier

Response  200
Response  404

Update Webhook
PUT/v3/webhooks/{id}

Update an Webhook

Example URI

PUT /v3/webhooks/id
URI Parameters
HideShow
id
string (required) 

Unique Webhook identifier

Request  with body
HideShow
Headers
Content-Type: application/json
Body
{
  "webhook_id": "01234567890ABCD",
  "label": "Test webhook",
  "triggers": [
    "user.create",
    "user.delete"
  ],
  "method": "POST",
  "target": "http://localhost:9999"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "webhook_id": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "triggers": {
      "type": "array"
    },
    "method": {
      "type": "string"
    },
    "target": {
      "type": "string"
    }
  }
}
Response  200
Response  400
HideShow
Headers
Content-Type: application/json

Braintree Promo Codes

Promo Code

Promo Code Actions
POST/v4/admin/graphql

The various requests below can be used to create, delete, or list promo codes.

Example URI

POST /v4/admin/graphql
Request  Creates a Braintree promo code
HideShow
Headers
Content-Type: application/graphql
Body
{ mutation {
        createBraintreePromoCode( promoCode : {discountId: "discountId", code : "code", discount: 10, billingCycles: 5, limit: 100, absoluteDiscount: false }) {
            status
            message
        }
    }
}
Request  Deletes a Braintree promo code
HideShow
Headers
Content-Type: application/graphql
Body
{ mutation {
        deleteBraintreePromoCode(promoCodeId: "code"){
            status
            message
        }
    }
}
Request  Lists all Braintree promo codes
HideShow
Headers
Content-Type: application/graphql
Body
{ query {
        listBraintreePromoCodes{
                code
                discountId
                discount
                billingCycles
                limit
                claimed
                absoluteDiscount
        }
    }
}
Response  200
Response  400

Generated by aglio on 27 Jul 2021