Settings

Reset API Key

POST /api/reset

This endpoint allows you to reset your API key to a new, randomly generated key.

This method requires you to authenticate using your existing API key.

Headers

Name
Type
Description

Authorization*

string

The existing API key.

{
    "success": true,
    "message": "API Key successfully reset!",
    "data": "0123456789abcdef"
}

CUSTOMERS MANAGEMENT

Allows you to add another client with a corresponding logo and a billing type.

Customers have the following format:

{
  "id"                     : int64,
  "name"                   : string,
  "description"            : string,
  "services"               : []ServiceUsed,
  "currently_used"         : bool,
  "logo_url"               : string,
  "users"                  : []User,
  "user_id"                : int64,
  "regex_email"            : string,
  "count_quotas_email_sent": int64,
  "quota_email_sent"       : int64,
  "quota_user"             : int64,
  "count_quota_user"       : int64,
  "type_billing"           : string,
  "organisation"           : {}Organisation,
  "organisation_id"        : int64,
  "hash"                   : string
}

Get Customers

GET /api/customers

Returns a list of all customer accounts in Gottaphish.

Headers

Name
Type
Description

Authorization*

string

A valid API key

{
   "id": 138,
    "name": "Example",
    "description": "",
    "currentlyUsed": true,
    "logo_url": "",
    "UserId": 64,
    "regexEmail": "^([a-zA-Z0-9._%%+-][email protected])$",
    "CountQuotasEmailSent": 100,
    "QuotaEmailSent": 100,
    "typeBilling": "count_by_email",
    "organisation": {},
    "organisationId": 1,
    "hash": "6c9RFoM0s6keeSQxan",
    "type_of_customer": "Default",
    "use_mjml": true, 
    "auto_translate": true,
  }

Get Customer

GET /api/customers/:id

Returns a customer with the given ID.

Path Parameters

Name
Type
Description

id*

integer

The customer ID

Headers

Name
Type
Description

Authorization*

string

A valid API key

 {
   "id": 138,
    "name": "Example",
    "description": "",
    "UserId": 64,
    "regexEmail": "^([a-zA-Z0-9._%%+-][email protected])$",
    "typeBilling": "count_by_email",
    "organisation": {},
    "organisationId": 1,
    "hash": "6c9RFoM0s6keeSQxan",
    "type_of_customer": "Default",
    "use_mjml": true, 
    "auto_translate": true, 
  }

Create Customer

POST /api/customers/

Creates a new customer.

Headers

Name
Type
Description

Authorization*

string

A valid API key

Request Body

Name
Type
Description

Payload*

object

The customer to create in JSON format.

 {
    "name": "Example",
    "description": "",
    "services": null,
    "currentlyUsed": true,
    "logo_url": "",
    "users": null,
    "UserId": 64,
    "regexEmail": "^([a-zA-Z0-9._%%+-][email protected])$",
    "CountQuotasEmailSent": 100,
    "QuotaEmailSent": 100,
    "QuotaUser": 0,
    "CountQuotaUser": 0,
    "typeBilling": "count_by_email",
    "organisation": {},
    "organisationId": 1,
    "hash": "6c9RFoM0s6keeSQxan",
    "dmi": false,
  }

Modify Customer

PUT /api/customers/:id

Modifies a customer. This can be used to change the name, the billing type, or change the default customer.

Path Parameters

Name
Type
Description

id*

string

The user ID

Headers

Name
Type
Description

Authorization*

string

A valid API key

Request Body

Name
Type
Description

Payload*

object

The updated customer content.

 {
    "name": "Example",
    "description": "",
    "services": null,
    "currentlyUsed": true,
    "logo_url": "",
    "users": null,
    "UserId": 64,
    "regexEmail": "^([a-zA-Z0-9._%%+-][email protected])$",
    "CountQuotasEmailSent": 100,
    "QuotaEmailSent": 100,
    "QuotaUser": 0,
    "CountQuotaUser": 0,
    "typeBilling": "count_by_email",
    "organisation": {},
    "organisationId": 1,
    "hash": "6c9RFoM0s6keeSQxan",
    "dmi": false,
  }

Delete Customer

DELETE /api/customers/:id

Deletes a customer.

Path Parameters

Name
Type
Description

id*

string

The customer ID

Headers

Name
Type
Description

Authorization*

string

A valid API key

{
  "message": "Customer deleted Successfully!",
  "success": true,
  "data": null
}

Returns a 404 error if no customer is found with the provided ID.

USER MANAGEMENT

Gottaphish supports having multiple user accounts. Each of these accounts are separate, with their own campaigns, landing pages, scenarios, etc.

Each user account in Gottaphish is assigned a role. These are global roles that describe the user's permissions within Gottaphish.

At the time of this writing, there are two roles:

Role

Slug

Description

User

user

A non-administrative user role. Users with this role can create objects and launch campaigns.

Admin

admin

An administrative user. Users with this role can manage system-wide settings as well as other user accounts within Gottaphish.

Users have the following format:

{
  "username"                 : string,
  "password"                 : string,
  "role"                     : string,
  "password_change_required" : bool,
  "account_locked"           : bool,
  "customer_id"              : int64,
  "organisation_id"          : int64
}

Each Role has the following format:

{
    name            : string
    slug            : string
    description     : string
}

Get Users

GET /api/users/

Returns a list of all user accounts in Gottaphish.

Headers

Name
Type
Description

Authorization*

string

A valid API key

{
    "id": 1,
    "username": "admin",
    "display_name": "",
    "import_source": "",
    "organisation": {},
    "organisationId": 1,
    "api_key": "",
    "role": {
      "slug": "admin",
      "name": "Admin",
      "description": "System administrator with full permissions"
    }
    "password_change_required": false,
    "account_locked": false, 
    "last_login": "",
    "customer": {},
    "customer_id": 0,
    "keyloack_id": "",
    "email_verified: "",
    "TemporaryPassword": "",
  }

Get User

GET /api/users/:id

Returns a user with the given ID.

Path Parameters

Name
Type
Description

id*

integer

The user ID

Headers

Name
Type
Description

Authorization*

string

A valid API key

{
    "id": 1,
    "username": "admin",
    "display_name": "",
    "import_source": "",
    "organisation": {},
    "organisationId": 1,
    "api_key": "",
    "role": {
      "slug": "admin",
      "name": "Admin",
      "description": "System administrator with full permissions"
    }
    "password_change_required": false,
    "account_locked": false, 
    "last_login": "",
    "customer": {},
    "customer_id": 0,
    "keyloack_id": "",
    "email_verified: "",
    "TemporaryPassword": "
  }

Create User

POST /api/users/

Creates a new user.

Headers

Name
Type
Description

Authorization*

string

Request Body

Name
Type
Description

role*

string

The role slug to use for the account

password*

string

The password to set for the account

username*

string

The username for the account

{
    "username": "admin",
    "display_name": "",
    "import_source": "",
    "organisation": {},
    "organisationId": 1,
    "api_key": "",
    "role": {
      "slug": "admin",
      "name": "Admin",
      "description": "System administrator with full permissions"
    }
    "password_change_required": false,
    "account_locked": false, 
    "last_login": "",
    "customer": {},
    "customer_id": 0,
    "keyloack_id": "",
    "email_verified: "",
    "TemporaryPassword": "
  }

Modify User

PUT /api/users/:id

Modifies a user account. This can be used to change the role, reset the password, or change the username.

Path Parameters

Name
Type
Description

id*

string

The user ID

Headers

Name
Type
Description

Authorization*

string

A valid API key

Request Body

Name
Type
Description

role

string

The role slug to use for the account

password

string

The password to set for the account

username*

string

The username for the account

{
    "id": 1,
    "username": "admin",
    "display_name": "",
    "import_source": "",
    "organisation": {},
    "organisationId": 1,
    "api_key": "",
    "role": {
      "slug": "admin",
      "name": "Admin",
      "description": "System administrator with full permissions"
    }
    "password_change_required": false,
    "account_locked": false, 
    "last_login": "",
    "customer": {},
    "customer_id": 0,
    "keyloack_id": "",
    "email_verified: "",
    "TemporaryPassword": "
  }

Delete User

DELETE /api/users/:id

Deletes a user, as well as every object (landing page, template, etc.) and campaign they've created.

Path Parameters

Name
Type
Description

id*

string

The user ID

Headers

Name
Type
Description

Authorization*

string

A valid API key

{
  "message": "User deleted Successfully!",
  "success": true,
  "data": null
}

Returns a 404 error if no user is found with the provided ID.

Last updated