Agent: Org Settings¶
Read the audit log¶
GET /api/v1/agent/audit-log/
Requires org_settings: view. Same body, rules and refusals as the creator-studio endpoint /api/v1/audit-log/.
Authentication: API key — Authorization: Bearer <key>
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/audit-log/`, {
method: "GET",
headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
| Status | Meaning |
|---|---|
200 |
No response body |
201 |
No response body |
204 |
No response body |
400 |
No response body |
401 |
Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified). |
403 |
The key's scope for this resource does not allow the action. |
404 |
No such object in this key's organisation. |
429 |
Rate limited (300 requests/hour per key). Retry after the Retry-After header. |
Read notification settings¶
GET /api/v1/agent/notifications/org-settings/
Requires org_settings: view. Same body, rules and refusals as the creator-studio endpoint /api/v1/notifications/org-settings/.
Authentication: API key — Authorization: Bearer <key>
import os
import requests
url = f"https://www-dev.yoshuko.com/api/v1/agent/notifications/org-settings/"
response = requests.get(url, headers={"Authorization": f"Bearer {os.environ['YOSHUKO_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json() if response.content else response.status_code)
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/notifications/org-settings/`, {
method: "GET",
headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
| Status | Meaning |
|---|---|
200 |
No response body |
201 |
No response body |
204 |
No response body |
400 |
No response body |
401 |
Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified). |
403 |
The key's scope for this resource does not allow the action. |
404 |
No such object in this key's organisation. |
429 |
Rate limited (300 requests/hour per key). Retry after the Retry-After header. |
Replace notification settings¶
PUT /api/v1/agent/notifications/org-settings/
Requires org_settings: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/notifications/org-settings/.
Authentication: API key — Authorization: Bearer <key>
import os
import requests
url = f"https://www-dev.yoshuko.com/api/v1/agent/notifications/org-settings/"
response = requests.put(url, headers={"Authorization": f"Bearer {os.environ['YOSHUKO_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json() if response.content else response.status_code)
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/notifications/org-settings/`, {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
| Status | Meaning |
|---|---|
200 |
No response body |
201 |
No response body |
204 |
No response body |
400 |
No response body |
401 |
Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified). |
403 |
The key's scope for this resource does not allow the action. |
404 |
No such object in this key's organisation. |
429 |
Rate limited (300 requests/hour per key). Retry after the Retry-After header. |
Read the organization join code¶
GET /api/v1/agent/tenants/join-code/
Requires org_settings: view. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/join-code/.
Authentication: API key — Authorization: Bearer <key>
import os
import requests
url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/join-code/"
response = requests.get(url, headers={"Authorization": f"Bearer {os.environ['YOSHUKO_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json() if response.content else response.status_code)
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/tenants/join-code/`, {
method: "GET",
headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
| Status | Meaning |
|---|---|
200 |
No response body |
201 |
No response body |
204 |
No response body |
400 |
No response body |
401 |
Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified). |
403 |
The key's scope for this resource does not allow the action. |
404 |
No such object in this key's organisation. |
429 |
Rate limited (300 requests/hour per key). Retry after the Retry-After header. |
Create or run the organization join code¶
POST /api/v1/agent/tenants/join-code/
Requires org_settings: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/join-code/.
Authentication: API key — Authorization: Bearer <key>
import os
import requests
url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/join-code/"
response = requests.post(url, headers={"Authorization": f"Bearer {os.environ['YOSHUKO_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json() if response.content else response.status_code)
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/tenants/join-code/`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
| Status | Meaning |
|---|---|
200 |
No response body |
201 |
No response body |
204 |
No response body |
400 |
No response body |
401 |
Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified). |
403 |
The key's scope for this resource does not allow the action. |
404 |
No such object in this key's organisation. |
429 |
Rate limited (300 requests/hour per key). Retry after the Retry-After header. |
Read onboarding progress¶
GET /api/v1/agent/tenants/onboarding/
Requires org_settings: view. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/onboarding/.
Authentication: API key — Authorization: Bearer <key>
import os
import requests
url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/onboarding/"
response = requests.get(url, headers={"Authorization": f"Bearer {os.environ['YOSHUKO_API_KEY']}"}, timeout=30)
response.raise_for_status()
print(response.json() if response.content else response.status_code)
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/tenants/onboarding/`, {
method: "GET",
headers: { Authorization: `Bearer ${process.env.YOSHUKO_API_KEY}` }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(response.status === 204 ? response.status : await response.json());
| Status | Meaning |
|---|---|
200 |
No response body |
201 |
No response body |
204 |
No response body |
400 |
No response body |
401 |
Missing, unknown, revoked or expired key; or the organisation's plan is inactive (subscription_inactive) or unverified (org_unverified). |
403 |
The key's scope for this resource does not allow the action. |
404 |
No such object in this key's organisation. |
429 |
Rate limited (300 requests/hour per key). Retry after the Retry-After header. |