会社を部分更新
curl --request PATCH \
--url https://api.strixai.jp/v1/companies/{record_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"properties": {
"employees": 150,
"phone": "03-1234-5678"
}
}
'import requests
url = "https://api.strixai.jp/v1/companies/{record_id}/"
payload = { "properties": {
"employees": 150,
"phone": "03-1234-5678"
} }
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({properties: {employees: 150, phone: '03-1234-5678'}})
};
fetch('https://api.strixai.jp/v1/companies/{record_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.strixai.jp/v1/companies/{record_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([
'properties' => [
'employees' => 150,
'phone' => '03-1234-5678'
]
]),
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.strixai.jp/v1/companies/{record_id}/"
payload := strings.NewReader("{\n \"properties\": {\n \"employees\": 150,\n \"phone\": \"03-1234-5678\"\n }\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.strixai.jp/v1/companies/{record_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"properties\": {\n \"employees\": 150,\n \"phone\": \"03-1234-5678\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strixai.jp/v1/companies/{record_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 \"properties\": {\n \"employees\": 150,\n \"phone\": \"03-1234-5678\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "Ac7XkQpYz3Lh9vMs2N",
"properties": {
"name": "株式会社サンプル",
"industry": "IT",
"employees": 120,
"website": "https://example.co.jp"
},
"created_at": "2026-05-20T09:00:00Z",
"updated_at": "2026-06-10T03:00:00Z"
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}Companies
会社を部分更新
PATCH
/
v1
/
companies
/
{record_id}
/
会社を部分更新
curl --request PATCH \
--url https://api.strixai.jp/v1/companies/{record_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"properties": {
"employees": 150,
"phone": "03-1234-5678"
}
}
'import requests
url = "https://api.strixai.jp/v1/companies/{record_id}/"
payload = { "properties": {
"employees": 150,
"phone": "03-1234-5678"
} }
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({properties: {employees: 150, phone: '03-1234-5678'}})
};
fetch('https://api.strixai.jp/v1/companies/{record_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.strixai.jp/v1/companies/{record_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([
'properties' => [
'employees' => 150,
'phone' => '03-1234-5678'
]
]),
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.strixai.jp/v1/companies/{record_id}/"
payload := strings.NewReader("{\n \"properties\": {\n \"employees\": 150,\n \"phone\": \"03-1234-5678\"\n }\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.strixai.jp/v1/companies/{record_id}/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"properties\": {\n \"employees\": 150,\n \"phone\": \"03-1234-5678\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strixai.jp/v1/companies/{record_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 \"properties\": {\n \"employees\": 150,\n \"phone\": \"03-1234-5678\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "Ac7XkQpYz3Lh9vMs2N",
"properties": {
"name": "株式会社サンプル",
"industry": "IT",
"employees": 120,
"website": "https://example.co.jp"
},
"created_at": "2026-05-20T09:00:00Z",
"updated_at": "2026-06-10T03:00:00Z"
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}承認
Stockwork が発行する API キー(sk_ プレフィックス、base62 ランダム ≥ 40 文字)。
キーには 1 つの role(read / analyst / write / admin)が紐付き、
各エンドポイントの必要 role 以上であることが要求される(対応表は info.description 参照)。
パスパラメータ
Stockwork record_id(18 文字英数字)
Pattern:
^[A-Za-z0-9]{18}$ボディ
application/json
プロパティの集合。キーは api_name、値は PropertyValue。
コアフィールドと組織別カスタムプロパティが同じ namespace に並ぶ。
利用可能なキーと型は GET /v1/<resource>/properties/ で取得する。
Show child attributes
Show child attributes
レスポンス
更新成功
会社(Account)レコード
Stockwork record_id(18 文字)
例:
"Ac7XkQpYz3Lh9vMs2N"
会社のプロパティ集合。name は必須。
industry/employees/phone/website/billing_* 等のコアフィールドと
カスタムプロパティが同じ namespace。
Show child attributes
Show child attributes
レコードの値が最後に変わった日時。コアフィールド・カスタムプロパティ・アクティビティ件数などの集計値のいずれかが実際に変わったときに進む。商談ログやメールなどの活動を記録した場合も、それが集計値を動かすためこの日時が進む。同じ値での再保存や、他レコードとの紐付け変更では進まない。