MENU navbar-image

Introduction

API documentation for C360 - Customer and Campaign Management Platform

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

This API is not authenticated.

Database Operations

Test the database connection. s

Example request:
curl --request GET \
    --get "http://localhost/api/db/test" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/db/test"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "code": 200,
    "message": "Database connection successful",
    "data": {
        "connection": "mysql",
        "database": "csite_c360",
        "status": "connected"
    }
}
 

Example response (500):


{
    "code": 500,
    "message": "Database connection failed",
    "data": {
        "connection": "mysql",
        "database": "csite_c360",
        "error": "Could not connect to database"
    }
}
 

Request   

GET api/db/test

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get all database tables and their schema details. s

Example request:
curl --request GET \
    --get "http://localhost/api/db/schema" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/db/schema"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "code": 200,
    "message": "Database schema retrieved successfully",
    "data": [
        {
            "table_name": "users",
            "table_display_name": "User Accounts",
            "info": "Stores all user credentials and profile information",
            "fields": [
                {
                    "name": "email",
                    "display_name": "Email Address",
                    "db_type": "varchar(255)",
                    "app_type": "EmailString",
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": "Primary email for user communication"
                }
            ]
        }
    ]
}
 

Example response (500):


{
    "code": 500,
    "message": "Failed to retrieve database schema",
    "data": {
        "error": "Error message"
    }
}
 

Request   

GET api/db/schema

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Marketing Programs

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/marketing-programs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/marketing-programs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/marketing-programs

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost/api/marketing-programs" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"status\": \"active\",
    \"start_date\": \"2025-05-16T16:44:38\",
    \"end_date\": \"2106-06-15\",
    \"budget\": 45,
    \"goal\": \"qeopfuudtdsufvyvddqam\"
}"
const url = new URL(
    "http://localhost/api/marketing-programs"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "status": "active",
    "start_date": "2025-05-16T16:44:38",
    "end_date": "2106-06-15",
    "budget": 45,
    "goal": "qeopfuudtdsufvyvddqam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/marketing-programs

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string   

Example: Dolores dolorum amet iste laborum eius est dolor.

status   string   

Example: active

Must be one of:
  • draft
  • active
  • inactive
start_date   string   

Must be a valid date. Example: 2025-05-16T16:44:38

end_date   string   

Must be a valid date. Must be a date after or equal to start_date. Example: 2106-06-15

budget   number   

Must be at least 0. Example: 45

goal   string   

Must not be greater than 255 characters. Example: qeopfuudtdsufvyvddqam

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/marketing-programs/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/marketing-programs/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/marketing-programs/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the marketing program. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/marketing-programs/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"status\": \"active\",
    \"start_date\": \"2025-05-16T16:44:38\",
    \"end_date\": \"2106-06-15\",
    \"budget\": 45,
    \"goal\": \"qeopfuudtdsufvyvddqam\"
}"
const url = new URL(
    "http://localhost/api/marketing-programs/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "status": "active",
    "start_date": "2025-05-16T16:44:38",
    "end_date": "2106-06-15",
    "budget": 45,
    "goal": "qeopfuudtdsufvyvddqam"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/marketing-programs/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the marketing program. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string   

Example: Dolores dolorum amet iste laborum eius est dolor.

status   string   

Example: active

Must be one of:
  • draft
  • active
  • inactive
start_date   string   

Must be a valid date. Example: 2025-05-16T16:44:38

end_date   string   

Must be a valid date. Must be a date after or equal to start_date. Example: 2106-06-15

budget   number   

Must be at least 0. Example: 45

goal   string   

Must not be greater than 255 characters. Example: qeopfuudtdsufvyvddqam

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/marketing-programs/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/marketing-programs/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/marketing-programs/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the marketing program. Example: consequatur

Campaign Groups

Display m.

Example request:
curl --request GET \
    --get "http://localhost/api/marketing-programs/consequatur/campaign-groups" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/marketing-programs/consequatur/campaign-groups"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/marketing-programs/{program_id}/campaign-groups

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

program_id   string   

The ID of the program. Example: consequatur

Store a newly created resource in storage for a specific Marketing Program.

Example request:
curl --request POST \
    "http://localhost/api/marketing-programs/consequatur/campaign-groups" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"status\": \"active\",
    \"start_date\": \"2025-05-16T16:44:38\",
    \"end_date\": \"2106-06-15\",
    \"budget\": 45,
    \"goal\": \"qeopfuudtdsufvyvddqam\"
}"
const url = new URL(
    "http://localhost/api/marketing-programs/consequatur/campaign-groups"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "status": "active",
    "start_date": "2025-05-16T16:44:38",
    "end_date": "2106-06-15",
    "budget": 45,
    "goal": "qeopfuudtdsufvyvddqam"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/marketing-programs/{program_id}/campaign-groups

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

program_id   string   

The ID of the program. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string   

Example: Dolores dolorum amet iste laborum eius est dolor.

status   string   

Example: active

Must be one of:
  • draft
  • active
  • inactive
start_date   string   

Must be a valid date. Example: 2025-05-16T16:44:38

end_date   string   

Must be a valid date. Must be a date after or equal to start_date. Example: 2106-06-15

budget   number   

Must be at least 0. Example: 45

goal   string   

Must not be greater than 255 characters. Example: qeopfuudtdsufvyvddqam

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/campaign-groups/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaign-groups/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaign-groups/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the campaign group. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/campaign-groups/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"status\": \"active\",
    \"start_date\": \"2025-05-16T16:44:38\",
    \"end_date\": \"2106-06-15\",
    \"budget\": 45,
    \"goal\": \"qeopfuudtdsufvyvddqam\"
}"
const url = new URL(
    "http://localhost/api/campaign-groups/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "status": "active",
    "start_date": "2025-05-16T16:44:38",
    "end_date": "2106-06-15",
    "budget": 45,
    "goal": "qeopfuudtdsufvyvddqam"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/campaign-groups/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the campaign group. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string   

Example: Dolores dolorum amet iste laborum eius est dolor.

status   string   

Example: active

Must be one of:
  • draft
  • active
  • inactive
start_date   string   

Must be a valid date. Example: 2025-05-16T16:44:38

end_date   string   

Must be a valid date. Must be a date after or equal to start_date. Example: 2106-06-15

budget   number   

Must be at least 0. Example: 45

goal   string   

Must not be greater than 255 characters. Example: qeopfuudtdsufvyvddqam

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/campaign-groups/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaign-groups/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/campaign-groups/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the campaign group. Example: consequatur

Campaigns

Display p.

Example request:
curl --request GET \
    --get "http://localhost/api/campaign-groups/consequatur/campaigns" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaign-groups/consequatur/campaigns"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaign-groups/{group_id}/campaigns

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

group_id   string   

The ID of the group. Example: consequatur

Store a newly created resource in storage for a specific Campaign Group.

Example request:
curl --request POST \
    "http://localhost/api/campaign-groups/consequatur/campaigns" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"status\": \"active\",
    \"start_date\": \"2025-05-16T16:44:38\",
    \"end_date\": \"2106-06-15\",
    \"budget\": 45,
    \"goal\": \"qeopfuudtdsufvyvddqam\",
    \"target_audience\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\",
    \"success_criteria\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\"
}"
const url = new URL(
    "http://localhost/api/campaign-groups/consequatur/campaigns"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "status": "active",
    "start_date": "2025-05-16T16:44:38",
    "end_date": "2106-06-15",
    "budget": 45,
    "goal": "qeopfuudtdsufvyvddqam",
    "target_audience": "[\"consequatur\",\"consequatur\"]",
    "success_criteria": "[\"consequatur\",\"consequatur\"]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/campaign-groups/{group_id}/campaigns

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

group_id   string   

The ID of the group. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

status   string   

Example: active

Must be one of:
  • draft
  • active
  • inactive
start_date   string   

Must be a valid date. Example: 2025-05-16T16:44:38

end_date   string   

Must be a valid date. Must be a date after or equal to start_date. Example: 2106-06-15

budget   number   

Must be at least 0. Example: 45

goal   string   

Must not be greater than 255 characters. Example: qeopfuudtdsufvyvddqam

target_audience   string  optional  

Must be a valid JSON string. Example: ["consequatur","consequatur"]

success_criteria   string  optional  

Must be a valid JSON string. Example: ["consequatur","consequatur"]

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/campaigns/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaigns/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the campaign. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/campaigns/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"status\": \"active\",
    \"start_date\": \"2025-05-16T16:44:38\",
    \"end_date\": \"2106-06-15\",
    \"budget\": 45,
    \"goal\": \"qeopfuudtdsufvyvddqam\",
    \"target_audience\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\",
    \"success_criteria\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\"
}"
const url = new URL(
    "http://localhost/api/campaigns/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "status": "active",
    "start_date": "2025-05-16T16:44:38",
    "end_date": "2106-06-15",
    "budget": 45,
    "goal": "qeopfuudtdsufvyvddqam",
    "target_audience": "[\"consequatur\",\"consequatur\"]",
    "success_criteria": "[\"consequatur\",\"consequatur\"]"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/campaigns/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the campaign. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

status   string   

Example: active

Must be one of:
  • draft
  • active
  • inactive
start_date   string   

Must be a valid date. Example: 2025-05-16T16:44:38

end_date   string   

Must be a valid date. Must be a date after or equal to start_date. Example: 2106-06-15

budget   number   

Must be at least 0. Example: 45

goal   string   

Must not be greater than 255 characters. Example: qeopfuudtdsufvyvddqam

target_audience   string  optional  

Must be a valid JSON string. Example: ["consequatur","consequatur"]

success_criteria   string  optional  

Must be a valid JSON string. Example: ["consequatur","consequatur"]

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/campaigns/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/campaigns/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the campaign. Example: consequatur

Audiences

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/audiences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/audiences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/audiences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost/api/audiences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"rules\": [
        {
            \"rule_type\": \"consequatur\",
            \"rule_value\": \"mqeopfuudtdsufvyvddqa\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/audiences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "rules": [
        {
            "rule_type": "consequatur",
            "rule_value": "mqeopfuudtdsufvyvddqa"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/audiences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

rules   object[]  optional  
rule_type   string   

Rules must be present, can be empty array. Example: consequatur

rule_value   string   

Must not be greater than 255 characters. Example: mqeopfuudtdsufvyvddqa

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/audiences/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/audiences/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/audiences/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the audience. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/audiences/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"rules\": [
        {
            \"rule_value\": \"dtdsufvyvddqamniihfqc\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/audiences/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "rules": [
        {
            "rule_value": "dtdsufvyvddqamniihfqc"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/audiences/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the audience. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

rules   object[]  optional  
rule_type   string  optional  

This field is required when rules is present.

rule_value   string  optional  

This field is required when rules is present. Must not be greater than 255 characters. Example: dtdsufvyvddqamniihfqc

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/audiences/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/audiences/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/audiences/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the audience. Example: consequatur

List audiences associated with a specific campaign.

Example request:
curl --request GET \
    --get "http://localhost/api/campaigns/consequatur/audiences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/audiences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaigns/{campaign_id}/audiences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Associate an audience with a campaign.

Example request:
curl --request POST \
    "http://localhost/api/campaigns/consequatur/audiences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"audience_id\": \"consequatur\",
    \"segment_override\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\"
}"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/audiences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "audience_id": "consequatur",
    "segment_override": "[\"consequatur\",\"consequatur\"]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/campaigns/{campaign_id}/audiences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Body Parameters

audience_id   string   

The id of an existing record in the audiences table. Example: consequatur

segment_override   string  optional  

Must be a valid JSON string. Example: ["consequatur","consequatur"]

Disassociate an audience from a campaign.

Example request:
curl --request DELETE \
    "http://localhost/api/campaigns/consequatur/audiences/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/audiences/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/campaigns/{campaign_id}/audiences/{audience_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

audience_id   string   

The ID of the audience. Example: consequatur

Display b-audiences for a specific Campaign.

Example request:
curl --request GET \
    --get "http://localhost/api/campaigns/consequatur/sub-audiences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/sub-audiences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaigns/{campaign_id}/sub-audiences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Store a newly created sub-audience for a specific Campaign.

Example request:
curl --request POST \
    "http://localhost/api/campaigns/consequatur/sub-audiences" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"audience_id\": \"consequatur\",
    \"name\": \"mqeopfuudtdsufvyvddqa\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"segment_definition\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\"
}"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/sub-audiences"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "audience_id": "consequatur",
    "name": "mqeopfuudtdsufvyvddqa",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "segment_definition": "[\"consequatur\",\"consequatur\"]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/campaigns/{campaign_id}/sub-audiences

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Body Parameters

audience_id   string   

Example: consequatur

name   string   

Must not be greater than 255 characters. Example: mqeopfuudtdsufvyvddqa

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

segment_definition   string   

Must be a valid JSON string. Example: ["consequatur","consequatur"]

Display b-audience.

Example request:
curl --request GET \
    --get "http://localhost/api/sub-audiences/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/sub-audiences/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/sub-audiences/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the sub audience. Example: consequatur

Update the specified sub-audience in storage.

Example request:
curl --request PUT \
    "http://localhost/api/sub-audiences/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"segment_definition\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\"
}"
const url = new URL(
    "http://localhost/api/sub-audiences/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "segment_definition": "[\"consequatur\",\"consequatur\"]"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/sub-audiences/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the sub audience. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

segment_definition   string   

Must be a valid JSON string. Example: ["consequatur","consequatur"]

Remove the specified sub-audience from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/sub-audiences/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/sub-audiences/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/sub-audiences/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the sub audience. Example: consequatur

Customers

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/customers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/customers"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/customers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost/api/customers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"external_id\": \"vmqeopfuudtdsufvyvddq\",
    \"first_name\": \"amniihfqcoynlazghdtqt\",
    \"last_name\": \"qxbajwbpilpmufinllwlo\",
    \"email\": \"schmitt.beulah@example.org\",
    \"phone\": \"smsjuryvojcybzvrbyick\",
    \"attributes\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\",
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/customers"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "external_id": "vmqeopfuudtdsufvyvddq",
    "first_name": "amniihfqcoynlazghdtqt",
    "last_name": "qxbajwbpilpmufinllwlo",
    "email": "schmitt.beulah@example.org",
    "phone": "smsjuryvojcybzvrbyick",
    "attributes": "[\"consequatur\",\"consequatur\"]",
    "is_active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/customers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

external_id   string  optional  

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

first_name   string  optional  

Must not be greater than 255 characters. Example: amniihfqcoynlazghdtqt

last_name   string  optional  

Must not be greater than 255 characters. Example: qxbajwbpilpmufinllwlo

email   string  optional  

Must be a valid email address. Must not be greater than 255 characters. Example: schmitt.beulah@example.org

phone   string  optional  

Must not be greater than 255 characters. Example: smsjuryvojcybzvrbyick

attributes   string  optional  

Must be a valid JSON string. Example: ["consequatur","consequatur"]

is_active   boolean  optional  

Example: false

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/customers/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/customers/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/customers/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the customer. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/customers/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/customers/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/customers/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the customer. Example: consequatur

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/customers/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/customers/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/customers/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the customer. Example: consequatur

Destinations

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/destinations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/destinations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/destinations

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost/api/destinations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"destination_type\": \"consequatur\",
    \"connection_details\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\",
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/destinations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "destination_type": "consequatur",
    "connection_details": "[\"consequatur\",\"consequatur\"]",
    "is_active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/destinations

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

destination_type   string   

Example: consequatur

connection_details   string   

Must be a valid JSON string. Example: ["consequatur","consequatur"]

is_active   boolean  optional  

Example: false

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/destinations/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/destinations/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/destinations/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the destination. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/destinations/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/destinations/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/destinations/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the destination. Example: consequatur

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/destinations/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/destinations/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/destinations/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the destination. Example: consequatur

List destinations configured for a specific campaign.

Example request:
curl --request GET \
    --get "http://localhost/api/campaigns/consequatur/destinations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/destinations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaigns/{campaign_id}/destinations

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Configure (store) a destination for a campaign.

Example request:
curl --request POST \
    "http://localhost/api/campaigns/consequatur/destinations" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"destination_id\": \"consequatur\",
    \"attribute_mapping\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\",
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/destinations"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "destination_id": "consequatur",
    "attribute_mapping": "[\"consequatur\",\"consequatur\"]",
    "is_active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/campaigns/{campaign_id}/destinations

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Body Parameters

destination_id   string   

Example: consequatur

treatment_group_id   string  optional  
attribute_mapping   string   

Must be a valid JSON string. Example: ["consequatur","consequatur"]

is_active   boolean  optional  

Example: false

Remove the specified resource (association) from storage. Uses the campaign_destination primary key ID for deletion.

Example request:
curl --request DELETE \
    "http://localhost/api/campaign-destinations/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaign-destinations/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/campaign-destinations/{campaign_destination_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_destination_id   string   

The ID of the campaign destination. Example: consequatur

Treatment Groups

Display n.

Example request:
curl --request GET \
    --get "http://localhost/api/campaigns/consequatur/treatment-groups" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/treatment-groups"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaigns/{campaign_id}/treatment-groups

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Store a newly created resource in storage for a specific Campaign.

Example request:
curl --request POST \
    "http://localhost/api/campaigns/consequatur/treatment-groups" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"type\": \"consequatur\",
    \"allocation_percentage\": 13
}"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/treatment-groups"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "type": "consequatur",
    "allocation_percentage": 13
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/campaigns/{campaign_id}/treatment-groups

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Body Parameters

name   string   

Add validation for sub_audience_id if/when implemented: 'nullable|exists:sub_audiences,id',. Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

type   string   

Example: consequatur

allocation_percentage   number   

Must be at least 0. Must not be greater than 100. Example: 13

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/treatment-groups/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/treatment-groups/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/treatment-groups/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the treatment group. Example: consequatur

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/treatment-groups/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"type\": \"consequatur\",
    \"allocation_percentage\": 13
}"
const url = new URL(
    "http://localhost/api/treatment-groups/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "type": "consequatur",
    "allocation_percentage": 13
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/treatment-groups/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the treatment group. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

type   string   

Example: consequatur

allocation_percentage   number   

Must be at least 0. Must not be greater than 100. Example: 13

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/treatment-groups/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/treatment-groups/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/treatment-groups/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the treatment group. Example: consequatur

KPIs and Goals

Display n.

Example request:
curl --request GET \
    --get "http://localhost/api/campaigns/consequatur/kpis" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/kpis"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaigns/{campaign_id}/kpis

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Store a newly created KPI for a specific Campaign.

Example request:
curl --request POST \
    "http://localhost/api/campaigns/consequatur/kpis" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"kpi_type\": \"consequatur\",
    \"target_value\": 45,
    \"actual_value\": 56
}"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/kpis"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "kpi_type": "consequatur",
    "target_value": 45,
    "actual_value": 56
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/campaigns/{campaign_id}/kpis

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

kpi_type   string   

Example: consequatur

target_value   number   

Must be at least 0. Example: 45

actual_value   number  optional  

Must be at least 0. Example: 56

Display d KPI.

Example request:
curl --request GET \
    --get "http://localhost/api/campaign-kpis/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaign-kpis/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaign-kpis/{kpi_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

kpi_id   string   

The ID of the kpi. Example: consequatur

Update the specified KPI in storage.

Example request:
curl --request PUT \
    "http://localhost/api/campaign-kpis/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"kpi_type\": \"consequatur\",
    \"target_value\": 45,
    \"actual_value\": 56
}"
const url = new URL(
    "http://localhost/api/campaign-kpis/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "kpi_type": "consequatur",
    "target_value": 45,
    "actual_value": 56
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/campaign-kpis/{kpi_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

kpi_id   string   

The ID of the kpi. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

kpi_type   string   

Example: consequatur

target_value   number   

Must be at least 0. Example: 45

actual_value   number  optional  

Must be at least 0. Example: 56

Remove the specified KPI from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/campaign-kpis/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaign-kpis/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/campaign-kpis/{kpi_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

kpi_id   string   

The ID of the kpi. Example: consequatur

Display n.

Example request:
curl --request GET \
    --get "http://localhost/api/campaigns/consequatur/customer-goals" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/customer-goals"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaigns/{campaign_id}/customer-goals

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Store a newly created customer goal for a specific Campaign.

Example request:
curl --request POST \
    "http://localhost/api/campaigns/consequatur/customer-goals" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"goal_type\": \"consequatur\",
    \"target_value\": 45,
    \"validation_rule_id\": 17
}"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/customer-goals"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "goal_type": "consequatur",
    "target_value": 45,
    "validation_rule_id": 17
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/campaigns/{campaign_id}/customer-goals

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

goal_type   string   

Example: consequatur

target_value   number   

Must be at least 0. Example: 45

validation_rule_id   integer  optional  

Add validation for validation_rule_id if it's required/exists in your setup 'validation_rule_id' => ['nullable', Rule::exists('validation_rules', 'id')->where('tenant_id', $tenantId)],. Example: 17

Update the specified customer goal in storage.

Example request:
curl --request PUT \
    "http://localhost/api/customer-goals/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"goal_type\": \"consequatur\",
    \"target_value\": 45,
    \"validation_rule_id\": 17
}"
const url = new URL(
    "http://localhost/api/customer-goals/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "goal_type": "consequatur",
    "target_value": 45,
    "validation_rule_id": 17
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/customer-goals/{goal_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

goal_id   string   

The ID of the goal. Example: consequatur

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

goal_type   string   

Example: consequatur

target_value   number   

Must be at least 0. Example: 45

validation_rule_id   integer  optional  

Add validation for validation_rule_id if updatable 'validation_rule_id' => ['sometimes', 'nullable', Rule::exists('validation_rules', 'id')->where('tenant_id', $tenantId)],. Example: 17

Remove the specified customer goal from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/customer-goals/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/customer-goals/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/customer-goals/{goal_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

goal_id   string   

The ID of the goal. Example: consequatur

Admin

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/admin/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/admin/users

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost/api/admin/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"email\": \"kunde.eloisa@example.com\",
    \"password\": \"consequatur\",
    \"roles\": [
        \"consequatur\"
    ]
}"
const url = new URL(
    "http://localhost/api/admin/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "email": "kunde.eloisa@example.com",
    "password": "consequatur",
    "roles": [
        "consequatur"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/admin/users

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: kunde.eloisa@example.com

password   string   

Example: consequatur

roles   string[]  optional  

The name of an existing record in the roles table.

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/admin/users/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/users/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/admin/users/{user_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user. Example: 17

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/admin/users/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"email\": \"kunde.eloisa@example.com\",
    \"roles\": [
        \"consequatur\"
    ],
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/admin/users/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "email": "kunde.eloisa@example.com",
    "roles": [
        "consequatur"
    ],
    "is_active": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/admin/users/{user_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user. Example: 17

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: kunde.eloisa@example.com

password   string  optional  
roles   string[]  optional  

The name of an existing record in the roles table.

is_active   boolean  optional  

Example: false

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/admin/users/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/users/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/admin/users/{user_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

user_id   integer   

The ID of the user. Example: 17

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/admin/tenants" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/tenants"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/admin/tenants

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost/api/admin/tenants" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores molestias ipsam sit.\",
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/admin/tenants"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores molestias ipsam sit.",
    "is_active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/admin/tenants

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Must not be greater than 255 characters. Example: Dolores molestias ipsam sit.

is_active   boolean  optional  

Example: false

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/admin/tenants/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/tenants/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/admin/tenants/{tenant_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

tenant_id   integer   

The ID of the tenant. Example: 17

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/admin/tenants/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores molestias ipsam sit.\",
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/admin/tenants/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores molestias ipsam sit.",
    "is_active": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

PUT api/admin/tenants/{tenant_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

tenant_id   integer   

The ID of the tenant. Example: 17

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Must not be greater than 255 characters. Example: Dolores molestias ipsam sit.

is_active   boolean  optional  

Example: false

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/admin/tenants/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/tenants/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/admin/tenants/{tenant_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

tenant_id   integer   

The ID of the tenant. Example: 17

Endpoints

GET api/user

Example request:
curl --request GET \
    --get "http://localhost/api/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/user

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

POST api/login

Example request:
curl --request POST \
    "http://localhost/api/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\",
    \"password\": \"O[2UZ5ij-e\\/dl4m{o,\",
    \"device_name\": \"consequatur\"
}"
const url = new URL(
    "http://localhost/api/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com",
    "password": "O[2UZ5ij-e\/dl4m{o,",
    "device_name": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. Example: qkunze@example.com

password   string   

Example: O[2UZ5ij-e/dl4m{o,

device_name   string   

Example: consequatur

POST api/forgot-password

Example request:
curl --request POST \
    "http://localhost/api/forgot-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qkunze@example.com\"
}"
const url = new URL(
    "http://localhost/api/forgot-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qkunze@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/forgot-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

Must be a valid email address. The email of an existing record in the users table. Example: qkunze@example.com

POST api/reset-password

Example request:
curl --request POST \
    "http://localhost/api/reset-password" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"token\": \"consequatur\",
    \"email\": \"carolyne.luettgen@example.org\",
    \"password\": \"consequatur\"
}"
const url = new URL(
    "http://localhost/api/reset-password"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "token": "consequatur",
    "email": "carolyne.luettgen@example.org",
    "password": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/reset-password

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

token   string   

Example: consequatur

email   string   

Must be a valid email address. Example: carolyne.luettgen@example.org

password   string   

Example: consequatur

POST api/logout

Example request:
curl --request POST \
    "http://localhost/api/logout" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/logout"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request   

POST api/logout

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/admin/roles

Example request:
curl --request GET \
    --get "http://localhost/api/admin/roles" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/roles"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/admin/roles

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/admin/permissions

Example request:
curl --request GET \
    --get "http://localhost/api/admin/permissions" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/permissions"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/admin/permissions

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/admin/activity-log

Example request:
curl --request GET \
    --get "http://localhost/api/admin/activity-log" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/admin/activity-log"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/admin/activity-log

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

POST api/send-email

Example request:
curl --request POST \
    "http://localhost/api/send-email" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"to\": \"qkunze@example.com\",
    \"subject\": \"opfuudtdsufvyvddqamni\",
    \"content\": \"consequatur\",
    \"from_email\": \"carolyne.luettgen@example.org\",
    \"from_name\": \"consequatur\",
    \"reply_to\": \"carolyne.luettgen@example.org\",
    \"attachments\": [
        {
            \"path\": \"consequatur\",
            \"as\": \"consequatur\",
            \"mime\": \"consequatur\"
        }
    ]
}"
const url = new URL(
    "http://localhost/api/send-email"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "to": "qkunze@example.com",
    "subject": "opfuudtdsufvyvddqamni",
    "content": "consequatur",
    "from_email": "carolyne.luettgen@example.org",
    "from_name": "consequatur",
    "reply_to": "carolyne.luettgen@example.org",
    "attachments": [
        {
            "path": "consequatur",
            "as": "consequatur",
            "mime": "consequatur"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/send-email

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

to   string   

Must be a valid email address. Example: qkunze@example.com

subject   string   

Must not be greater than 255 characters. Example: opfuudtdsufvyvddqamni

content   string   

Example: consequatur

from_email   string  optional  

Must be a valid email address. Example: carolyne.luettgen@example.org

from_name   string  optional  

Example: consequatur

reply_to   string  optional  

Must be a valid email address. Example: carolyne.luettgen@example.org

attachments   object[]  optional  
path   string  optional  

Basic validation for attachments - could be more specific. This field is required when attachments is present. Example: consequatur

as   string  optional  

Path relative to storage/app. Example: consequatur

mime   string  optional  

Example: consequatur

GET api/db-test

Example request:
curl --request GET \
    --get "http://localhost/api/db-test" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/db-test"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
 

{
    "code": 200,
    "message": "Database connection successful.",
    "data": null
}
 

Request   

GET api/db-test

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/tables

Example request:
curl --request GET \
    --get "http://localhost/api/tables" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/tables"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
 

{
    "code": 200,
    "message": "Tables retrieved successfully.",
    "data": [
        {
            "table_name": "activity_log",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "log_name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "description",
                    "display_name": null,
                    "db_type": "text",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "subject_type",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "event",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "subject_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "causer_type",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "causer_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "properties",
                    "display_name": null,
                    "db_type": "longtext",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "batch_uuid",
                    "display_name": null,
                    "db_type": "char(36)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "updated_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "column_metadata",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "table_name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "column_name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "display_name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "app_type",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "info",
                    "display_name": null,
                    "db_type": "text",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "updated_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "failed_jobs",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "uuid",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "connection",
                    "display_name": null,
                    "db_type": "text",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "queue",
                    "display_name": null,
                    "db_type": "text",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "payload",
                    "display_name": null,
                    "db_type": "longtext",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "exception",
                    "display_name": null,
                    "db_type": "longtext",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "failed_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": false,
                    "default": "current_timestamp()",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "migrations",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "int(10) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "migration",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "batch",
                    "display_name": null,
                    "db_type": "int(11)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "model_has_permissions",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "permission_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "model_type",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "model_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "model_has_roles",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "role_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "model_type",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "model_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "password_reset_tokens",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "email",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "token",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "permissions",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "guard_name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "updated_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "personal_access_tokens",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "tokenable_type",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "tokenable_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "token",
                    "display_name": null,
                    "db_type": "varchar(64)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "abilities",
                    "display_name": null,
                    "db_type": "text",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "last_used_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "expires_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "updated_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "role_has_permissions",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "permission_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "role_id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "roles",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "guard_name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "updated_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "table_metadata",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "table_name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "display_name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "app_type",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "info",
                    "display_name": null,
                    "db_type": "text",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "updated_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "tenants",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "updated_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        },
        {
            "table_name": "users",
            "table_display_name": null,
            "info": null,
            "fields": [
                {
                    "name": "id",
                    "display_name": null,
                    "db_type": "bigint(20) unsigned",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": true,
                    "info": null
                },
                {
                    "name": "name",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "email",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "email_verified_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "password",
                    "display_name": null,
                    "db_type": "varchar(255)",
                    "app_type": null,
                    "nullable": false,
                    "default": null,
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "remember_token",
                    "display_name": null,
                    "db_type": "varchar(100)",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "is_active",
                    "display_name": null,
                    "db_type": "tinyint(1)",
                    "app_type": null,
                    "nullable": false,
                    "default": "1",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "created_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                },
                {
                    "name": "updated_at",
                    "display_name": null,
                    "db_type": "timestamp",
                    "app_type": null,
                    "nullable": true,
                    "default": "NULL",
                    "auto_incrementing": false,
                    "info": null
                }
            ]
        }
    ]
}
 

Request   

GET api/tables

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Validation Rules

List validation rules associated with a specific campaign.

Example request:
curl --request GET \
    --get "http://localhost/api/campaigns/consequatur/validation-rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/validation-rules"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Unauthenticated."
}
 

Request   

GET api/campaigns/{campaign_id}/validation-rules

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Associate a validation rule with a campaign.

Example request:
curl --request POST \
    "http://localhost/api/campaigns/consequatur/validation-rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"validation_rule_id\": \"consequatur\",
    \"rule_override\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\"
}"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/validation-rules"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "validation_rule_id": "consequatur",
    "rule_override": "[\"consequatur\",\"consequatur\"]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/campaigns/{campaign_id}/validation-rules

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

Body Parameters

validation_rule_id   string   

Example: consequatur

rule_override   string  optional  

Must be a valid JSON string. Example: ["consequatur","consequatur"]

Disassociate a validation rule from a campaign.

Example request:
curl --request DELETE \
    "http://localhost/api/campaigns/consequatur/validation-rules/consequatur" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/campaigns/consequatur/validation-rules/consequatur"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/campaigns/{campaign_id}/validation-rules/{validation_rule_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   string   

The ID of the campaign. Example: consequatur

validation_rule_id   string   

The ID of the validation rule. Example: consequatur

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/validation-rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/validation-rules"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
 

{
    "message": "Server Error"
}
 

Request   

GET api/validation-rules

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Store a newly created resource in storage.

Example request:
curl --request POST \
    "http://localhost/api/validation-rules" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"vmqeopfuudtdsufvyvddq\",
    \"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
    \"rule_definition\": \"[\\\"consequatur\\\",\\\"consequatur\\\"]\",
    \"is_active\": false
}"
const url = new URL(
    "http://localhost/api/validation-rules"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "vmqeopfuudtdsufvyvddq",
    "description": "Dolores dolorum amet iste laborum eius est dolor.",
    "rule_definition": "[\"consequatur\",\"consequatur\"]",
    "is_active": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request   

POST api/validation-rules

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

Must not be greater than 255 characters. Example: vmqeopfuudtdsufvyvddq

description   string  optional  

Example: Dolores dolorum amet iste laborum eius est dolor.

rule_definition   string   

Must be a valid JSON string. Example: ["consequatur","consequatur"]

is_active   boolean  optional  

Example: false

Display e.

Example request:
curl --request GET \
    --get "http://localhost/api/validation-rules/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/validation-rules/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (500):

Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 56
access-control-allow-origin: *
 

{
    "code": 500,
    "message": "Failed to retrieve validation rule.",
    "data": "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'csite_c360.validation_rules' doesn't exist (Connection: mysql, SQL: select * from `validation_rules` where `tenant_id` = 1 and `validation_rules`.`id` = 17 and `validation_rules`.`deleted_at` is null limit 1)"
}
 

Request   

GET api/validation-rules/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the validation rule. Example: 17

Update the specified resource in storage.

Example request:
curl --request PUT \
    "http://localhost/api/validation-rules/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/validation-rules/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request   

PUT api/validation-rules/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the validation rule. Example: 17

Remove the specified resource from storage.

Example request:
curl --request DELETE \
    "http://localhost/api/validation-rules/17" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://localhost/api/validation-rules/17"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request   

DELETE api/validation-rules/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the validation rule. Example: 17