MediaAgo API ve geliştirici dokümanı
Paketleri ve sektörleri listeleyin, demo isteyin, kendi markanızın içeriklerini onaylayın veya revizyon isteyin.
Kimlik doğrulama ve tekrar denemeler
Paket ve sektör listeleri anahtarsız okunur. Panel → API bölümünden 90 günlük müşteri anahtarı oluşturun. Özel uçlar Authorization: Bearer YOUR_TOKEN kullanır ve yalnız kendi markalarınıza erişir. Anahtarları iptal edebilirsiniz.
Özel API sınırı anahtar başına dakikada 60 istektir (sunucu süreci başına); demo oluşturma ayrıca IP başına saatte 5 denemeyle sınırlıdır. Yazma isteklerinde 16–128 karakterlik Idempotency-Key gerekir. Aynı içerikle tekrar gönderim kaydedilmiş sonucu döndürür; değişen içerik 409 döndürür. İşleniyor kaydı varsa yeni anahtarla ikinci talep açmayın; sonucu kontrol ettirin.
Hatalar {hata: mesaj} biçimindedir. 400 doğrulama, 401 kimlik, 403 yetki, 404 bulunamadı/başkasına ait kayıt, 409 çakışma, 429 hız sınırı, 500 sunucu hatası. Üretim köprüsünün kimlik bilgileri ayrıdır.
/api/v1/plansList subscription plans
get_plansWebsite catalogue prices in USD. PayTR checkout shows the configured final recurring price separately; no currency conversion is implied.
Public · no token required
| Parameter | Location | Required | Details |
|---|---|---|---|
language | query | No | {"type":"string","enum":["tr","en","ru","ar","es"],"default":"en"} |
Responses · 200
{
"200": {
"description": "Plan catalogue",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"currency": {
"const": "USD"
},
"billing_interval": {
"const": "month"
},
"plans": {
"type": "array",
"items": {
"type": "object",
"properties": {
"kod": {
"type": "string",
"description": "Plan code"
},
"ad": {
"type": "string",
"description": "Name"
},
"fiyat": {
"type": "number"
},
"kdv": {
"type": "boolean",
"description": "Whether VAT is added to the website base price"
},
"tax_included": {
"type": "boolean"
}
}
}
}
}
}
}
}
}
}/api/v1/industriesList industries including Other
get_industriesPublic · no token required
| Parameter | Location | Required | Details |
|---|---|---|---|
language | query | No | {"type":"string","enum":["tr","en","ru","ar","es"],"default":"en"} |
Responses · 200
{
"200": {
"description": "Industry catalogue",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"industries": {
"type": "array",
"items": {
"type": "object",
"required": [
"code",
"name",
"requires_description"
],
"properties": {
"code": {
"type": "string",
"description": "Industry code"
},
"name": {
"type": "string",
"description": "Industry name"
},
"description": {
"type": "string",
"description": "Summary"
},
"requires_description": {
"type": "boolean"
}
}
}
}
}
}
}
}
}
}/api/v1/demo-requestsCreate a demo for your customer account
create_demo_requestCreates a new brand and demo; does not attach an existing brand. Existing customer account and Bearer token required. For images/logo/audio use multipart; multipart fields accept the English field names below as well as legacy form names (firma, sektor, dil, ses_secim, kvkk). Clone voice needs klon_onay=1 and ses audio. File validation happens before account/brand creation.
Authorization: Bearer YOUR_TOKEN
| Parameter | Location | Required | Details |
|---|---|---|---|
Idempotency-Key | header | Yes | Unique per operation. Reuse with identical payload for retries. A processing reservation returns 409 and must be reconciled before submitting a new key. |
Request schema
{
"application/json": {
"schema": {
"type": "object",
"required": [
"company",
"industry",
"brief1",
"brief2",
"voice",
"privacy_consent"
],
"properties": {
"company": {
"type": "string",
"description": "Brand/company name",
"minLength": 2,
"maxLength": 160
},
"industry": {
"type": "string",
"description": "Code returned by get_industries; use diger for Other"
},
"industry_other": {
"type": "string",
"description": "Required description when industry is diger",
"maxLength": 300
},
"website": {
"type": "string",
"description": "Optional company website",
"maxLength": 255
},
"language": {
"type": "string",
"description": "Account/brief language",
"enum": [
"tr",
"en",
"ru",
"ar",
"es"
],
"default": "en"
},
"visual_mode": {
"type": "string",
"description": "upload requires at least 5 images; graphics, stock and skip allow no images",
"enum": [
"upload",
"graphics",
"stock",
"skip"
],
"default": "upload"
},
"brief1": {
"type": "string",
"description": "First production brief",
"minLength": 300,
"maxLength": 6000
},
"brief2": {
"type": "string",
"description": "Second production brief",
"minLength": 300,
"maxLength": 6000
},
"voice": {
"type": "string",
"description": "none: yok; default voice: varsayilan. Upload/clone require multipart audio and consent",
"enum": [
"yok",
"varsayilan",
"yukle",
"klon"
]
},
"music": {
"type": "string",
"description": "Music source",
"enum": [
"biz",
"yok",
"link",
"dosya"
],
"default": "biz"
},
"privacy_consent": {
"type": "boolean",
"const": true,
"description": "Explicit privacy/terms consent"
}
}
}
},
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"company",
"industry",
"brief1",
"brief2",
"voice",
"privacy_consent"
],
"properties": {
"company": {
"type": "string",
"description": "Brand/company name",
"minLength": 2,
"maxLength": 160
},
"industry": {
"type": "string",
"description": "Code returned by get_industries; use diger for Other"
},
"industry_other": {
"type": "string",
"description": "Required description when industry is diger",
"maxLength": 300
},
"website": {
"type": "string",
"description": "Optional company website",
"maxLength": 255
},
"language": {
"type": "string",
"description": "Account/brief language",
"enum": [
"tr",
"en",
"ru",
"ar",
"es"
],
"default": "en"
},
"visual_mode": {
"type": "string",
"description": "upload requires at least 5 images; graphics, stock and skip allow no images",
"enum": [
"upload",
"graphics",
"stock",
"skip"
],
"default": "upload"
},
"brief1": {
"type": "string",
"description": "First production brief",
"minLength": 300,
"maxLength": 6000
},
"brief2": {
"type": "string",
"description": "Second production brief",
"minLength": 300,
"maxLength": 6000
},
"voice": {
"type": "string",
"description": "none: yok; default voice: varsayilan. Upload/clone require multipart audio and consent",
"enum": [
"yok",
"varsayilan",
"yukle",
"klon"
]
},
"music": {
"type": "string",
"description": "Music source",
"enum": [
"biz",
"yok",
"link",
"dosya"
],
"default": "biz"
},
"privacy_consent": {
"type": "string",
"description": "Use 1 for consent",
"enum": [
"1"
]
},
"gorsel": {
"type": "array",
"maxItems": 15,
"items": {
"type": "string",
"format": "binary"
},
"description": "JPEG/PNG/WebP, max 15 MB each; at least 5 for upload mode"
},
"logo": {
"type": "string",
"format": "binary",
"description": "Optional PNG/JPEG/WebP, max 5 MB"
},
"ses": {
"type": "string",
"format": "binary",
"description": "Required for voice yukle/klon"
},
"klon_onay": {
"type": "string",
"description": "1 for explicit voice-cloning consent"
},
"ses_varsayilan": {
"type": "string",
"description": "Default voice code"
},
"muzik": {
"type": "string",
"format": "binary"
},
"muzik_link": {
"type": "string",
"description": "Music URL"
}
}
}
}
}Responses · 200 / 400 / 401 / 409 / 429 / 500
{
"200": {
"description": "Demo accepted",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"ok",
"marka_id",
"demo_id"
],
"properties": {
"ok": {
"const": true
},
"marka_id": {
"type": "integer"
},
"demo_id": {
"type": "integer"
}
}
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"401": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"409": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"429": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"500": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
}
}/api/v1/contentsList your latest 100 content items
get_contentsAuthorization: Bearer YOUR_TOKEN
Responses · 200 / 401 / 429
{
"200": {
"description": "Contents",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"contents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"brand_id": {
"type": "integer"
},
"title": {
"type": "string",
"description": "Title"
},
"type": {
"type": "string",
"description": "Content type"
},
"status": {
"type": "string",
"description": "bekliyor, secim, onaylandi, revize, reddedildi, yayinlandi or suresi_doldu"
},
"version": {
"type": "integer"
},
"available_versions": {
"type": "array",
"items": {
"type": "integer"
},
"description": "Available versions for revision selection"
},
"revisions_remaining": {
"type": "integer"
},
"scheduled_at": {
"type": [
"string",
"null"
],
"format": "date-time"
}
}
}
}
}
}
}
}
},
"401": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"429": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
}
}/api/v1/contents/{id}/decisionApprove, request revision or reject content
approve_contentRequires ownership of the brand, an active brand or demo, a decision-eligible state and a valid version. Existing decision deadlines and revision limits apply. Approval is delivered through the existing Mac bridge; the API does not publish directly. For secim choose a version from available_versions returned by get_contents.
Authorization: Bearer YOUR_TOKEN
| Parameter | Location | Required | Details |
|---|---|---|---|
id | path | Yes | {"type":"integer","minimum":1} |
Idempotency-Key | header | Yes | Unique per operation. Reuse with identical payload for retries. A processing reservation returns 409 and must be reconciled before submitting a new key. |
Request schema
{
"application/json": {
"schema": {
"type": "object",
"required": [
"action",
"version"
],
"properties": {
"action": {
"type": "string",
"description": "Decision",
"enum": [
"approve",
"revise",
"reject"
]
},
"version": {
"type": "integer",
"minimum": 1
},
"note": {
"type": "string",
"description": "Revision requires at least 10 characters",
"maxLength": 2000
}
}
}
}
}Responses · 200 / 400 / 401 / 403 / 404 / 409 / 429 / 500
{
"200": {
"description": "Decision recorded",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ok": {
"const": true
},
"id": {
"type": "integer"
},
"status": {
"type": "string",
"description": "Decision state"
},
"publishing": {
"type": "string",
"description": "Bridge handoff explanation"
}
}
}
}
}
},
"400": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"401": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"403": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"404": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"409": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"429": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
},
"500": {
"description": "Error",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"hata"
],
"properties": {
"hata": {
"type": "string",
"description": "Error description"
}
}
}
}
}
}
}Örnekler
Aşağıdaki brief yer tutucularını en az 300’er karakterlik gerçek metinlerle değiştirin.
curl 'https://mediaago.com/api/v1/plans?language=en'
curl 'https://mediaago.com/api/v1/demo-requests' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Idempotency-Key: demo-example-00001' \
-H 'Content-Type: application/json' \
--data '{
"company": "Example Studio",
"industry": "diger",
"industry_other": "Education technology",
"language": "en",
"visual_mode": "graphics",
"brief1": "Describe the first production brief in at least 300 characters…",
"brief2": "Describe the second production brief in at least 300 characters…",
"voice": "yok",
"privacy_consent": true
}'
curl 'https://mediaago.com/api/v1/contents/123/decision' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Idempotency-Key: decision-example-0001' \
-H 'Content-Type: application/json' \
--data '{"action":"approve","version":1}'