Update content
curl --request PATCH \
--url https://api.usertour.io/v2/projects/{projectId}/content/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"buildUrl": "<string>"
}
'import requests
url = "https://api.usertour.io/v2/projects/{projectId}/content/{id}"
payload = {
"name": "<string>",
"buildUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', buildUrl: '<string>'})
};
fetch('https://api.usertour.io/v2/projects/{projectId}/content/{id}', 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.usertour.io/v2/projects/{projectId}/content/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'buildUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.usertour.io/v2/projects/{projectId}/content/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"buildUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <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))
}HttpResponse<String> response = Unirest.patch("https://api.usertour.io/v2/projects/{projectId}/content/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"buildUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usertour.io/v2/projects/{projectId}/content/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"buildUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "content",
"name": "<string>",
"buildUrl": "<string>",
"editedVersionId": "<string>",
"environments": [
{
"environmentId": "<string>",
"published": true,
"publishedVersionId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"publishedVersion": {
"id": "<string>",
"object": "contentVersion",
"number": 123,
"firstPublishedAt": "<string>",
"themeId": "<string>",
"questions": [
{
"object": "question",
"cvid": "<string>",
"name": "<string>"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"steps": [
{
"object": "step",
"id": "<string>",
"cvid": "<string>",
"name": "<string>",
"sequence": 123,
"themeId": "<string>",
"content": [
{
"type": "text",
"markdown": "<string>",
"object": "block",
"id": "<string>"
}
],
"target": {
"selector": "<string>",
"text": "<string>",
"nth": 2
},
"placement": {
"sideOffset": 123,
"alignOffset": 123,
"backdrop": true,
"blockTarget": true
},
"width": 123,
"skippable": true,
"explicitCompletionStep": true,
"triggers": [
{
"do": [
{
"type": "goto_step",
"step": "<string>"
}
],
"when": [
{
"type": "group",
"conditions": "<array>"
}
],
"waitSeconds": 123
}
],
"onClick": [
{
"type": "goto_step",
"step": "<string>"
}
],
"advanced": {
"hasUnsupported": true
}
}
],
"startRules": {
"when": [
{
"type": "group",
"conditions": "<array>"
}
],
"frequency": {
"every": {
"duration": 123,
"times": 123
},
"atLeast": {
"duration": 123
}
},
"waitSeconds": 123,
"startIfNotComplete": true
},
"hideRules": {
"when": [
{
"type": "group",
"conditions": "<array>"
}
]
},
"data": "<unknown>",
"scheduledAt": "<string>"
}
}
],
"deleted": true,
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"editedVersion": {
"id": "<string>",
"object": "contentVersion",
"number": 123,
"firstPublishedAt": "<string>",
"themeId": "<string>",
"questions": [
{
"object": "question",
"cvid": "<string>",
"name": "<string>"
}
],
"steps": [
{
"object": "step",
"id": "<string>",
"cvid": "<string>",
"name": "<string>",
"sequence": 123,
"themeId": "<string>",
"content": [
{
"type": "text",
"markdown": "<string>",
"object": "block",
"id": "<string>"
}
],
"target": {
"selector": "<string>",
"text": "<string>",
"nth": 2
},
"placement": {
"sideOffset": 123,
"alignOffset": 123,
"backdrop": true,
"blockTarget": true
},
"width": 123,
"skippable": true,
"explicitCompletionStep": true,
"triggers": [
{
"do": [
{
"type": "goto_step",
"step": "<string>"
}
],
"when": [
{
"type": "group",
"conditions": "<array>"
}
],
"waitSeconds": 123
}
],
"onClick": [
{
"type": "goto_step",
"step": "<string>"
}
],
"advanced": {
"hasUnsupported": true
}
}
],
"startRules": {
"when": [
{
"type": "group",
"conditions": "<array>"
}
],
"frequency": {
"every": {
"duration": 123,
"times": 123
},
"atLeast": {
"duration": 123
}
},
"waitSeconds": 123,
"startIfNotComplete": true
},
"hideRules": {
"when": [
{
"type": "group",
"conditions": "<array>"
}
]
},
"data": "<unknown>",
"scheduledAt": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}Content
Update content
Update content metadata (name, buildUrl).
PATCH
/
v2
/
projects
/
{projectId}
/
content
/
{id}
Update content
curl --request PATCH \
--url https://api.usertour.io/v2/projects/{projectId}/content/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"buildUrl": "<string>"
}
'import requests
url = "https://api.usertour.io/v2/projects/{projectId}/content/{id}"
payload = {
"name": "<string>",
"buildUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', buildUrl: '<string>'})
};
fetch('https://api.usertour.io/v2/projects/{projectId}/content/{id}', 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.usertour.io/v2/projects/{projectId}/content/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'buildUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.usertour.io/v2/projects/{projectId}/content/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"buildUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <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))
}HttpResponse<String> response = Unirest.patch("https://api.usertour.io/v2/projects/{projectId}/content/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"buildUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usertour.io/v2/projects/{projectId}/content/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"buildUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "content",
"name": "<string>",
"buildUrl": "<string>",
"editedVersionId": "<string>",
"environments": [
{
"environmentId": "<string>",
"published": true,
"publishedVersionId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"publishedVersion": {
"id": "<string>",
"object": "contentVersion",
"number": 123,
"firstPublishedAt": "<string>",
"themeId": "<string>",
"questions": [
{
"object": "question",
"cvid": "<string>",
"name": "<string>"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"steps": [
{
"object": "step",
"id": "<string>",
"cvid": "<string>",
"name": "<string>",
"sequence": 123,
"themeId": "<string>",
"content": [
{
"type": "text",
"markdown": "<string>",
"object": "block",
"id": "<string>"
}
],
"target": {
"selector": "<string>",
"text": "<string>",
"nth": 2
},
"placement": {
"sideOffset": 123,
"alignOffset": 123,
"backdrop": true,
"blockTarget": true
},
"width": 123,
"skippable": true,
"explicitCompletionStep": true,
"triggers": [
{
"do": [
{
"type": "goto_step",
"step": "<string>"
}
],
"when": [
{
"type": "group",
"conditions": "<array>"
}
],
"waitSeconds": 123
}
],
"onClick": [
{
"type": "goto_step",
"step": "<string>"
}
],
"advanced": {
"hasUnsupported": true
}
}
],
"startRules": {
"when": [
{
"type": "group",
"conditions": "<array>"
}
],
"frequency": {
"every": {
"duration": 123,
"times": 123
},
"atLeast": {
"duration": 123
}
},
"waitSeconds": 123,
"startIfNotComplete": true
},
"hideRules": {
"when": [
{
"type": "group",
"conditions": "<array>"
}
]
},
"data": "<unknown>",
"scheduledAt": "<string>"
}
}
],
"deleted": true,
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"editedVersion": {
"id": "<string>",
"object": "contentVersion",
"number": 123,
"firstPublishedAt": "<string>",
"themeId": "<string>",
"questions": [
{
"object": "question",
"cvid": "<string>",
"name": "<string>"
}
],
"steps": [
{
"object": "step",
"id": "<string>",
"cvid": "<string>",
"name": "<string>",
"sequence": 123,
"themeId": "<string>",
"content": [
{
"type": "text",
"markdown": "<string>",
"object": "block",
"id": "<string>"
}
],
"target": {
"selector": "<string>",
"text": "<string>",
"nth": 2
},
"placement": {
"sideOffset": 123,
"alignOffset": 123,
"backdrop": true,
"blockTarget": true
},
"width": 123,
"skippable": true,
"explicitCompletionStep": true,
"triggers": [
{
"do": [
{
"type": "goto_step",
"step": "<string>"
}
],
"when": [
{
"type": "group",
"conditions": "<array>"
}
],
"waitSeconds": 123
}
],
"onClick": [
{
"type": "goto_step",
"step": "<string>"
}
],
"advanced": {
"hasUnsupported": true
}
}
],
"startRules": {
"when": [
{
"type": "group",
"conditions": "<array>"
}
],
"frequency": {
"every": {
"duration": 123,
"times": 123
},
"atLeast": {
"duration": 123
}
},
"waitSeconds": 123,
"startIfNotComplete": true
},
"hideRules": {
"when": [
{
"type": "group",
"conditions": "<array>"
}
]
},
"data": "<unknown>",
"scheduledAt": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"issues": [
{
"rule": "<string>",
"message": "<string>",
"path": "<string>"
}
],
"doc_url": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Content updated
Available options:
content Available options:
checklist, flow, launcher, banner, tracker, resource-center, announcement URL of the app page where this content is authored and previewed (the visual editor opens it there). Metadata only — it plays NO part in runtime targeting; where content shows is controlled by its start rules.
Where this content is live RIGHT NOW: one row per environment it is currently published to (empty = published nowhere). Rows disappear on unpublish.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I