curl --request POST \
--url https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"surveyName": "Device Ownership Survey",
"category": "device_ownership",
"targetType": "employees",
"questions": [
{
"id": "q1",
"sort": 0,
"name": "What type of device do you primarily use for work?",
"type": "checkbox",
"options": [
"Laptop",
"Desktop",
"Mobile",
"Tablet"
],
"required": true
}
],
"targets": [
{
"identityId": "identity_456",
"entityId": "device_123",
"entityName": "MacBook Pro 2023"
}
],
"scheduledLaunchAt": "2024-01-15T10:00:00Z",
"description": "Survey to collect device ownership information from employees",
"deliveryEnableEmail": true,
"publishImmediately": true,
"deliveryEnableSlack": false,
"deliverySlackNotificationCredentialId": 1,
"isScheduleLaunch": false,
"deadlineAt": "2024-01-30T23:59:59Z",
"destinationType": "resource_holder"
}
'import requests
url = "https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys"
payload = {
"surveyName": "Device Ownership Survey",
"category": "device_ownership",
"targetType": "employees",
"questions": [
{
"id": "q1",
"sort": 0,
"name": "What type of device do you primarily use for work?",
"type": "checkbox",
"options": ["Laptop", "Desktop", "Mobile", "Tablet"],
"required": True
}
],
"targets": [
{
"identityId": "identity_456",
"entityId": "device_123",
"entityName": "MacBook Pro 2023"
}
],
"scheduledLaunchAt": "2024-01-15T10:00:00Z",
"description": "Survey to collect device ownership information from employees",
"deliveryEnableEmail": True,
"publishImmediately": True,
"deliveryEnableSlack": False,
"deliverySlackNotificationCredentialId": 1,
"isScheduleLaunch": False,
"deadlineAt": "2024-01-30T23:59:59Z",
"destinationType": "resource_holder"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
surveyName: 'Device Ownership Survey',
category: 'device_ownership',
targetType: 'employees',
questions: [
{
id: 'q1',
sort: 0,
name: 'What type of device do you primarily use for work?',
type: 'checkbox',
options: ['Laptop', 'Desktop', 'Mobile', 'Tablet'],
required: true
}
],
targets: [
{
identityId: 'identity_456',
entityId: 'device_123',
entityName: 'MacBook Pro 2023'
}
],
scheduledLaunchAt: '2024-01-15T10:00:00Z',
description: 'Survey to collect device ownership information from employees',
deliveryEnableEmail: true,
publishImmediately: true,
deliveryEnableSlack: false,
deliverySlackNotificationCredentialId: 1,
isScheduleLaunch: false,
deadlineAt: '2024-01-30T23:59:59Z',
destinationType: 'resource_holder'
})
};
fetch('https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys', 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.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'surveyName' => 'Device Ownership Survey',
'category' => 'device_ownership',
'targetType' => 'employees',
'questions' => [
[
'id' => 'q1',
'sort' => 0,
'name' => 'What type of device do you primarily use for work?',
'type' => 'checkbox',
'options' => [
'Laptop',
'Desktop',
'Mobile',
'Tablet'
],
'required' => true
]
],
'targets' => [
[
'identityId' => 'identity_456',
'entityId' => 'device_123',
'entityName' => 'MacBook Pro 2023'
]
],
'scheduledLaunchAt' => '2024-01-15T10:00:00Z',
'description' => 'Survey to collect device ownership information from employees',
'deliveryEnableEmail' => true,
'publishImmediately' => true,
'deliveryEnableSlack' => false,
'deliverySlackNotificationCredentialId' => 1,
'isScheduleLaunch' => false,
'deadlineAt' => '2024-01-30T23:59:59Z',
'destinationType' => 'resource_holder'
]),
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.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys"
payload := strings.NewReader("{\n \"surveyName\": \"Device Ownership Survey\",\n \"category\": \"device_ownership\",\n \"targetType\": \"employees\",\n \"questions\": [\n {\n \"id\": \"q1\",\n \"sort\": 0,\n \"name\": \"What type of device do you primarily use for work?\",\n \"type\": \"checkbox\",\n \"options\": [\n \"Laptop\",\n \"Desktop\",\n \"Mobile\",\n \"Tablet\"\n ],\n \"required\": true\n }\n ],\n \"targets\": [\n {\n \"identityId\": \"identity_456\",\n \"entityId\": \"device_123\",\n \"entityName\": \"MacBook Pro 2023\"\n }\n ],\n \"scheduledLaunchAt\": \"2024-01-15T10:00:00Z\",\n \"description\": \"Survey to collect device ownership information from employees\",\n \"deliveryEnableEmail\": true,\n \"publishImmediately\": true,\n \"deliveryEnableSlack\": false,\n \"deliverySlackNotificationCredentialId\": 1,\n \"isScheduleLaunch\": false,\n \"deadlineAt\": \"2024-01-30T23:59:59Z\",\n \"destinationType\": \"resource_holder\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"surveyName\": \"Device Ownership Survey\",\n \"category\": \"device_ownership\",\n \"targetType\": \"employees\",\n \"questions\": [\n {\n \"id\": \"q1\",\n \"sort\": 0,\n \"name\": \"What type of device do you primarily use for work?\",\n \"type\": \"checkbox\",\n \"options\": [\n \"Laptop\",\n \"Desktop\",\n \"Mobile\",\n \"Tablet\"\n ],\n \"required\": true\n }\n ],\n \"targets\": [\n {\n \"identityId\": \"identity_456\",\n \"entityId\": \"device_123\",\n \"entityName\": \"MacBook Pro 2023\"\n }\n ],\n \"scheduledLaunchAt\": \"2024-01-15T10:00:00Z\",\n \"description\": \"Survey to collect device ownership information from employees\",\n \"deliveryEnableEmail\": true,\n \"publishImmediately\": true,\n \"deliveryEnableSlack\": false,\n \"deliverySlackNotificationCredentialId\": 1,\n \"isScheduleLaunch\": false,\n \"deadlineAt\": \"2024-01-30T23:59:59Z\",\n \"destinationType\": \"resource_holder\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"surveyName\": \"Device Ownership Survey\",\n \"category\": \"device_ownership\",\n \"targetType\": \"employees\",\n \"questions\": [\n {\n \"id\": \"q1\",\n \"sort\": 0,\n \"name\": \"What type of device do you primarily use for work?\",\n \"type\": \"checkbox\",\n \"options\": [\n \"Laptop\",\n \"Desktop\",\n \"Mobile\",\n \"Tablet\"\n ],\n \"required\": true\n }\n ],\n \"targets\": [\n {\n \"identityId\": \"identity_456\",\n \"entityId\": \"device_123\",\n \"entityName\": \"MacBook Pro 2023\"\n }\n ],\n \"scheduledLaunchAt\": \"2024-01-15T10:00:00Z\",\n \"description\": \"Survey to collect device ownership information from employees\",\n \"deliveryEnableEmail\": true,\n \"publishImmediately\": true,\n \"deliveryEnableSlack\": false,\n \"deliverySlackNotificationCredentialId\": 1,\n \"isScheduleLaunch\": false,\n \"deadlineAt\": \"2024-01-30T23:59:59Z\",\n \"destinationType\": \"resource_holder\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"surveyName": "Employee Device Survey",
"description": "Survey to understand device usage",
"status": "draft",
"category": "device_ownership",
"targetType": "employees",
"questions": [],
"deliveryEnableEmail": true,
"deliveryEnableSlack": false,
"isScheduleLaunch": false,
"scheduledLaunchAt": null,
"deadlineAt": null,
"destinationType": "resource_holder",
"createdAt": "2026-09-15T10:06:24.085Z",
"updatedAt": "2026-09-15T10:06:24.085Z",
"totalTargets": 5,
"totalResponses": 3
}Create a new survey
Create a new survey in the organization. The survey is created in draft status unless publishImmediately is set. scheduledLaunchAt only takes effect when isScheduleLaunch is true (a published survey is then launched automatically at that time); otherwise the survey must be launched manually via POST /surveys/:surveyId/launch. deadlineAt is required when reminderConfig is enabled.
curl --request POST \
--url https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"surveyName": "Device Ownership Survey",
"category": "device_ownership",
"targetType": "employees",
"questions": [
{
"id": "q1",
"sort": 0,
"name": "What type of device do you primarily use for work?",
"type": "checkbox",
"options": [
"Laptop",
"Desktop",
"Mobile",
"Tablet"
],
"required": true
}
],
"targets": [
{
"identityId": "identity_456",
"entityId": "device_123",
"entityName": "MacBook Pro 2023"
}
],
"scheduledLaunchAt": "2024-01-15T10:00:00Z",
"description": "Survey to collect device ownership information from employees",
"deliveryEnableEmail": true,
"publishImmediately": true,
"deliveryEnableSlack": false,
"deliverySlackNotificationCredentialId": 1,
"isScheduleLaunch": false,
"deadlineAt": "2024-01-30T23:59:59Z",
"destinationType": "resource_holder"
}
'import requests
url = "https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys"
payload = {
"surveyName": "Device Ownership Survey",
"category": "device_ownership",
"targetType": "employees",
"questions": [
{
"id": "q1",
"sort": 0,
"name": "What type of device do you primarily use for work?",
"type": "checkbox",
"options": ["Laptop", "Desktop", "Mobile", "Tablet"],
"required": True
}
],
"targets": [
{
"identityId": "identity_456",
"entityId": "device_123",
"entityName": "MacBook Pro 2023"
}
],
"scheduledLaunchAt": "2024-01-15T10:00:00Z",
"description": "Survey to collect device ownership information from employees",
"deliveryEnableEmail": True,
"publishImmediately": True,
"deliveryEnableSlack": False,
"deliverySlackNotificationCredentialId": 1,
"isScheduleLaunch": False,
"deadlineAt": "2024-01-30T23:59:59Z",
"destinationType": "resource_holder"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
surveyName: 'Device Ownership Survey',
category: 'device_ownership',
targetType: 'employees',
questions: [
{
id: 'q1',
sort: 0,
name: 'What type of device do you primarily use for work?',
type: 'checkbox',
options: ['Laptop', 'Desktop', 'Mobile', 'Tablet'],
required: true
}
],
targets: [
{
identityId: 'identity_456',
entityId: 'device_123',
entityName: 'MacBook Pro 2023'
}
],
scheduledLaunchAt: '2024-01-15T10:00:00Z',
description: 'Survey to collect device ownership information from employees',
deliveryEnableEmail: true,
publishImmediately: true,
deliveryEnableSlack: false,
deliverySlackNotificationCredentialId: 1,
isScheduleLaunch: false,
deadlineAt: '2024-01-30T23:59:59Z',
destinationType: 'resource_holder'
})
};
fetch('https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys', 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.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'surveyName' => 'Device Ownership Survey',
'category' => 'device_ownership',
'targetType' => 'employees',
'questions' => [
[
'id' => 'q1',
'sort' => 0,
'name' => 'What type of device do you primarily use for work?',
'type' => 'checkbox',
'options' => [
'Laptop',
'Desktop',
'Mobile',
'Tablet'
],
'required' => true
]
],
'targets' => [
[
'identityId' => 'identity_456',
'entityId' => 'device_123',
'entityName' => 'MacBook Pro 2023'
]
],
'scheduledLaunchAt' => '2024-01-15T10:00:00Z',
'description' => 'Survey to collect device ownership information from employees',
'deliveryEnableEmail' => true,
'publishImmediately' => true,
'deliveryEnableSlack' => false,
'deliverySlackNotificationCredentialId' => 1,
'isScheduleLaunch' => false,
'deadlineAt' => '2024-01-30T23:59:59Z',
'destinationType' => 'resource_holder'
]),
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.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys"
payload := strings.NewReader("{\n \"surveyName\": \"Device Ownership Survey\",\n \"category\": \"device_ownership\",\n \"targetType\": \"employees\",\n \"questions\": [\n {\n \"id\": \"q1\",\n \"sort\": 0,\n \"name\": \"What type of device do you primarily use for work?\",\n \"type\": \"checkbox\",\n \"options\": [\n \"Laptop\",\n \"Desktop\",\n \"Mobile\",\n \"Tablet\"\n ],\n \"required\": true\n }\n ],\n \"targets\": [\n {\n \"identityId\": \"identity_456\",\n \"entityId\": \"device_123\",\n \"entityName\": \"MacBook Pro 2023\"\n }\n ],\n \"scheduledLaunchAt\": \"2024-01-15T10:00:00Z\",\n \"description\": \"Survey to collect device ownership information from employees\",\n \"deliveryEnableEmail\": true,\n \"publishImmediately\": true,\n \"deliveryEnableSlack\": false,\n \"deliverySlackNotificationCredentialId\": 1,\n \"isScheduleLaunch\": false,\n \"deadlineAt\": \"2024-01-30T23:59:59Z\",\n \"destinationType\": \"resource_holder\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"surveyName\": \"Device Ownership Survey\",\n \"category\": \"device_ownership\",\n \"targetType\": \"employees\",\n \"questions\": [\n {\n \"id\": \"q1\",\n \"sort\": 0,\n \"name\": \"What type of device do you primarily use for work?\",\n \"type\": \"checkbox\",\n \"options\": [\n \"Laptop\",\n \"Desktop\",\n \"Mobile\",\n \"Tablet\"\n ],\n \"required\": true\n }\n ],\n \"targets\": [\n {\n \"identityId\": \"identity_456\",\n \"entityId\": \"device_123\",\n \"entityName\": \"MacBook Pro 2023\"\n }\n ],\n \"scheduledLaunchAt\": \"2024-01-15T10:00:00Z\",\n \"description\": \"Survey to collect device ownership information from employees\",\n \"deliveryEnableEmail\": true,\n \"publishImmediately\": true,\n \"deliveryEnableSlack\": false,\n \"deliverySlackNotificationCredentialId\": 1,\n \"isScheduleLaunch\": false,\n \"deadlineAt\": \"2024-01-30T23:59:59Z\",\n \"destinationType\": \"resource_holder\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.itmc.i.moneyforward.com/api/v1/organizations/{organizationId}/surveys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"surveyName\": \"Device Ownership Survey\",\n \"category\": \"device_ownership\",\n \"targetType\": \"employees\",\n \"questions\": [\n {\n \"id\": \"q1\",\n \"sort\": 0,\n \"name\": \"What type of device do you primarily use for work?\",\n \"type\": \"checkbox\",\n \"options\": [\n \"Laptop\",\n \"Desktop\",\n \"Mobile\",\n \"Tablet\"\n ],\n \"required\": true\n }\n ],\n \"targets\": [\n {\n \"identityId\": \"identity_456\",\n \"entityId\": \"device_123\",\n \"entityName\": \"MacBook Pro 2023\"\n }\n ],\n \"scheduledLaunchAt\": \"2024-01-15T10:00:00Z\",\n \"description\": \"Survey to collect device ownership information from employees\",\n \"deliveryEnableEmail\": true,\n \"publishImmediately\": true,\n \"deliveryEnableSlack\": false,\n \"deliverySlackNotificationCredentialId\": 1,\n \"isScheduleLaunch\": false,\n \"deadlineAt\": \"2024-01-30T23:59:59Z\",\n \"destinationType\": \"resource_holder\"\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"surveyName": "Employee Device Survey",
"description": "Survey to understand device usage",
"status": "draft",
"category": "device_ownership",
"targetType": "employees",
"questions": [],
"deliveryEnableEmail": true,
"deliveryEnableSlack": false,
"isScheduleLaunch": false,
"scheduledLaunchAt": null,
"deadlineAt": null,
"destinationType": "resource_holder",
"createdAt": "2026-09-15T10:06:24.085Z",
"updatedAt": "2026-09-15T10:06:24.085Z",
"totalTargets": 5,
"totalResponses": 3
}承認
パスパラメータ
ボディ
Name of the survey
"Device Ownership Survey"
Category of the survey
"device_ownership"
Type of targets for the survey
employees, devices, services, services_by_identities, devices_by_identities "employees"
Array of survey questions
Show child attributes
Show child attributes
Array of survey targets
Show child attributes
Show child attributes
Scheduled launch date and time for the survey
"2024-01-15T10:00:00Z"
Optional description of the survey
"Survey to collect device ownership information from employees"
Enable email delivery for the survey
true
Set the status to Published immediately
true
Enable Slack delivery for the survey
false
Notification credential ID for Slack delivery. Required when deliveryEnableSlack is true.
1
Whether the survey should be scheduled for launch
false
Deadline date and time for the survey responses
"2024-01-30T23:59:59Z"
Reminder configuration for the survey
Show child attributes
Show child attributes
Destination type for the survey
resource_holder, holder_manager "resource_holder"
レスポンス
Successfully created survey
1
"Employee Device Survey"
"Survey to understand device usage"
draft, published, launched, completed, revoked "draft"
"device_ownership"
employees, devices, services, services_by_identities, devices_by_identities "employees"
Show child attributes
Show child attributes
[]
true
false
false
null
null
resource_holder, holder_manager "resource_holder"
"2026-09-15T10:06:24.085Z"
"2026-09-15T10:06:24.085Z"
5
3
このページは役に立ちましたか?

