Set the outcomes window
US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com
Sets how many days after someone's first webinar touch a deal or membership still counts (30 to 365). Changes how outcomes are counted for everyone in the organization and is logged to History; sends nothing. Requires write:marketing, a key without an event restriction, and a user who can update or manage Contacts. Also at PUT /v1/marketing/results/outcomes/settings.
Request example
curl --request PUT \ --url 'https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/results/outcomes/settings' \ --header 'x-access-token: <api-token>' \ --header 'Content-Type: application/json' \ --data '{ "windowDays": 30}'const response = await fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/results/outcomes/settings', { method: 'PUT', headers: { "x-access-token": "<api-token>", "Content-Type": "application/json" }, body: JSON.stringify({ "windowDays": 30 }),});
const data = await response.json();console.log(data);import requests
response = requests.request( "PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/results/outcomes/settings", headers={ "x-access-token": "<api-token>", "Content-Type": "application/json" }, json={ "windowDays": 30 },)
print(response.json())<?php
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/results/outcomes/settings", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => '{ "windowDays": 30}', CURLOPT_HTTPHEADER => [ "x-access-token: <api-token>", "Content-Type: application/json", ],]);
$response = curl_exec($curl);curl_close($curl);
echo $response;package main
import ( "fmt" "io" "net/http" "strings")
func main() { req, _ := http.NewRequest("PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/results/outcomes/settings", strings.NewReader(`{ "windowDays": 30}`)) req.Header.Add("x-access-token", "<api-token>") 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))}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/results/outcomes/settings")) .header("x-access-token", "<api-token>") .header("Content-Type", "application/json") .method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"windowDays\": 30\n}")) .build();
HttpResponse<String> response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Try it
Response headers
Authorizations
x-access-tokenstringheaderOrganization API token. Generate from Organization Settings → API Tokens.
AuthorizationBearer <token>headerorOAuth 2.1 access token. Obtained via the OAuth PKCE flow at
/oauth/token.
Send one of these. See Authentication.
Path parameters
orgIdstringpathrequiredYour organization ID. Any other organization returns
404.
Request body
windowDaysintegerrequiredDays after the first touch.
- Minimum
30- Maximum
365
{ "windowDays": 30}Responses
200application/json
OK
payloadWebinarOutcomesSettingsShow child attributes
window_daysintegerThe organization's window, in days.
- Minimum
30- Maximum
365- Example
180
default_window_daysintegerThe window when none is set.
- Example
180
min_window_daysinteger- Example
30
max_window_daysinteger- Example
365
400
windowDays is not a whole number from 30 to 365.
403
SCOPE_REQUIRED— the token lacksread:marketing(reads) orwrite:marketing(writes).ORG_WIDE_TOKEN_REQUIRED— the token is restricted to particular events; this operation reads the whole organization.FORBIDDEN— the organization's plan does not include Marketing, or the token's user cannot change goals (writes need an organization admin or the organization settings permission).
Response examples
{ "payload": { "window_days": 180, "default_window_days": 180, "min_window_days": 30, "max_window_days": 365 }}