コンテンツにスキップ

Agent: Storefront

Create or run AI-drafted landing page copy (nothing is saved)

POST /api/v1/agent/courses/{course_pk}/landing/copy/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/courses/<course_pk>/landing/copy/.

Authentication: API key — Authorization: Bearer <key>

Parameter In Required Description
course_pk path yes
COURSE_PK="..."
curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/courses/$COURSE_PK/landing/copy/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

course_pk = "..."
url = f"https://www-dev.yoshuko.com/api/v1/agent/courses/{course_pk}/landing/copy/"
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 course_pk = "...";
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/courses/${course_pk}/landing/copy/`, {
  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 hero image candidates

GET /api/v1/agent/courses/{course_pk}/landing/hero/

Requires storefront: view. Same body, rules and refusals as the creator-studio endpoint /api/v1/courses/<course_pk>/landing/hero/.

Authentication: API key — Authorization: Bearer <key>

Parameter In Required Description
course_pk path yes
COURSE_PK="..."
curl -sS -X GET "https://www-dev.yoshuko.com/api/v1/agent/courses/$COURSE_PK/landing/hero/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

course_pk = "..."
url = f"https://www-dev.yoshuko.com/api/v1/agent/courses/{course_pk}/landing/hero/"
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 course_pk = "...";
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/courses/${course_pk}/landing/hero/`, {
  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 hero image candidates

POST /api/v1/agent/courses/{course_pk}/landing/hero/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/courses/<course_pk>/landing/hero/.

Authentication: API key — Authorization: Bearer <key>

Parameter In Required Description
course_pk path yes
COURSE_PK="..."
curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/courses/$COURSE_PK/landing/hero/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

course_pk = "..."
url = f"https://www-dev.yoshuko.com/api/v1/agent/courses/{course_pk}/landing/hero/"
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 course_pk = "...";
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/courses/${course_pk}/landing/hero/`, {
  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.

Create or run hero image copied from a link (url)

POST /api/v1/agent/courses/{course_pk}/landing/hero/import/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/courses/<course_pk>/landing/hero/import/.

Authentication: API key — Authorization: Bearer <key>

Parameter In Required Description
course_pk path yes
COURSE_PK="..."
curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/courses/$COURSE_PK/landing/hero/import/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

course_pk = "..."
url = f"https://www-dev.yoshuko.com/api/v1/agent/courses/{course_pk}/landing/hero/import/"
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 course_pk = "...";
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/courses/${course_pk}/landing/hero/import/`, {
  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.

Create or run hero image from a file (multipart file)

POST /api/v1/agent/courses/{course_pk}/landing/hero/upload/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/courses/<course_pk>/landing/hero/upload/.

Authentication: API key — Authorization: Bearer <key>

Parameter In Required Description
course_pk path yes
COURSE_PK="..."
curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/courses/$COURSE_PK/landing/hero/upload/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

course_pk = "..."
url = f"https://www-dev.yoshuko.com/api/v1/agent/courses/{course_pk}/landing/hero/upload/"
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 course_pk = "...";
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/courses/${course_pk}/landing/hero/upload/`, {
  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.

Delete a hero image candidate

DELETE /api/v1/agent/courses/{course_pk}/landing/hero/{id}/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/courses/<course_pk>/landing/hero/<pk>/.

Authentication: API key — Authorization: Bearer <key>

Parameter In Required Description
course_pk path yes
id path yes
COURSE_PK="..."
ID="..."
curl -sS -X DELETE "https://www-dev.yoshuko.com/api/v1/agent/courses/$COURSE_PK/landing/hero/$ID/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

course_pk = "..."
id = "..."
url = f"https://www-dev.yoshuko.com/api/v1/agent/courses/{course_pk}/landing/hero/{id}/"
response = requests.delete(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 course_pk = "...";
const id = "...";
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/courses/${course_pk}/landing/hero/${id}/`, {
  method: "DELETE",
  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 live hero image

POST /api/v1/agent/courses/{course_pk}/landing/hero/{id}/select/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/courses/<course_pk>/landing/hero/<pk>/select/.

Authentication: API key — Authorization: Bearer <key>

Parameter In Required Description
course_pk path yes
id path yes
COURSE_PK="..."
ID="..."
curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/courses/$COURSE_PK/landing/hero/$ID/select/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

course_pk = "..."
id = "..."
url = f"https://www-dev.yoshuko.com/api/v1/agent/courses/{course_pk}/landing/hero/{id}/select/"
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 course_pk = "...";
const id = "...";
const response = await fetch(`https://www-dev.yoshuko.com/api/v1/agent/courses/${course_pk}/landing/hero/${id}/select/`, {
  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.

Update organization branding

PATCH /api/v1/agent/tenants/branding/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/branding/.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X PATCH "https://www-dev.yoshuko.com/api/v1/agent/tenants/branding/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/branding/"
response = requests.patch(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/branding/`, {
  method: "PATCH",
  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 custom domain

GET /api/v1/agent/tenants/domain/

Requires storefront: view. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/domain/.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X GET "https://www-dev.yoshuko.com/api/v1/agent/tenants/domain/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/domain/"
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/domain/`, {
  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 custom domain

POST /api/v1/agent/tenants/domain/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/domain/.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/tenants/domain/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/domain/"
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/domain/`, {
  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.

Create or run custom domain DNS check

POST /api/v1/agent/tenants/domain/check/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/domain/check/.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/tenants/domain/check/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/domain/check/"
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/domain/check/`, {
  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.

Create or run organization logo (multipart file)

POST /api/v1/agent/tenants/logo/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/logo/.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X POST "https://www-dev.yoshuko.com/api/v1/agent/tenants/logo/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/logo/"
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/logo/`, {
  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 storefront subdomain

GET /api/v1/agent/tenants/subdomain/

Requires storefront: view. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/subdomain/.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X GET "https://www-dev.yoshuko.com/api/v1/agent/tenants/subdomain/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/subdomain/"
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/subdomain/`, {
  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.

Update storefront subdomain

PATCH /api/v1/agent/tenants/subdomain/

Requires storefront: edit. Same body, rules and refusals as the creator-studio endpoint /api/v1/tenants/subdomain/.

Authentication: API key — Authorization: Bearer <key>

curl -sS -X PATCH "https://www-dev.yoshuko.com/api/v1/agent/tenants/subdomain/" \
  -H "Authorization: Bearer $YOSHUKO_API_KEY"
import os
import requests

url = f"https://www-dev.yoshuko.com/api/v1/agent/tenants/subdomain/"
response = requests.patch(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/subdomain/`, {
  method: "PATCH",
  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.