Skip to content
FacebookYouTubeX (Twitter)

Projects

FieldTypeDescription
idStringThe unique identifier for the project which is given by Pingstreams.
nameStringThe project name.
activeOperatingHoursBooleanDetermine if the operating hours option is enabled
operatingHoursObjectThe operating hours settings.
settingsObjectThe project settings
widgetObjectThe widget settings.
profileObjectThe project profile object
statusNumberThe project status. Permitted values: 100 active, 0 disabled
createdAtStringThe time (ISO-8601 date string) when the project was created.
updatedAtStringThe time (ISO-8601 date string) when the project was updated.
createdByStringThe unique identifier of the row creator

GET https://api.pingstreams.com/v3/projects/

HeaderTypeDescription
AuthorizationstringAuthorization token. Basic Auth or JWT. Minumun role: user
[
{
"_id":"5acdc6d86fb82500141d56c9",
"updatedAt":"2019-01-31T18:09:53.417Z",
"createdAt":"2018-04-11T08:27:04.509Z",
"id_project":{
"versions":30,
"_id":"5acba41a213ae3001451b723",
"updatedAt":"2019-01-29T12:01:06.793Z",
"createdAt":"2018-04-09T17:34:18.064Z",
"name":"conversational landing page",
"createdBy":"5aabade839db7d001477d3d5",
"__v":0,
"profile":{
"name":"free",
"trialDays":30,
"agents":0,
"type":"free"
},
"channels":[
{
"name":"chat21"
}
],
"trialExpired":true,
"trialDaysLeft":680,
"isActiveSubscription":false,
"id":"5acba41a213ae3001451b723"
},
"id_user":"5aaa99024c3b110014b478f0",
"role":"admin",
"createdBy":"5aabade839db7d001477d3d5",
"__v":0,
"user_available":true,
"id":"5acdc6d86fb82500141d56c9"
}
]

GET https://api.pingstreams.com/v3/projects/:project_id

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
HeaderTypeDescription
AuthorizationstringAuthorization token. Basic Auth or JWT. Minumun role: agent
{
"versions":30,
"_id":"5df2240cecd41b00173a06bb",
"name":"000000",
"activeOperatingHours":true,
"createdBy":"5aaa99024c3b110014b478f0",
"profile":{
"name":"free",
"trialDays":30,
"agents":0,
"type":"free"
},
"channels":[
{
"name":"chat21"
}
],
"createdAt":"2019-12-12T11:27:08.548Z",
"updatedAt":"2020-01-08T10:53:12.844Z",
"__v":0,
"operatingHours":"{\"0\":[{\"start\":\"09:00\",\"end\":\"13:00\"},{\"start\":\"14:00\",\"end\":\"18:00\"}],\"1\":[{\"start\":\"09:00\",\"end\":\"13:00\"},{\"start\":\"14:00\",\"end\":\"18:00\"}],\"tzname\":\"Europe/Rome\"}",
"trialExpired":false,
"trialDaysLeft":-4,
"isActiveSubscription":false,
"id":"5df2240cecd41b00173a06bb"
}

GET https://api.pingstreams.com/v3/projects/:project_id/users/availables

Return the available agents evaluating the general operating hours of the project and agents chat load (with Smart Assignment enabled)

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
ParameterTypeDescription
rawBooleanIf true only agents status is considered (the general operating hours of the project are not considered)
HeaderTypeDescription
AuthorizationstringAuthorization token. Basic Auth or JWT. Minumun role: user
[
{
"id":"5aaa99024c3b110014b478f0",
"firstname":"Andrea"
},
{
"id":"5de9200d6722370017731969",
"firstname":"Nuovopre"
}
]

Return if the project is open regarding operating hours

Section titled “Return if the project is open regarding operating hours”

GET https://api.pingstreams.com/v3/projects/:project_id/isopen

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
HeaderTypeDescription
AuthorizationstringAuthorization token. Basic Auth or JWT. Minumun role: guest
{"isopen":false}

PUT https://api.pingstreams.com/v3/projects/:project_id/availables

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
HeaderTypeDescription
AuthorizationstringAuthorization token. Basic Auth or JWT. Minumun role: user
FieldTypeDescription
widgetObjectThe object containing the widget configuration parameters (See curl example)
{
"widget": {
"logoChat": "https://your_site_url.com/your-logo.png",
"themeColor": "#76528B",
"themeForegroundColor": "#CBCE91",
"themeColorOpacity": 0,
"align": "right",
"displayOnDesktop": true,
"displayOnMobile": true,
"onPageChangeVisibilityDesktop": "open",
"onPageChangeVisibilityMobile": "last",
"singleConversation": false,
"baloonImage": "https://your_site_url.com/your-baloon-logo.png",
"poweredBy": "<a tabindex=\"-1\" target=\"_blank\" href=\"https://your_site_url.com\"><img src=\"https://your_site_url.com/your-logo.png\"/><span>Powered by YourCompany</span></a>"
}
}
curl -v -X PUT -H 'Content-Type: application/json' -u user@example.com:123456 -d '{"widget": {"logoChat": "https://your_site_url.com/your-logo.png","themeColor": "#76528B","themeForegroundColor": "#CBCE91","themeColorOpacity": 0,"align": "right","displayOnDesktop": true,"displayOnMobile": true,"onPageChangeVisibilityDesktop": "open","onPageChangeVisibilityMobile": "last","singleConversation": false,"baloonImage": "https://your_site_url.com/your-baloon-logo.png","poweredBy": "<a tabindex=\"-1\" target=\"_blank\" href=\"https://your_site_url.com\"><img src=\"https://your_site_url.com/your-logo.png\"/><span>Powered by YourCompany</span></a>"}}' https://api.pingstreams.com/v3/projects/62c3f10152dc7400352bab0d