Update a journey
US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com
Switch a journey on or off, or change its delay or email. Each person gets a journey's email once. When an assistant (an MCP connection) calls this, it answers 202 with status: needs_approval and a link; a person approves it in Sessionboard. Requires write:marketing; refused for a key restricted to particular events. Also at PUT /v1/marketing/journeys/{journeyId}.
Request example
curl --request PUT \ --url 'https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/journeys/{journeyId}' \ --header 'x-access-token: <api-token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": true, "delayHours": 123, "subject": "<string>", "body": "<string>", "ctaLabel": "<string>"}'const response = await fetch('https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/journeys/{journeyId}', { method: 'PUT', headers: { "x-access-token": "<api-token>", "Content-Type": "application/json" }, body: JSON.stringify({ "enabled": true, "delayHours": 123, "subject": "<string>", "body": "<string>", "ctaLabel": "<string>" }),});
const data = await response.json();console.log(data);import requests
response = requests.request( "PUT", "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/journeys/{journeyId}", headers={ "x-access-token": "<api-token>", "Content-Type": "application/json" }, json={ "enabled": True, "delayHours": 123, "subject": "<string>", "body": "<string>", "ctaLabel": "<string>" },)
print(response.json())<?php
$curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://public-api.sessionboard.com/v1/organization/{orgId}/marketing/journeys/{journeyId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => '{ "enabled": true, "delayHours": 123, "subject": "<string>", "body": "<string>", "ctaLabel": "<string>"}', 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/journeys/{journeyId}", strings.NewReader(`{ "enabled": true, "delayHours": 123, "subject": "<string>", "body": "<string>", "ctaLabel": "<string>"}`)) 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/journeys/{journeyId}")) .header("x-access-token", "<api-token>") .header("Content-Type", "application/json") .method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"enabled\": true,\n \"delayHours\": 123,\n \"subject\": \"<string>\",\n \"body\": \"<string>\",\n \"ctaLabel\": \"<string>\"\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.journeyIdstringpathrequiredThe journey
Request body
enabledbooleandelayHoursinteger0 to 2160
subjectstringbodystringctaLabelstring
{ "enabled": true, "delayHours": 123, "subject": "<string>", "body": "<string>", "ctaLabel": "<string>"}Responses
200
payload with the result
202
An assistant's call waits for a person: payload.status: needs_approval, payload.url.
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).
404
Not found in your organization.
