Create project template
curl --request POST \
--url https://api.cx.stax.ai/library/project_template \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"_id": "<string>",
"activity": [
{
"_id": "<string>",
"action": "<string>",
"changes": [
{
"data": "<string>",
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"client": "<string>",
"on_id": "<string>",
"on_py": 123,
"on_type": "<string>",
"team": "<string>",
"timestamp": "<string>",
"user": "<string>"
}
],
"billing": {
"billable_field_key": "<string>",
"default_quantity": {},
"fee_item": "<string>",
"nonbillable_reason_field_key": "<string>",
"quantity_field_key": "<string>",
"require_billable_decision": true,
"revision": 123
},
"category": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"description": "<string>",
"estimated_time": 123,
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"lead": "<string>",
"lead_group": "<string>",
"n_active_projects": 123,
"n_active_tasks": 123,
"num_tasks": 123,
"projects": {
"complete": 123,
"in_progress": 123,
"on_hold": 123,
"overdue": 123,
"projects": [
"<string>"
],
"tasks": [
{
"assignee": "<string>",
"doing": 123,
"done": 123,
"overdue": 123,
"total": 123
}
],
"total": 123
},
"schedule": [
{
"client_request": "<string>",
"clients": [
"<string>"
],
"clients_filter": {
"assignee": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"status": [
"<string>"
],
"tags": [
"<string>"
]
},
"deals": [
"<string>"
],
"deals_filter": {
"funnel": [
"<string>"
],
"owner": [
"<string>"
],
"source": [
"<string>"
],
"stage": [
"<string>"
],
"status": [
"<string>"
],
"value": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
]
},
"due": "<string>",
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"file": "<string>",
"frequency": "<string>",
"ignore_active": true,
"lead": "<string>",
"lead_group": "<string>",
"plans": [
"<string>"
],
"plans_filter": {
"client": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"provisions": {},
"pye": "<unknown>",
"status": [
"<string>"
],
"tags": [
"<string>"
],
"type": [
"<string>"
]
},
"timestamp": "<string>"
}
],
"tags": [
"<string>"
],
"tasks": [
{
"assignee": "<string>",
"assignee_group": "<string>",
"automation": "<string>",
"automation_config": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"automation_timing": {
"anchor": "<string>",
"date": "<string>",
"run_after_days": 123,
"run_hour": 123
},
"billable": true,
"billing_decision": true,
"blocked_fields": [
"<string>"
],
"client_task_data": {
"allow_skip_census_upload": "<string>",
"census_upload_instructions": "<string>",
"census_v2_export_field": "<string>",
"census_v2_export_file_type": "<string>",
"destination": "<string>",
"download_file": "<string>",
"form_file": "<string>",
"form_template": "<string>",
"notice_file": "<string>",
"payroll_connect_instructions": "<string>",
"payroll_enabled": "<string>",
"payroll_upload_instructions": "<string>",
"py": "<string>",
"url": "<string>",
"w2_upload_instructions": "<string>"
},
"client_task_type": "<string>",
"description": "<string>",
"due_after_days": 123,
"due_static": "<string>",
"fields_to_complete": [
"<string>"
],
"internal_task_data": {
"form_id": "<string>",
"py": "<string>",
"task_type": "<string>",
"url": "<string>"
},
"internal_task_type": "<string>",
"log_completion_to": "<string>",
"log_completion_type": "<string>",
"notes": "<string>",
"required": true
}
],
"team": "<string>",
"title": "<string>",
"triggers": [
{
"file_upload": {
"directory": "<string>",
"file_field_key": "<string>",
"plan_type": "<string>",
"relative_path": "<string>"
},
"form_email_field": "<string>",
"form_file_field": "<string>",
"form_name_field": "<string>",
"form_template": "<string>",
"lead": "<string>",
"lead_group": "<string>",
"payroll_trigger_clients": 123,
"type": "<string>"
}
],
"view": "<string>"
}
'import requests
url = "https://api.cx.stax.ai/library/project_template"
payload = {
"_id": "<string>",
"activity": [
{
"_id": "<string>",
"action": "<string>",
"changes": [
{
"data": "<string>",
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"client": "<string>",
"on_id": "<string>",
"on_py": 123,
"on_type": "<string>",
"team": "<string>",
"timestamp": "<string>",
"user": "<string>"
}
],
"billing": {
"billable_field_key": "<string>",
"default_quantity": {},
"fee_item": "<string>",
"nonbillable_reason_field_key": "<string>",
"quantity_field_key": "<string>",
"require_billable_decision": True,
"revision": 123
},
"category": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"description": "<string>",
"estimated_time": 123,
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"lead": "<string>",
"lead_group": "<string>",
"n_active_projects": 123,
"n_active_tasks": 123,
"num_tasks": 123,
"projects": {
"complete": 123,
"in_progress": 123,
"on_hold": 123,
"overdue": 123,
"projects": ["<string>"],
"tasks": [
{
"assignee": "<string>",
"doing": 123,
"done": 123,
"overdue": 123,
"total": 123
}
],
"total": 123
},
"schedule": [
{
"client_request": "<string>",
"clients": ["<string>"],
"clients_filter": {
"assignee": ["<string>"],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"status": ["<string>"],
"tags": ["<string>"]
},
"deals": ["<string>"],
"deals_filter": {
"funnel": ["<string>"],
"owner": ["<string>"],
"source": ["<string>"],
"stage": ["<string>"],
"status": ["<string>"],
"value": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
]
},
"due": "<string>",
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"file": "<string>",
"frequency": "<string>",
"ignore_active": True,
"lead": "<string>",
"lead_group": "<string>",
"plans": ["<string>"],
"plans_filter": {
"client": ["<string>"],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"provisions": {},
"pye": "<unknown>",
"status": ["<string>"],
"tags": ["<string>"],
"type": ["<string>"]
},
"timestamp": "<string>"
}
],
"tags": ["<string>"],
"tasks": [
{
"assignee": "<string>",
"assignee_group": "<string>",
"automation": "<string>",
"automation_config": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"automation_timing": {
"anchor": "<string>",
"date": "<string>",
"run_after_days": 123,
"run_hour": 123
},
"billable": True,
"billing_decision": True,
"blocked_fields": ["<string>"],
"client_task_data": {
"allow_skip_census_upload": "<string>",
"census_upload_instructions": "<string>",
"census_v2_export_field": "<string>",
"census_v2_export_file_type": "<string>",
"destination": "<string>",
"download_file": "<string>",
"form_file": "<string>",
"form_template": "<string>",
"notice_file": "<string>",
"payroll_connect_instructions": "<string>",
"payroll_enabled": "<string>",
"payroll_upload_instructions": "<string>",
"py": "<string>",
"url": "<string>",
"w2_upload_instructions": "<string>"
},
"client_task_type": "<string>",
"description": "<string>",
"due_after_days": 123,
"due_static": "<string>",
"fields_to_complete": ["<string>"],
"internal_task_data": {
"form_id": "<string>",
"py": "<string>",
"task_type": "<string>",
"url": "<string>"
},
"internal_task_type": "<string>",
"log_completion_to": "<string>",
"log_completion_type": "<string>",
"notes": "<string>",
"required": True
}
],
"team": "<string>",
"title": "<string>",
"triggers": [
{
"file_upload": {
"directory": "<string>",
"file_field_key": "<string>",
"plan_type": "<string>",
"relative_path": "<string>"
},
"form_email_field": "<string>",
"form_file_field": "<string>",
"form_name_field": "<string>",
"form_template": "<string>",
"lead": "<string>",
"lead_group": "<string>",
"payroll_trigger_clients": 123,
"type": "<string>"
}
],
"view": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '<string>',
activity: [
{
_id: '<string>',
action: '<string>',
changes: [{data: '<string>', field: '<string>', from: '<string>', to: '<string>'}],
client: '<string>',
on_id: '<string>',
on_py: 123,
on_type: '<string>',
team: '<string>',
timestamp: '<string>',
user: '<string>'
}
],
billing: {
billable_field_key: '<string>',
default_quantity: {},
fee_item: '<string>',
nonbillable_reason_field_key: '<string>',
quantity_field_key: '<string>',
require_billable_decision: true,
revision: 123
},
category: '<string>',
created_at: '<string>',
deleted_at: '<string>',
description: '<string>',
estimated_time: 123,
fields: [{key: '<string>', value: '<unknown>'}],
lead: '<string>',
lead_group: '<string>',
n_active_projects: 123,
n_active_tasks: 123,
num_tasks: 123,
projects: {
complete: 123,
in_progress: 123,
on_hold: 123,
overdue: 123,
projects: ['<string>'],
tasks: [{assignee: '<string>', doing: 123, done: 123, overdue: 123, total: 123}],
total: 123
},
schedule: [
{
client_request: '<string>',
clients: ['<string>'],
clients_filter: {
assignee: ['<string>'],
data: [{key: '<string>', op: '<string>', value: '<unknown>'}],
status: ['<string>'],
tags: ['<string>']
},
deals: ['<string>'],
deals_filter: {
funnel: ['<string>'],
owner: ['<string>'],
source: ['<string>'],
stage: ['<string>'],
status: ['<string>'],
value: [{key: '<string>', op: '<string>', value: '<unknown>'}]
},
due: '<string>',
fields: [{key: '<string>', value: '<unknown>'}],
file: '<string>',
frequency: '<string>',
ignore_active: true,
lead: '<string>',
lead_group: '<string>',
plans: ['<string>'],
plans_filter: {
client: ['<string>'],
data: [{key: '<string>', op: '<string>', value: '<unknown>'}],
provisions: {},
pye: '<unknown>',
status: ['<string>'],
tags: ['<string>'],
type: ['<string>']
},
timestamp: '<string>'
}
],
tags: ['<string>'],
tasks: [
{
assignee: '<string>',
assignee_group: '<string>',
automation: '<string>',
automation_config: [{key: '<string>', value: '<unknown>'}],
automation_timing: {anchor: '<string>', date: '<string>', run_after_days: 123, run_hour: 123},
billable: true,
billing_decision: true,
blocked_fields: ['<string>'],
client_task_data: {
allow_skip_census_upload: '<string>',
census_upload_instructions: '<string>',
census_v2_export_field: '<string>',
census_v2_export_file_type: '<string>',
destination: '<string>',
download_file: '<string>',
form_file: '<string>',
form_template: '<string>',
notice_file: '<string>',
payroll_connect_instructions: '<string>',
payroll_enabled: '<string>',
payroll_upload_instructions: '<string>',
py: '<string>',
url: '<string>',
w2_upload_instructions: '<string>'
},
client_task_type: '<string>',
description: '<string>',
due_after_days: 123,
due_static: '<string>',
fields_to_complete: ['<string>'],
internal_task_data: {form_id: '<string>', py: '<string>', task_type: '<string>', url: '<string>'},
internal_task_type: '<string>',
log_completion_to: '<string>',
log_completion_type: '<string>',
notes: '<string>',
required: true
}
],
team: '<string>',
title: '<string>',
triggers: [
{
file_upload: {
directory: '<string>',
file_field_key: '<string>',
plan_type: '<string>',
relative_path: '<string>'
},
form_email_field: '<string>',
form_file_field: '<string>',
form_name_field: '<string>',
form_template: '<string>',
lead: '<string>',
lead_group: '<string>',
payroll_trigger_clients: 123,
type: '<string>'
}
],
view: '<string>'
})
};
fetch('https://api.cx.stax.ai/library/project_template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cx.stax.ai/library/project_template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '<string>',
'activity' => [
[
'_id' => '<string>',
'action' => '<string>',
'changes' => [
[
'data' => '<string>',
'field' => '<string>',
'from' => '<string>',
'to' => '<string>'
]
],
'client' => '<string>',
'on_id' => '<string>',
'on_py' => 123,
'on_type' => '<string>',
'team' => '<string>',
'timestamp' => '<string>',
'user' => '<string>'
]
],
'billing' => [
'billable_field_key' => '<string>',
'default_quantity' => [
],
'fee_item' => '<string>',
'nonbillable_reason_field_key' => '<string>',
'quantity_field_key' => '<string>',
'require_billable_decision' => true,
'revision' => 123
],
'category' => '<string>',
'created_at' => '<string>',
'deleted_at' => '<string>',
'description' => '<string>',
'estimated_time' => 123,
'fields' => [
[
'key' => '<string>',
'value' => '<unknown>'
]
],
'lead' => '<string>',
'lead_group' => '<string>',
'n_active_projects' => 123,
'n_active_tasks' => 123,
'num_tasks' => 123,
'projects' => [
'complete' => 123,
'in_progress' => 123,
'on_hold' => 123,
'overdue' => 123,
'projects' => [
'<string>'
],
'tasks' => [
[
'assignee' => '<string>',
'doing' => 123,
'done' => 123,
'overdue' => 123,
'total' => 123
]
],
'total' => 123
],
'schedule' => [
[
'client_request' => '<string>',
'clients' => [
'<string>'
],
'clients_filter' => [
'assignee' => [
'<string>'
],
'data' => [
[
'key' => '<string>',
'op' => '<string>',
'value' => '<unknown>'
]
],
'status' => [
'<string>'
],
'tags' => [
'<string>'
]
],
'deals' => [
'<string>'
],
'deals_filter' => [
'funnel' => [
'<string>'
],
'owner' => [
'<string>'
],
'source' => [
'<string>'
],
'stage' => [
'<string>'
],
'status' => [
'<string>'
],
'value' => [
[
'key' => '<string>',
'op' => '<string>',
'value' => '<unknown>'
]
]
],
'due' => '<string>',
'fields' => [
[
'key' => '<string>',
'value' => '<unknown>'
]
],
'file' => '<string>',
'frequency' => '<string>',
'ignore_active' => true,
'lead' => '<string>',
'lead_group' => '<string>',
'plans' => [
'<string>'
],
'plans_filter' => [
'client' => [
'<string>'
],
'data' => [
[
'key' => '<string>',
'op' => '<string>',
'value' => '<unknown>'
]
],
'provisions' => [
],
'pye' => '<unknown>',
'status' => [
'<string>'
],
'tags' => [
'<string>'
],
'type' => [
'<string>'
]
],
'timestamp' => '<string>'
]
],
'tags' => [
'<string>'
],
'tasks' => [
[
'assignee' => '<string>',
'assignee_group' => '<string>',
'automation' => '<string>',
'automation_config' => [
[
'key' => '<string>',
'value' => '<unknown>'
]
],
'automation_timing' => [
'anchor' => '<string>',
'date' => '<string>',
'run_after_days' => 123,
'run_hour' => 123
],
'billable' => true,
'billing_decision' => true,
'blocked_fields' => [
'<string>'
],
'client_task_data' => [
'allow_skip_census_upload' => '<string>',
'census_upload_instructions' => '<string>',
'census_v2_export_field' => '<string>',
'census_v2_export_file_type' => '<string>',
'destination' => '<string>',
'download_file' => '<string>',
'form_file' => '<string>',
'form_template' => '<string>',
'notice_file' => '<string>',
'payroll_connect_instructions' => '<string>',
'payroll_enabled' => '<string>',
'payroll_upload_instructions' => '<string>',
'py' => '<string>',
'url' => '<string>',
'w2_upload_instructions' => '<string>'
],
'client_task_type' => '<string>',
'description' => '<string>',
'due_after_days' => 123,
'due_static' => '<string>',
'fields_to_complete' => [
'<string>'
],
'internal_task_data' => [
'form_id' => '<string>',
'py' => '<string>',
'task_type' => '<string>',
'url' => '<string>'
],
'internal_task_type' => '<string>',
'log_completion_to' => '<string>',
'log_completion_type' => '<string>',
'notes' => '<string>',
'required' => true
]
],
'team' => '<string>',
'title' => '<string>',
'triggers' => [
[
'file_upload' => [
'directory' => '<string>',
'file_field_key' => '<string>',
'plan_type' => '<string>',
'relative_path' => '<string>'
],
'form_email_field' => '<string>',
'form_file_field' => '<string>',
'form_name_field' => '<string>',
'form_template' => '<string>',
'lead' => '<string>',
'lead_group' => '<string>',
'payroll_trigger_clients' => 123,
'type' => '<string>'
]
],
'view' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cx.stax.ai/library/project_template"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"activity\": [\n {\n \"_id\": \"<string>\",\n \"action\": \"<string>\",\n \"changes\": [\n {\n \"data\": \"<string>\",\n \"field\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"client\": \"<string>\",\n \"on_id\": \"<string>\",\n \"on_py\": 123,\n \"on_type\": \"<string>\",\n \"team\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"user\": \"<string>\"\n }\n ],\n \"billing\": {\n \"billable_field_key\": \"<string>\",\n \"default_quantity\": {},\n \"fee_item\": \"<string>\",\n \"nonbillable_reason_field_key\": \"<string>\",\n \"quantity_field_key\": \"<string>\",\n \"require_billable_decision\": true,\n \"revision\": 123\n },\n \"category\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\",\n \"description\": \"<string>\",\n \"estimated_time\": 123,\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"n_active_projects\": 123,\n \"n_active_tasks\": 123,\n \"num_tasks\": 123,\n \"projects\": {\n \"complete\": 123,\n \"in_progress\": 123,\n \"on_hold\": 123,\n \"overdue\": 123,\n \"projects\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"doing\": 123,\n \"done\": 123,\n \"overdue\": 123,\n \"total\": 123\n }\n ],\n \"total\": 123\n },\n \"schedule\": [\n {\n \"client_request\": \"<string>\",\n \"clients\": [\n \"<string>\"\n ],\n \"clients_filter\": {\n \"assignee\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n },\n \"deals\": [\n \"<string>\"\n ],\n \"deals_filter\": {\n \"funnel\": [\n \"<string>\"\n ],\n \"owner\": [\n \"<string>\"\n ],\n \"source\": [\n \"<string>\"\n ],\n \"stage\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"value\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"due\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"file\": \"<string>\",\n \"frequency\": \"<string>\",\n \"ignore_active\": true,\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"plans\": [\n \"<string>\"\n ],\n \"plans_filter\": {\n \"client\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"provisions\": {},\n \"pye\": \"<unknown>\",\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"type\": [\n \"<string>\"\n ]\n },\n \"timestamp\": \"<string>\"\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"assignee_group\": \"<string>\",\n \"automation\": \"<string>\",\n \"automation_config\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automation_timing\": {\n \"anchor\": \"<string>\",\n \"date\": \"<string>\",\n \"run_after_days\": 123,\n \"run_hour\": 123\n },\n \"billable\": true,\n \"billing_decision\": true,\n \"blocked_fields\": [\n \"<string>\"\n ],\n \"client_task_data\": {\n \"allow_skip_census_upload\": \"<string>\",\n \"census_upload_instructions\": \"<string>\",\n \"census_v2_export_field\": \"<string>\",\n \"census_v2_export_file_type\": \"<string>\",\n \"destination\": \"<string>\",\n \"download_file\": \"<string>\",\n \"form_file\": \"<string>\",\n \"form_template\": \"<string>\",\n \"notice_file\": \"<string>\",\n \"payroll_connect_instructions\": \"<string>\",\n \"payroll_enabled\": \"<string>\",\n \"payroll_upload_instructions\": \"<string>\",\n \"py\": \"<string>\",\n \"url\": \"<string>\",\n \"w2_upload_instructions\": \"<string>\"\n },\n \"client_task_type\": \"<string>\",\n \"description\": \"<string>\",\n \"due_after_days\": 123,\n \"due_static\": \"<string>\",\n \"fields_to_complete\": [\n \"<string>\"\n ],\n \"internal_task_data\": {\n \"form_id\": \"<string>\",\n \"py\": \"<string>\",\n \"task_type\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"internal_task_type\": \"<string>\",\n \"log_completion_to\": \"<string>\",\n \"log_completion_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"required\": true\n }\n ],\n \"team\": \"<string>\",\n \"title\": \"<string>\",\n \"triggers\": [\n {\n \"file_upload\": {\n \"directory\": \"<string>\",\n \"file_field_key\": \"<string>\",\n \"plan_type\": \"<string>\",\n \"relative_path\": \"<string>\"\n },\n \"form_email_field\": \"<string>\",\n \"form_file_field\": \"<string>\",\n \"form_name_field\": \"<string>\",\n \"form_template\": \"<string>\",\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"payroll_trigger_clients\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"view\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cx.stax.ai/library/project_template")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"activity\": [\n {\n \"_id\": \"<string>\",\n \"action\": \"<string>\",\n \"changes\": [\n {\n \"data\": \"<string>\",\n \"field\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"client\": \"<string>\",\n \"on_id\": \"<string>\",\n \"on_py\": 123,\n \"on_type\": \"<string>\",\n \"team\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"user\": \"<string>\"\n }\n ],\n \"billing\": {\n \"billable_field_key\": \"<string>\",\n \"default_quantity\": {},\n \"fee_item\": \"<string>\",\n \"nonbillable_reason_field_key\": \"<string>\",\n \"quantity_field_key\": \"<string>\",\n \"require_billable_decision\": true,\n \"revision\": 123\n },\n \"category\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\",\n \"description\": \"<string>\",\n \"estimated_time\": 123,\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"n_active_projects\": 123,\n \"n_active_tasks\": 123,\n \"num_tasks\": 123,\n \"projects\": {\n \"complete\": 123,\n \"in_progress\": 123,\n \"on_hold\": 123,\n \"overdue\": 123,\n \"projects\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"doing\": 123,\n \"done\": 123,\n \"overdue\": 123,\n \"total\": 123\n }\n ],\n \"total\": 123\n },\n \"schedule\": [\n {\n \"client_request\": \"<string>\",\n \"clients\": [\n \"<string>\"\n ],\n \"clients_filter\": {\n \"assignee\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n },\n \"deals\": [\n \"<string>\"\n ],\n \"deals_filter\": {\n \"funnel\": [\n \"<string>\"\n ],\n \"owner\": [\n \"<string>\"\n ],\n \"source\": [\n \"<string>\"\n ],\n \"stage\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"value\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"due\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"file\": \"<string>\",\n \"frequency\": \"<string>\",\n \"ignore_active\": true,\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"plans\": [\n \"<string>\"\n ],\n \"plans_filter\": {\n \"client\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"provisions\": {},\n \"pye\": \"<unknown>\",\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"type\": [\n \"<string>\"\n ]\n },\n \"timestamp\": \"<string>\"\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"assignee_group\": \"<string>\",\n \"automation\": \"<string>\",\n \"automation_config\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automation_timing\": {\n \"anchor\": \"<string>\",\n \"date\": \"<string>\",\n \"run_after_days\": 123,\n \"run_hour\": 123\n },\n \"billable\": true,\n \"billing_decision\": true,\n \"blocked_fields\": [\n \"<string>\"\n ],\n \"client_task_data\": {\n \"allow_skip_census_upload\": \"<string>\",\n \"census_upload_instructions\": \"<string>\",\n \"census_v2_export_field\": \"<string>\",\n \"census_v2_export_file_type\": \"<string>\",\n \"destination\": \"<string>\",\n \"download_file\": \"<string>\",\n \"form_file\": \"<string>\",\n \"form_template\": \"<string>\",\n \"notice_file\": \"<string>\",\n \"payroll_connect_instructions\": \"<string>\",\n \"payroll_enabled\": \"<string>\",\n \"payroll_upload_instructions\": \"<string>\",\n \"py\": \"<string>\",\n \"url\": \"<string>\",\n \"w2_upload_instructions\": \"<string>\"\n },\n \"client_task_type\": \"<string>\",\n \"description\": \"<string>\",\n \"due_after_days\": 123,\n \"due_static\": \"<string>\",\n \"fields_to_complete\": [\n \"<string>\"\n ],\n \"internal_task_data\": {\n \"form_id\": \"<string>\",\n \"py\": \"<string>\",\n \"task_type\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"internal_task_type\": \"<string>\",\n \"log_completion_to\": \"<string>\",\n \"log_completion_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"required\": true\n }\n ],\n \"team\": \"<string>\",\n \"title\": \"<string>\",\n \"triggers\": [\n {\n \"file_upload\": {\n \"directory\": \"<string>\",\n \"file_field_key\": \"<string>\",\n \"plan_type\": \"<string>\",\n \"relative_path\": \"<string>\"\n },\n \"form_email_field\": \"<string>\",\n \"form_file_field\": \"<string>\",\n \"form_name_field\": \"<string>\",\n \"form_template\": \"<string>\",\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"payroll_trigger_clients\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"view\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cx.stax.ai/library/project_template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"activity\": [\n {\n \"_id\": \"<string>\",\n \"action\": \"<string>\",\n \"changes\": [\n {\n \"data\": \"<string>\",\n \"field\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"client\": \"<string>\",\n \"on_id\": \"<string>\",\n \"on_py\": 123,\n \"on_type\": \"<string>\",\n \"team\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"user\": \"<string>\"\n }\n ],\n \"billing\": {\n \"billable_field_key\": \"<string>\",\n \"default_quantity\": {},\n \"fee_item\": \"<string>\",\n \"nonbillable_reason_field_key\": \"<string>\",\n \"quantity_field_key\": \"<string>\",\n \"require_billable_decision\": true,\n \"revision\": 123\n },\n \"category\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\",\n \"description\": \"<string>\",\n \"estimated_time\": 123,\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"n_active_projects\": 123,\n \"n_active_tasks\": 123,\n \"num_tasks\": 123,\n \"projects\": {\n \"complete\": 123,\n \"in_progress\": 123,\n \"on_hold\": 123,\n \"overdue\": 123,\n \"projects\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"doing\": 123,\n \"done\": 123,\n \"overdue\": 123,\n \"total\": 123\n }\n ],\n \"total\": 123\n },\n \"schedule\": [\n {\n \"client_request\": \"<string>\",\n \"clients\": [\n \"<string>\"\n ],\n \"clients_filter\": {\n \"assignee\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n },\n \"deals\": [\n \"<string>\"\n ],\n \"deals_filter\": {\n \"funnel\": [\n \"<string>\"\n ],\n \"owner\": [\n \"<string>\"\n ],\n \"source\": [\n \"<string>\"\n ],\n \"stage\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"value\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"due\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"file\": \"<string>\",\n \"frequency\": \"<string>\",\n \"ignore_active\": true,\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"plans\": [\n \"<string>\"\n ],\n \"plans_filter\": {\n \"client\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"provisions\": {},\n \"pye\": \"<unknown>\",\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"type\": [\n \"<string>\"\n ]\n },\n \"timestamp\": \"<string>\"\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"assignee_group\": \"<string>\",\n \"automation\": \"<string>\",\n \"automation_config\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automation_timing\": {\n \"anchor\": \"<string>\",\n \"date\": \"<string>\",\n \"run_after_days\": 123,\n \"run_hour\": 123\n },\n \"billable\": true,\n \"billing_decision\": true,\n \"blocked_fields\": [\n \"<string>\"\n ],\n \"client_task_data\": {\n \"allow_skip_census_upload\": \"<string>\",\n \"census_upload_instructions\": \"<string>\",\n \"census_v2_export_field\": \"<string>\",\n \"census_v2_export_file_type\": \"<string>\",\n \"destination\": \"<string>\",\n \"download_file\": \"<string>\",\n \"form_file\": \"<string>\",\n \"form_template\": \"<string>\",\n \"notice_file\": \"<string>\",\n \"payroll_connect_instructions\": \"<string>\",\n \"payroll_enabled\": \"<string>\",\n \"payroll_upload_instructions\": \"<string>\",\n \"py\": \"<string>\",\n \"url\": \"<string>\",\n \"w2_upload_instructions\": \"<string>\"\n },\n \"client_task_type\": \"<string>\",\n \"description\": \"<string>\",\n \"due_after_days\": 123,\n \"due_static\": \"<string>\",\n \"fields_to_complete\": [\n \"<string>\"\n ],\n \"internal_task_data\": {\n \"form_id\": \"<string>\",\n \"py\": \"<string>\",\n \"task_type\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"internal_task_type\": \"<string>\",\n \"log_completion_to\": \"<string>\",\n \"log_completion_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"required\": true\n }\n ],\n \"team\": \"<string>\",\n \"title\": \"<string>\",\n \"triggers\": [\n {\n \"file_upload\": {\n \"directory\": \"<string>\",\n \"file_field_key\": \"<string>\",\n \"plan_type\": \"<string>\",\n \"relative_path\": \"<string>\"\n },\n \"form_email_field\": \"<string>\",\n \"form_file_field\": \"<string>\",\n \"form_name_field\": \"<string>\",\n \"form_template\": \"<string>\",\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"payroll_trigger_clients\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"view\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"activity": [
{
"_id": "<string>",
"action": "<string>",
"changes": [
{
"data": "<string>",
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"client": "<string>",
"on_id": "<string>",
"on_py": 123,
"on_type": "<string>",
"team": "<string>",
"timestamp": "<string>",
"user": "<string>"
}
],
"billing": {
"billable_field_key": "<string>",
"default_quantity": {},
"fee_item": "<string>",
"nonbillable_reason_field_key": "<string>",
"quantity_field_key": "<string>",
"require_billable_decision": true,
"revision": 123
},
"category": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"description": "<string>",
"estimated_time": 123,
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"lead": "<string>",
"lead_group": "<string>",
"n_active_projects": 123,
"n_active_tasks": 123,
"num_tasks": 123,
"projects": {
"complete": 123,
"in_progress": 123,
"on_hold": 123,
"overdue": 123,
"projects": [
"<string>"
],
"tasks": [
{
"assignee": "<string>",
"doing": 123,
"done": 123,
"overdue": 123,
"total": 123
}
],
"total": 123
},
"schedule": [
{
"client_request": "<string>",
"clients": [
"<string>"
],
"clients_filter": {
"assignee": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"status": [
"<string>"
],
"tags": [
"<string>"
]
},
"deals": [
"<string>"
],
"deals_filter": {
"funnel": [
"<string>"
],
"owner": [
"<string>"
],
"source": [
"<string>"
],
"stage": [
"<string>"
],
"status": [
"<string>"
],
"value": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
]
},
"due": "<string>",
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"file": "<string>",
"frequency": "<string>",
"ignore_active": true,
"lead": "<string>",
"lead_group": "<string>",
"plans": [
"<string>"
],
"plans_filter": {
"client": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"provisions": {},
"pye": "<unknown>",
"status": [
"<string>"
],
"tags": [
"<string>"
],
"type": [
"<string>"
]
},
"timestamp": "<string>"
}
],
"tags": [
"<string>"
],
"tasks": [
{
"assignee": "<string>",
"assignee_group": "<string>",
"automation": "<string>",
"automation_config": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"automation_timing": {
"anchor": "<string>",
"date": "<string>",
"run_after_days": 123,
"run_hour": 123
},
"billable": true,
"billing_decision": true,
"blocked_fields": [
"<string>"
],
"client_task_data": {
"allow_skip_census_upload": "<string>",
"census_upload_instructions": "<string>",
"census_v2_employee_data_policy": "any",
"census_v2_export_field": "<string>",
"census_v2_export_file_type": "<string>",
"census_v2_flow_preset": "company_contacts_ownership_payroll_census",
"destination": "<string>",
"download_file": "<string>",
"form_file": "<string>",
"form_template": "<string>",
"notice_file": "<string>",
"payroll_connect_instructions": "<string>",
"payroll_enabled": "<string>",
"payroll_upload_instructions": "<string>",
"py": "<string>",
"url": "<string>",
"w2_upload_instructions": "<string>"
},
"client_task_type": "<string>",
"description": "<string>",
"due_after_days": 123,
"due_static": "<string>",
"fields_to_complete": [
"<string>"
],
"internal_task_data": {
"form_id": "<string>",
"py": "<string>",
"task_type": "<string>",
"url": "<string>"
},
"internal_task_type": "<string>",
"log_completion_to": "<string>",
"log_completion_type": "<string>",
"notes": "<string>",
"required": true
}
],
"team": "<string>",
"title": "<string>",
"triggers": [
{
"file_upload": {
"directory": "<string>",
"file_field_key": "<string>",
"plan_type": "<string>",
"relative_path": "<string>"
},
"form_email_field": "<string>",
"form_file_field": "<string>",
"form_name_field": "<string>",
"form_template": "<string>",
"lead": "<string>",
"lead_group": "<string>",
"payroll_trigger_clients": 123,
"type": "<string>"
}
],
"view": "<string>"
}{}{}library
Create project template
Create a new project template (title required). Supports automatic name deduplication.
POST
/
library
/
project_template
Create project template
curl --request POST \
--url https://api.cx.stax.ai/library/project_template \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"_id": "<string>",
"activity": [
{
"_id": "<string>",
"action": "<string>",
"changes": [
{
"data": "<string>",
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"client": "<string>",
"on_id": "<string>",
"on_py": 123,
"on_type": "<string>",
"team": "<string>",
"timestamp": "<string>",
"user": "<string>"
}
],
"billing": {
"billable_field_key": "<string>",
"default_quantity": {},
"fee_item": "<string>",
"nonbillable_reason_field_key": "<string>",
"quantity_field_key": "<string>",
"require_billable_decision": true,
"revision": 123
},
"category": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"description": "<string>",
"estimated_time": 123,
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"lead": "<string>",
"lead_group": "<string>",
"n_active_projects": 123,
"n_active_tasks": 123,
"num_tasks": 123,
"projects": {
"complete": 123,
"in_progress": 123,
"on_hold": 123,
"overdue": 123,
"projects": [
"<string>"
],
"tasks": [
{
"assignee": "<string>",
"doing": 123,
"done": 123,
"overdue": 123,
"total": 123
}
],
"total": 123
},
"schedule": [
{
"client_request": "<string>",
"clients": [
"<string>"
],
"clients_filter": {
"assignee": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"status": [
"<string>"
],
"tags": [
"<string>"
]
},
"deals": [
"<string>"
],
"deals_filter": {
"funnel": [
"<string>"
],
"owner": [
"<string>"
],
"source": [
"<string>"
],
"stage": [
"<string>"
],
"status": [
"<string>"
],
"value": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
]
},
"due": "<string>",
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"file": "<string>",
"frequency": "<string>",
"ignore_active": true,
"lead": "<string>",
"lead_group": "<string>",
"plans": [
"<string>"
],
"plans_filter": {
"client": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"provisions": {},
"pye": "<unknown>",
"status": [
"<string>"
],
"tags": [
"<string>"
],
"type": [
"<string>"
]
},
"timestamp": "<string>"
}
],
"tags": [
"<string>"
],
"tasks": [
{
"assignee": "<string>",
"assignee_group": "<string>",
"automation": "<string>",
"automation_config": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"automation_timing": {
"anchor": "<string>",
"date": "<string>",
"run_after_days": 123,
"run_hour": 123
},
"billable": true,
"billing_decision": true,
"blocked_fields": [
"<string>"
],
"client_task_data": {
"allow_skip_census_upload": "<string>",
"census_upload_instructions": "<string>",
"census_v2_export_field": "<string>",
"census_v2_export_file_type": "<string>",
"destination": "<string>",
"download_file": "<string>",
"form_file": "<string>",
"form_template": "<string>",
"notice_file": "<string>",
"payroll_connect_instructions": "<string>",
"payroll_enabled": "<string>",
"payroll_upload_instructions": "<string>",
"py": "<string>",
"url": "<string>",
"w2_upload_instructions": "<string>"
},
"client_task_type": "<string>",
"description": "<string>",
"due_after_days": 123,
"due_static": "<string>",
"fields_to_complete": [
"<string>"
],
"internal_task_data": {
"form_id": "<string>",
"py": "<string>",
"task_type": "<string>",
"url": "<string>"
},
"internal_task_type": "<string>",
"log_completion_to": "<string>",
"log_completion_type": "<string>",
"notes": "<string>",
"required": true
}
],
"team": "<string>",
"title": "<string>",
"triggers": [
{
"file_upload": {
"directory": "<string>",
"file_field_key": "<string>",
"plan_type": "<string>",
"relative_path": "<string>"
},
"form_email_field": "<string>",
"form_file_field": "<string>",
"form_name_field": "<string>",
"form_template": "<string>",
"lead": "<string>",
"lead_group": "<string>",
"payroll_trigger_clients": 123,
"type": "<string>"
}
],
"view": "<string>"
}
'import requests
url = "https://api.cx.stax.ai/library/project_template"
payload = {
"_id": "<string>",
"activity": [
{
"_id": "<string>",
"action": "<string>",
"changes": [
{
"data": "<string>",
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"client": "<string>",
"on_id": "<string>",
"on_py": 123,
"on_type": "<string>",
"team": "<string>",
"timestamp": "<string>",
"user": "<string>"
}
],
"billing": {
"billable_field_key": "<string>",
"default_quantity": {},
"fee_item": "<string>",
"nonbillable_reason_field_key": "<string>",
"quantity_field_key": "<string>",
"require_billable_decision": True,
"revision": 123
},
"category": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"description": "<string>",
"estimated_time": 123,
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"lead": "<string>",
"lead_group": "<string>",
"n_active_projects": 123,
"n_active_tasks": 123,
"num_tasks": 123,
"projects": {
"complete": 123,
"in_progress": 123,
"on_hold": 123,
"overdue": 123,
"projects": ["<string>"],
"tasks": [
{
"assignee": "<string>",
"doing": 123,
"done": 123,
"overdue": 123,
"total": 123
}
],
"total": 123
},
"schedule": [
{
"client_request": "<string>",
"clients": ["<string>"],
"clients_filter": {
"assignee": ["<string>"],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"status": ["<string>"],
"tags": ["<string>"]
},
"deals": ["<string>"],
"deals_filter": {
"funnel": ["<string>"],
"owner": ["<string>"],
"source": ["<string>"],
"stage": ["<string>"],
"status": ["<string>"],
"value": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
]
},
"due": "<string>",
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"file": "<string>",
"frequency": "<string>",
"ignore_active": True,
"lead": "<string>",
"lead_group": "<string>",
"plans": ["<string>"],
"plans_filter": {
"client": ["<string>"],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"provisions": {},
"pye": "<unknown>",
"status": ["<string>"],
"tags": ["<string>"],
"type": ["<string>"]
},
"timestamp": "<string>"
}
],
"tags": ["<string>"],
"tasks": [
{
"assignee": "<string>",
"assignee_group": "<string>",
"automation": "<string>",
"automation_config": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"automation_timing": {
"anchor": "<string>",
"date": "<string>",
"run_after_days": 123,
"run_hour": 123
},
"billable": True,
"billing_decision": True,
"blocked_fields": ["<string>"],
"client_task_data": {
"allow_skip_census_upload": "<string>",
"census_upload_instructions": "<string>",
"census_v2_export_field": "<string>",
"census_v2_export_file_type": "<string>",
"destination": "<string>",
"download_file": "<string>",
"form_file": "<string>",
"form_template": "<string>",
"notice_file": "<string>",
"payroll_connect_instructions": "<string>",
"payroll_enabled": "<string>",
"payroll_upload_instructions": "<string>",
"py": "<string>",
"url": "<string>",
"w2_upload_instructions": "<string>"
},
"client_task_type": "<string>",
"description": "<string>",
"due_after_days": 123,
"due_static": "<string>",
"fields_to_complete": ["<string>"],
"internal_task_data": {
"form_id": "<string>",
"py": "<string>",
"task_type": "<string>",
"url": "<string>"
},
"internal_task_type": "<string>",
"log_completion_to": "<string>",
"log_completion_type": "<string>",
"notes": "<string>",
"required": True
}
],
"team": "<string>",
"title": "<string>",
"triggers": [
{
"file_upload": {
"directory": "<string>",
"file_field_key": "<string>",
"plan_type": "<string>",
"relative_path": "<string>"
},
"form_email_field": "<string>",
"form_file_field": "<string>",
"form_name_field": "<string>",
"form_template": "<string>",
"lead": "<string>",
"lead_group": "<string>",
"payroll_trigger_clients": 123,
"type": "<string>"
}
],
"view": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
_id: '<string>',
activity: [
{
_id: '<string>',
action: '<string>',
changes: [{data: '<string>', field: '<string>', from: '<string>', to: '<string>'}],
client: '<string>',
on_id: '<string>',
on_py: 123,
on_type: '<string>',
team: '<string>',
timestamp: '<string>',
user: '<string>'
}
],
billing: {
billable_field_key: '<string>',
default_quantity: {},
fee_item: '<string>',
nonbillable_reason_field_key: '<string>',
quantity_field_key: '<string>',
require_billable_decision: true,
revision: 123
},
category: '<string>',
created_at: '<string>',
deleted_at: '<string>',
description: '<string>',
estimated_time: 123,
fields: [{key: '<string>', value: '<unknown>'}],
lead: '<string>',
lead_group: '<string>',
n_active_projects: 123,
n_active_tasks: 123,
num_tasks: 123,
projects: {
complete: 123,
in_progress: 123,
on_hold: 123,
overdue: 123,
projects: ['<string>'],
tasks: [{assignee: '<string>', doing: 123, done: 123, overdue: 123, total: 123}],
total: 123
},
schedule: [
{
client_request: '<string>',
clients: ['<string>'],
clients_filter: {
assignee: ['<string>'],
data: [{key: '<string>', op: '<string>', value: '<unknown>'}],
status: ['<string>'],
tags: ['<string>']
},
deals: ['<string>'],
deals_filter: {
funnel: ['<string>'],
owner: ['<string>'],
source: ['<string>'],
stage: ['<string>'],
status: ['<string>'],
value: [{key: '<string>', op: '<string>', value: '<unknown>'}]
},
due: '<string>',
fields: [{key: '<string>', value: '<unknown>'}],
file: '<string>',
frequency: '<string>',
ignore_active: true,
lead: '<string>',
lead_group: '<string>',
plans: ['<string>'],
plans_filter: {
client: ['<string>'],
data: [{key: '<string>', op: '<string>', value: '<unknown>'}],
provisions: {},
pye: '<unknown>',
status: ['<string>'],
tags: ['<string>'],
type: ['<string>']
},
timestamp: '<string>'
}
],
tags: ['<string>'],
tasks: [
{
assignee: '<string>',
assignee_group: '<string>',
automation: '<string>',
automation_config: [{key: '<string>', value: '<unknown>'}],
automation_timing: {anchor: '<string>', date: '<string>', run_after_days: 123, run_hour: 123},
billable: true,
billing_decision: true,
blocked_fields: ['<string>'],
client_task_data: {
allow_skip_census_upload: '<string>',
census_upload_instructions: '<string>',
census_v2_export_field: '<string>',
census_v2_export_file_type: '<string>',
destination: '<string>',
download_file: '<string>',
form_file: '<string>',
form_template: '<string>',
notice_file: '<string>',
payroll_connect_instructions: '<string>',
payroll_enabled: '<string>',
payroll_upload_instructions: '<string>',
py: '<string>',
url: '<string>',
w2_upload_instructions: '<string>'
},
client_task_type: '<string>',
description: '<string>',
due_after_days: 123,
due_static: '<string>',
fields_to_complete: ['<string>'],
internal_task_data: {form_id: '<string>', py: '<string>', task_type: '<string>', url: '<string>'},
internal_task_type: '<string>',
log_completion_to: '<string>',
log_completion_type: '<string>',
notes: '<string>',
required: true
}
],
team: '<string>',
title: '<string>',
triggers: [
{
file_upload: {
directory: '<string>',
file_field_key: '<string>',
plan_type: '<string>',
relative_path: '<string>'
},
form_email_field: '<string>',
form_file_field: '<string>',
form_name_field: '<string>',
form_template: '<string>',
lead: '<string>',
lead_group: '<string>',
payroll_trigger_clients: 123,
type: '<string>'
}
],
view: '<string>'
})
};
fetch('https://api.cx.stax.ai/library/project_template', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cx.stax.ai/library/project_template",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'_id' => '<string>',
'activity' => [
[
'_id' => '<string>',
'action' => '<string>',
'changes' => [
[
'data' => '<string>',
'field' => '<string>',
'from' => '<string>',
'to' => '<string>'
]
],
'client' => '<string>',
'on_id' => '<string>',
'on_py' => 123,
'on_type' => '<string>',
'team' => '<string>',
'timestamp' => '<string>',
'user' => '<string>'
]
],
'billing' => [
'billable_field_key' => '<string>',
'default_quantity' => [
],
'fee_item' => '<string>',
'nonbillable_reason_field_key' => '<string>',
'quantity_field_key' => '<string>',
'require_billable_decision' => true,
'revision' => 123
],
'category' => '<string>',
'created_at' => '<string>',
'deleted_at' => '<string>',
'description' => '<string>',
'estimated_time' => 123,
'fields' => [
[
'key' => '<string>',
'value' => '<unknown>'
]
],
'lead' => '<string>',
'lead_group' => '<string>',
'n_active_projects' => 123,
'n_active_tasks' => 123,
'num_tasks' => 123,
'projects' => [
'complete' => 123,
'in_progress' => 123,
'on_hold' => 123,
'overdue' => 123,
'projects' => [
'<string>'
],
'tasks' => [
[
'assignee' => '<string>',
'doing' => 123,
'done' => 123,
'overdue' => 123,
'total' => 123
]
],
'total' => 123
],
'schedule' => [
[
'client_request' => '<string>',
'clients' => [
'<string>'
],
'clients_filter' => [
'assignee' => [
'<string>'
],
'data' => [
[
'key' => '<string>',
'op' => '<string>',
'value' => '<unknown>'
]
],
'status' => [
'<string>'
],
'tags' => [
'<string>'
]
],
'deals' => [
'<string>'
],
'deals_filter' => [
'funnel' => [
'<string>'
],
'owner' => [
'<string>'
],
'source' => [
'<string>'
],
'stage' => [
'<string>'
],
'status' => [
'<string>'
],
'value' => [
[
'key' => '<string>',
'op' => '<string>',
'value' => '<unknown>'
]
]
],
'due' => '<string>',
'fields' => [
[
'key' => '<string>',
'value' => '<unknown>'
]
],
'file' => '<string>',
'frequency' => '<string>',
'ignore_active' => true,
'lead' => '<string>',
'lead_group' => '<string>',
'plans' => [
'<string>'
],
'plans_filter' => [
'client' => [
'<string>'
],
'data' => [
[
'key' => '<string>',
'op' => '<string>',
'value' => '<unknown>'
]
],
'provisions' => [
],
'pye' => '<unknown>',
'status' => [
'<string>'
],
'tags' => [
'<string>'
],
'type' => [
'<string>'
]
],
'timestamp' => '<string>'
]
],
'tags' => [
'<string>'
],
'tasks' => [
[
'assignee' => '<string>',
'assignee_group' => '<string>',
'automation' => '<string>',
'automation_config' => [
[
'key' => '<string>',
'value' => '<unknown>'
]
],
'automation_timing' => [
'anchor' => '<string>',
'date' => '<string>',
'run_after_days' => 123,
'run_hour' => 123
],
'billable' => true,
'billing_decision' => true,
'blocked_fields' => [
'<string>'
],
'client_task_data' => [
'allow_skip_census_upload' => '<string>',
'census_upload_instructions' => '<string>',
'census_v2_export_field' => '<string>',
'census_v2_export_file_type' => '<string>',
'destination' => '<string>',
'download_file' => '<string>',
'form_file' => '<string>',
'form_template' => '<string>',
'notice_file' => '<string>',
'payroll_connect_instructions' => '<string>',
'payroll_enabled' => '<string>',
'payroll_upload_instructions' => '<string>',
'py' => '<string>',
'url' => '<string>',
'w2_upload_instructions' => '<string>'
],
'client_task_type' => '<string>',
'description' => '<string>',
'due_after_days' => 123,
'due_static' => '<string>',
'fields_to_complete' => [
'<string>'
],
'internal_task_data' => [
'form_id' => '<string>',
'py' => '<string>',
'task_type' => '<string>',
'url' => '<string>'
],
'internal_task_type' => '<string>',
'log_completion_to' => '<string>',
'log_completion_type' => '<string>',
'notes' => '<string>',
'required' => true
]
],
'team' => '<string>',
'title' => '<string>',
'triggers' => [
[
'file_upload' => [
'directory' => '<string>',
'file_field_key' => '<string>',
'plan_type' => '<string>',
'relative_path' => '<string>'
],
'form_email_field' => '<string>',
'form_file_field' => '<string>',
'form_name_field' => '<string>',
'form_template' => '<string>',
'lead' => '<string>',
'lead_group' => '<string>',
'payroll_trigger_clients' => 123,
'type' => '<string>'
]
],
'view' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cx.stax.ai/library/project_template"
payload := strings.NewReader("{\n \"_id\": \"<string>\",\n \"activity\": [\n {\n \"_id\": \"<string>\",\n \"action\": \"<string>\",\n \"changes\": [\n {\n \"data\": \"<string>\",\n \"field\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"client\": \"<string>\",\n \"on_id\": \"<string>\",\n \"on_py\": 123,\n \"on_type\": \"<string>\",\n \"team\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"user\": \"<string>\"\n }\n ],\n \"billing\": {\n \"billable_field_key\": \"<string>\",\n \"default_quantity\": {},\n \"fee_item\": \"<string>\",\n \"nonbillable_reason_field_key\": \"<string>\",\n \"quantity_field_key\": \"<string>\",\n \"require_billable_decision\": true,\n \"revision\": 123\n },\n \"category\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\",\n \"description\": \"<string>\",\n \"estimated_time\": 123,\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"n_active_projects\": 123,\n \"n_active_tasks\": 123,\n \"num_tasks\": 123,\n \"projects\": {\n \"complete\": 123,\n \"in_progress\": 123,\n \"on_hold\": 123,\n \"overdue\": 123,\n \"projects\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"doing\": 123,\n \"done\": 123,\n \"overdue\": 123,\n \"total\": 123\n }\n ],\n \"total\": 123\n },\n \"schedule\": [\n {\n \"client_request\": \"<string>\",\n \"clients\": [\n \"<string>\"\n ],\n \"clients_filter\": {\n \"assignee\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n },\n \"deals\": [\n \"<string>\"\n ],\n \"deals_filter\": {\n \"funnel\": [\n \"<string>\"\n ],\n \"owner\": [\n \"<string>\"\n ],\n \"source\": [\n \"<string>\"\n ],\n \"stage\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"value\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"due\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"file\": \"<string>\",\n \"frequency\": \"<string>\",\n \"ignore_active\": true,\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"plans\": [\n \"<string>\"\n ],\n \"plans_filter\": {\n \"client\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"provisions\": {},\n \"pye\": \"<unknown>\",\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"type\": [\n \"<string>\"\n ]\n },\n \"timestamp\": \"<string>\"\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"assignee_group\": \"<string>\",\n \"automation\": \"<string>\",\n \"automation_config\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automation_timing\": {\n \"anchor\": \"<string>\",\n \"date\": \"<string>\",\n \"run_after_days\": 123,\n \"run_hour\": 123\n },\n \"billable\": true,\n \"billing_decision\": true,\n \"blocked_fields\": [\n \"<string>\"\n ],\n \"client_task_data\": {\n \"allow_skip_census_upload\": \"<string>\",\n \"census_upload_instructions\": \"<string>\",\n \"census_v2_export_field\": \"<string>\",\n \"census_v2_export_file_type\": \"<string>\",\n \"destination\": \"<string>\",\n \"download_file\": \"<string>\",\n \"form_file\": \"<string>\",\n \"form_template\": \"<string>\",\n \"notice_file\": \"<string>\",\n \"payroll_connect_instructions\": \"<string>\",\n \"payroll_enabled\": \"<string>\",\n \"payroll_upload_instructions\": \"<string>\",\n \"py\": \"<string>\",\n \"url\": \"<string>\",\n \"w2_upload_instructions\": \"<string>\"\n },\n \"client_task_type\": \"<string>\",\n \"description\": \"<string>\",\n \"due_after_days\": 123,\n \"due_static\": \"<string>\",\n \"fields_to_complete\": [\n \"<string>\"\n ],\n \"internal_task_data\": {\n \"form_id\": \"<string>\",\n \"py\": \"<string>\",\n \"task_type\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"internal_task_type\": \"<string>\",\n \"log_completion_to\": \"<string>\",\n \"log_completion_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"required\": true\n }\n ],\n \"team\": \"<string>\",\n \"title\": \"<string>\",\n \"triggers\": [\n {\n \"file_upload\": {\n \"directory\": \"<string>\",\n \"file_field_key\": \"<string>\",\n \"plan_type\": \"<string>\",\n \"relative_path\": \"<string>\"\n },\n \"form_email_field\": \"<string>\",\n \"form_file_field\": \"<string>\",\n \"form_name_field\": \"<string>\",\n \"form_template\": \"<string>\",\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"payroll_trigger_clients\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"view\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cx.stax.ai/library/project_template")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"_id\": \"<string>\",\n \"activity\": [\n {\n \"_id\": \"<string>\",\n \"action\": \"<string>\",\n \"changes\": [\n {\n \"data\": \"<string>\",\n \"field\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"client\": \"<string>\",\n \"on_id\": \"<string>\",\n \"on_py\": 123,\n \"on_type\": \"<string>\",\n \"team\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"user\": \"<string>\"\n }\n ],\n \"billing\": {\n \"billable_field_key\": \"<string>\",\n \"default_quantity\": {},\n \"fee_item\": \"<string>\",\n \"nonbillable_reason_field_key\": \"<string>\",\n \"quantity_field_key\": \"<string>\",\n \"require_billable_decision\": true,\n \"revision\": 123\n },\n \"category\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\",\n \"description\": \"<string>\",\n \"estimated_time\": 123,\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"n_active_projects\": 123,\n \"n_active_tasks\": 123,\n \"num_tasks\": 123,\n \"projects\": {\n \"complete\": 123,\n \"in_progress\": 123,\n \"on_hold\": 123,\n \"overdue\": 123,\n \"projects\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"doing\": 123,\n \"done\": 123,\n \"overdue\": 123,\n \"total\": 123\n }\n ],\n \"total\": 123\n },\n \"schedule\": [\n {\n \"client_request\": \"<string>\",\n \"clients\": [\n \"<string>\"\n ],\n \"clients_filter\": {\n \"assignee\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n },\n \"deals\": [\n \"<string>\"\n ],\n \"deals_filter\": {\n \"funnel\": [\n \"<string>\"\n ],\n \"owner\": [\n \"<string>\"\n ],\n \"source\": [\n \"<string>\"\n ],\n \"stage\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"value\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"due\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"file\": \"<string>\",\n \"frequency\": \"<string>\",\n \"ignore_active\": true,\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"plans\": [\n \"<string>\"\n ],\n \"plans_filter\": {\n \"client\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"provisions\": {},\n \"pye\": \"<unknown>\",\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"type\": [\n \"<string>\"\n ]\n },\n \"timestamp\": \"<string>\"\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"assignee_group\": \"<string>\",\n \"automation\": \"<string>\",\n \"automation_config\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automation_timing\": {\n \"anchor\": \"<string>\",\n \"date\": \"<string>\",\n \"run_after_days\": 123,\n \"run_hour\": 123\n },\n \"billable\": true,\n \"billing_decision\": true,\n \"blocked_fields\": [\n \"<string>\"\n ],\n \"client_task_data\": {\n \"allow_skip_census_upload\": \"<string>\",\n \"census_upload_instructions\": \"<string>\",\n \"census_v2_export_field\": \"<string>\",\n \"census_v2_export_file_type\": \"<string>\",\n \"destination\": \"<string>\",\n \"download_file\": \"<string>\",\n \"form_file\": \"<string>\",\n \"form_template\": \"<string>\",\n \"notice_file\": \"<string>\",\n \"payroll_connect_instructions\": \"<string>\",\n \"payroll_enabled\": \"<string>\",\n \"payroll_upload_instructions\": \"<string>\",\n \"py\": \"<string>\",\n \"url\": \"<string>\",\n \"w2_upload_instructions\": \"<string>\"\n },\n \"client_task_type\": \"<string>\",\n \"description\": \"<string>\",\n \"due_after_days\": 123,\n \"due_static\": \"<string>\",\n \"fields_to_complete\": [\n \"<string>\"\n ],\n \"internal_task_data\": {\n \"form_id\": \"<string>\",\n \"py\": \"<string>\",\n \"task_type\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"internal_task_type\": \"<string>\",\n \"log_completion_to\": \"<string>\",\n \"log_completion_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"required\": true\n }\n ],\n \"team\": \"<string>\",\n \"title\": \"<string>\",\n \"triggers\": [\n {\n \"file_upload\": {\n \"directory\": \"<string>\",\n \"file_field_key\": \"<string>\",\n \"plan_type\": \"<string>\",\n \"relative_path\": \"<string>\"\n },\n \"form_email_field\": \"<string>\",\n \"form_file_field\": \"<string>\",\n \"form_name_field\": \"<string>\",\n \"form_template\": \"<string>\",\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"payroll_trigger_clients\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"view\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cx.stax.ai/library/project_template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"_id\": \"<string>\",\n \"activity\": [\n {\n \"_id\": \"<string>\",\n \"action\": \"<string>\",\n \"changes\": [\n {\n \"data\": \"<string>\",\n \"field\": \"<string>\",\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"client\": \"<string>\",\n \"on_id\": \"<string>\",\n \"on_py\": 123,\n \"on_type\": \"<string>\",\n \"team\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"user\": \"<string>\"\n }\n ],\n \"billing\": {\n \"billable_field_key\": \"<string>\",\n \"default_quantity\": {},\n \"fee_item\": \"<string>\",\n \"nonbillable_reason_field_key\": \"<string>\",\n \"quantity_field_key\": \"<string>\",\n \"require_billable_decision\": true,\n \"revision\": 123\n },\n \"category\": \"<string>\",\n \"created_at\": \"<string>\",\n \"deleted_at\": \"<string>\",\n \"description\": \"<string>\",\n \"estimated_time\": 123,\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"n_active_projects\": 123,\n \"n_active_tasks\": 123,\n \"num_tasks\": 123,\n \"projects\": {\n \"complete\": 123,\n \"in_progress\": 123,\n \"on_hold\": 123,\n \"overdue\": 123,\n \"projects\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"doing\": 123,\n \"done\": 123,\n \"overdue\": 123,\n \"total\": 123\n }\n ],\n \"total\": 123\n },\n \"schedule\": [\n {\n \"client_request\": \"<string>\",\n \"clients\": [\n \"<string>\"\n ],\n \"clients_filter\": {\n \"assignee\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ]\n },\n \"deals\": [\n \"<string>\"\n ],\n \"deals_filter\": {\n \"funnel\": [\n \"<string>\"\n ],\n \"owner\": [\n \"<string>\"\n ],\n \"source\": [\n \"<string>\"\n ],\n \"stage\": [\n \"<string>\"\n ],\n \"status\": [\n \"<string>\"\n ],\n \"value\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ]\n },\n \"due\": \"<string>\",\n \"fields\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"file\": \"<string>\",\n \"frequency\": \"<string>\",\n \"ignore_active\": true,\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"plans\": [\n \"<string>\"\n ],\n \"plans_filter\": {\n \"client\": [\n \"<string>\"\n ],\n \"data\": [\n {\n \"key\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"provisions\": {},\n \"pye\": \"<unknown>\",\n \"status\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"type\": [\n \"<string>\"\n ]\n },\n \"timestamp\": \"<string>\"\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"tasks\": [\n {\n \"assignee\": \"<string>\",\n \"assignee_group\": \"<string>\",\n \"automation\": \"<string>\",\n \"automation_config\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<unknown>\"\n }\n ],\n \"automation_timing\": {\n \"anchor\": \"<string>\",\n \"date\": \"<string>\",\n \"run_after_days\": 123,\n \"run_hour\": 123\n },\n \"billable\": true,\n \"billing_decision\": true,\n \"blocked_fields\": [\n \"<string>\"\n ],\n \"client_task_data\": {\n \"allow_skip_census_upload\": \"<string>\",\n \"census_upload_instructions\": \"<string>\",\n \"census_v2_export_field\": \"<string>\",\n \"census_v2_export_file_type\": \"<string>\",\n \"destination\": \"<string>\",\n \"download_file\": \"<string>\",\n \"form_file\": \"<string>\",\n \"form_template\": \"<string>\",\n \"notice_file\": \"<string>\",\n \"payroll_connect_instructions\": \"<string>\",\n \"payroll_enabled\": \"<string>\",\n \"payroll_upload_instructions\": \"<string>\",\n \"py\": \"<string>\",\n \"url\": \"<string>\",\n \"w2_upload_instructions\": \"<string>\"\n },\n \"client_task_type\": \"<string>\",\n \"description\": \"<string>\",\n \"due_after_days\": 123,\n \"due_static\": \"<string>\",\n \"fields_to_complete\": [\n \"<string>\"\n ],\n \"internal_task_data\": {\n \"form_id\": \"<string>\",\n \"py\": \"<string>\",\n \"task_type\": \"<string>\",\n \"url\": \"<string>\"\n },\n \"internal_task_type\": \"<string>\",\n \"log_completion_to\": \"<string>\",\n \"log_completion_type\": \"<string>\",\n \"notes\": \"<string>\",\n \"required\": true\n }\n ],\n \"team\": \"<string>\",\n \"title\": \"<string>\",\n \"triggers\": [\n {\n \"file_upload\": {\n \"directory\": \"<string>\",\n \"file_field_key\": \"<string>\",\n \"plan_type\": \"<string>\",\n \"relative_path\": \"<string>\"\n },\n \"form_email_field\": \"<string>\",\n \"form_file_field\": \"<string>\",\n \"form_name_field\": \"<string>\",\n \"form_template\": \"<string>\",\n \"lead\": \"<string>\",\n \"lead_group\": \"<string>\",\n \"payroll_trigger_clients\": 123,\n \"type\": \"<string>\"\n }\n ],\n \"view\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"activity": [
{
"_id": "<string>",
"action": "<string>",
"changes": [
{
"data": "<string>",
"field": "<string>",
"from": "<string>",
"to": "<string>"
}
],
"client": "<string>",
"on_id": "<string>",
"on_py": 123,
"on_type": "<string>",
"team": "<string>",
"timestamp": "<string>",
"user": "<string>"
}
],
"billing": {
"billable_field_key": "<string>",
"default_quantity": {},
"fee_item": "<string>",
"nonbillable_reason_field_key": "<string>",
"quantity_field_key": "<string>",
"require_billable_decision": true,
"revision": 123
},
"category": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"description": "<string>",
"estimated_time": 123,
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"lead": "<string>",
"lead_group": "<string>",
"n_active_projects": 123,
"n_active_tasks": 123,
"num_tasks": 123,
"projects": {
"complete": 123,
"in_progress": 123,
"on_hold": 123,
"overdue": 123,
"projects": [
"<string>"
],
"tasks": [
{
"assignee": "<string>",
"doing": 123,
"done": 123,
"overdue": 123,
"total": 123
}
],
"total": 123
},
"schedule": [
{
"client_request": "<string>",
"clients": [
"<string>"
],
"clients_filter": {
"assignee": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"status": [
"<string>"
],
"tags": [
"<string>"
]
},
"deals": [
"<string>"
],
"deals_filter": {
"funnel": [
"<string>"
],
"owner": [
"<string>"
],
"source": [
"<string>"
],
"stage": [
"<string>"
],
"status": [
"<string>"
],
"value": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
]
},
"due": "<string>",
"fields": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"file": "<string>",
"frequency": "<string>",
"ignore_active": true,
"lead": "<string>",
"lead_group": "<string>",
"plans": [
"<string>"
],
"plans_filter": {
"client": [
"<string>"
],
"data": [
{
"key": "<string>",
"op": "<string>",
"value": "<unknown>"
}
],
"provisions": {},
"pye": "<unknown>",
"status": [
"<string>"
],
"tags": [
"<string>"
],
"type": [
"<string>"
]
},
"timestamp": "<string>"
}
],
"tags": [
"<string>"
],
"tasks": [
{
"assignee": "<string>",
"assignee_group": "<string>",
"automation": "<string>",
"automation_config": [
{
"key": "<string>",
"value": "<unknown>"
}
],
"automation_timing": {
"anchor": "<string>",
"date": "<string>",
"run_after_days": 123,
"run_hour": 123
},
"billable": true,
"billing_decision": true,
"blocked_fields": [
"<string>"
],
"client_task_data": {
"allow_skip_census_upload": "<string>",
"census_upload_instructions": "<string>",
"census_v2_employee_data_policy": "any",
"census_v2_export_field": "<string>",
"census_v2_export_file_type": "<string>",
"census_v2_flow_preset": "company_contacts_ownership_payroll_census",
"destination": "<string>",
"download_file": "<string>",
"form_file": "<string>",
"form_template": "<string>",
"notice_file": "<string>",
"payroll_connect_instructions": "<string>",
"payroll_enabled": "<string>",
"payroll_upload_instructions": "<string>",
"py": "<string>",
"url": "<string>",
"w2_upload_instructions": "<string>"
},
"client_task_type": "<string>",
"description": "<string>",
"due_after_days": 123,
"due_static": "<string>",
"fields_to_complete": [
"<string>"
],
"internal_task_data": {
"form_id": "<string>",
"py": "<string>",
"task_type": "<string>",
"url": "<string>"
},
"internal_task_type": "<string>",
"log_completion_to": "<string>",
"log_completion_type": "<string>",
"notes": "<string>",
"required": true
}
],
"team": "<string>",
"title": "<string>",
"triggers": [
{
"file_upload": {
"directory": "<string>",
"file_field_key": "<string>",
"plan_type": "<string>",
"relative_path": "<string>"
},
"form_email_field": "<string>",
"form_file_field": "<string>",
"form_name_field": "<string>",
"form_template": "<string>",
"lead": "<string>",
"lead_group": "<string>",
"payroll_trigger_clients": 123,
"type": "<string>"
}
],
"view": "<string>"
}{}{}Authorizations
Body
application/json
Project template creation data
Response
Created project template