curl --request PUT \
--url https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"toAllPeople": false,
"businessUnitIds": [
"<string>"
],
"divisionIds": [
"<string>"
],
"countryIds": [
"<string>"
],
"businessRegionIds": [
"<string>"
],
"cityIds": [
"<string>"
],
"siteIds": [
"<string>"
],
"departmentIds": [
"<string>"
],
"teamIds": [
"<string>"
],
"shiftIds": [
"<string>"
],
"people": [
"<string>"
]
}
'import requests
url = "https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope"
payload = {
"toAllPeople": False,
"businessUnitIds": ["<string>"],
"divisionIds": ["<string>"],
"countryIds": ["<string>"],
"businessRegionIds": ["<string>"],
"cityIds": ["<string>"],
"siteIds": ["<string>"],
"departmentIds": ["<string>"],
"teamIds": ["<string>"],
"shiftIds": ["<string>"],
"people": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
toAllPeople: false,
businessUnitIds: ['<string>'],
divisionIds: ['<string>'],
countryIds: ['<string>'],
businessRegionIds: ['<string>'],
cityIds: ['<string>'],
siteIds: ['<string>'],
departmentIds: ['<string>'],
teamIds: ['<string>'],
shiftIds: ['<string>'],
people: ['<string>']
})
};
fetch('https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope', 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://prod.skillsdbnext.com/api/v1/surveys/{id}/scope",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'toAllPeople' => false,
'businessUnitIds' => [
'<string>'
],
'divisionIds' => [
'<string>'
],
'countryIds' => [
'<string>'
],
'businessRegionIds' => [
'<string>'
],
'cityIds' => [
'<string>'
],
'siteIds' => [
'<string>'
],
'departmentIds' => [
'<string>'
],
'teamIds' => [
'<string>'
],
'shiftIds' => [
'<string>'
],
'people' => [
'<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://prod.skillsdbnext.com/api/v1/surveys/{id}/scope"
payload := strings.NewReader("{\n \"toAllPeople\": false,\n \"businessUnitIds\": [\n \"<string>\"\n ],\n \"divisionIds\": [\n \"<string>\"\n ],\n \"countryIds\": [\n \"<string>\"\n ],\n \"businessRegionIds\": [\n \"<string>\"\n ],\n \"cityIds\": [\n \"<string>\"\n ],\n \"siteIds\": [\n \"<string>\"\n ],\n \"departmentIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"shiftIds\": [\n \"<string>\"\n ],\n \"people\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"toAllPeople\": false,\n \"businessUnitIds\": [\n \"<string>\"\n ],\n \"divisionIds\": [\n \"<string>\"\n ],\n \"countryIds\": [\n \"<string>\"\n ],\n \"businessRegionIds\": [\n \"<string>\"\n ],\n \"cityIds\": [\n \"<string>\"\n ],\n \"siteIds\": [\n \"<string>\"\n ],\n \"departmentIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"shiftIds\": [\n \"<string>\"\n ],\n \"people\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"toAllPeople\": false,\n \"businessUnitIds\": [\n \"<string>\"\n ],\n \"divisionIds\": [\n \"<string>\"\n ],\n \"countryIds\": [\n \"<string>\"\n ],\n \"businessRegionIds\": [\n \"<string>\"\n ],\n \"cityIds\": [\n \"<string>\"\n ],\n \"siteIds\": [\n \"<string>\"\n ],\n \"departmentIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"shiftIds\": [\n \"<string>\"\n ],\n \"people\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"toAllPeople": false,
"businessUnitIds": [
"3"
],
"divisionIds": [
"<string>"
],
"countryIds": [
"<string>"
],
"businessRegionIds": [
"<string>"
],
"cityIds": [
"<string>"
],
"siteIds": [
"<string>"
],
"departmentIds": [
"<string>"
],
"teamIds": [
"<string>"
],
"shiftIds": [
"<string>"
],
"stateIds": [
"<string>"
],
"personIds": [
"<string>"
],
"excludedPersonIds": [
"<string>"
]
}
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}Scope a survey to a population
Each list present replaces that dimension’s selection; a list that is absent is left alone. toAllPeople: true targets everyone. Allowed while the survey is a draft or scheduled.
Requires scope: surveys:write.
curl --request PUT \
--url https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"toAllPeople": false,
"businessUnitIds": [
"<string>"
],
"divisionIds": [
"<string>"
],
"countryIds": [
"<string>"
],
"businessRegionIds": [
"<string>"
],
"cityIds": [
"<string>"
],
"siteIds": [
"<string>"
],
"departmentIds": [
"<string>"
],
"teamIds": [
"<string>"
],
"shiftIds": [
"<string>"
],
"people": [
"<string>"
]
}
'import requests
url = "https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope"
payload = {
"toAllPeople": False,
"businessUnitIds": ["<string>"],
"divisionIds": ["<string>"],
"countryIds": ["<string>"],
"businessRegionIds": ["<string>"],
"cityIds": ["<string>"],
"siteIds": ["<string>"],
"departmentIds": ["<string>"],
"teamIds": ["<string>"],
"shiftIds": ["<string>"],
"people": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
toAllPeople: false,
businessUnitIds: ['<string>'],
divisionIds: ['<string>'],
countryIds: ['<string>'],
businessRegionIds: ['<string>'],
cityIds: ['<string>'],
siteIds: ['<string>'],
departmentIds: ['<string>'],
teamIds: ['<string>'],
shiftIds: ['<string>'],
people: ['<string>']
})
};
fetch('https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope', 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://prod.skillsdbnext.com/api/v1/surveys/{id}/scope",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'toAllPeople' => false,
'businessUnitIds' => [
'<string>'
],
'divisionIds' => [
'<string>'
],
'countryIds' => [
'<string>'
],
'businessRegionIds' => [
'<string>'
],
'cityIds' => [
'<string>'
],
'siteIds' => [
'<string>'
],
'departmentIds' => [
'<string>'
],
'teamIds' => [
'<string>'
],
'shiftIds' => [
'<string>'
],
'people' => [
'<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://prod.skillsdbnext.com/api/v1/surveys/{id}/scope"
payload := strings.NewReader("{\n \"toAllPeople\": false,\n \"businessUnitIds\": [\n \"<string>\"\n ],\n \"divisionIds\": [\n \"<string>\"\n ],\n \"countryIds\": [\n \"<string>\"\n ],\n \"businessRegionIds\": [\n \"<string>\"\n ],\n \"cityIds\": [\n \"<string>\"\n ],\n \"siteIds\": [\n \"<string>\"\n ],\n \"departmentIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"shiftIds\": [\n \"<string>\"\n ],\n \"people\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"toAllPeople\": false,\n \"businessUnitIds\": [\n \"<string>\"\n ],\n \"divisionIds\": [\n \"<string>\"\n ],\n \"countryIds\": [\n \"<string>\"\n ],\n \"businessRegionIds\": [\n \"<string>\"\n ],\n \"cityIds\": [\n \"<string>\"\n ],\n \"siteIds\": [\n \"<string>\"\n ],\n \"departmentIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"shiftIds\": [\n \"<string>\"\n ],\n \"people\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.skillsdbnext.com/api/v1/surveys/{id}/scope")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"toAllPeople\": false,\n \"businessUnitIds\": [\n \"<string>\"\n ],\n \"divisionIds\": [\n \"<string>\"\n ],\n \"countryIds\": [\n \"<string>\"\n ],\n \"businessRegionIds\": [\n \"<string>\"\n ],\n \"cityIds\": [\n \"<string>\"\n ],\n \"siteIds\": [\n \"<string>\"\n ],\n \"departmentIds\": [\n \"<string>\"\n ],\n \"teamIds\": [\n \"<string>\"\n ],\n \"shiftIds\": [\n \"<string>\"\n ],\n \"people\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"toAllPeople": false,
"businessUnitIds": [
"3"
],
"divisionIds": [
"<string>"
],
"countryIds": [
"<string>"
],
"businessRegionIds": [
"<string>"
],
"cityIds": [
"<string>"
],
"siteIds": [
"<string>"
],
"departmentIds": [
"<string>"
],
"teamIds": [
"<string>"
],
"shiftIds": [
"<string>"
],
"stateIds": [
"<string>"
],
"personIds": [
"<string>"
],
"excludedPersonIds": [
"<string>"
]
}
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}{
"type": "https://help.skillsdb.com/api-docs/errors/validation-error",
"title": "Validation failed",
"status": 400,
"detail": "limit must be between 1 and 200",
"instance": "/api/v1/people",
"requestId": "0192c2f1-6f4e-7ab3-b1c4-5f6a7b8c9d0e",
"errors": [
{
"field": "email",
"code": "max_length",
"message": "email must be shorter than or equal to 75 characters"
}
],
"error": "trial_expired",
"upgrade_url": "https://app.skillsdb.com/settings/billing"
}Authorizations
An API key issued by a company administrator — an environment prefix (production: sdb_live_) followed by 32 characters. The prefix identifies the environment and MUST NOT be hard-coded or validated by clients; treat the whole key as opaque. Shown exactly once at creation; only a one-way hash is stored.
Scopes (granted per key on the create screen; :write never implies :read):
skills:readskills:writepeople:readpeople:writecareers:readcareers:writetraining:readtraining:writeflags:readflags:writeorg:readorg:writeassessments:readlearning:readlearning:writecertifications:readcertifications:writeassessments:writeproficiency:readproficiency:writesurveys:readsurveys:writelabels:readlabels:write
Headers
Any unique string (at most 200 characters). Retrying with the same key and identical content replays the stored response for 24h instead of executing twice.
200Path Parameters
Opaque resource id.
Body
When true the selections below are ignored and everyone is targeted.
false
People to include by name — emails or ids.
Response
The resource, enveloped.
Show child attributes
Show child attributes