Customer API · v1

Build with MediaAgo

Read plans and industries, request demos, and approve or revise your own brand’s content.

Authentication and retries

Public catalogue endpoints require no key. Create a 90-day customer token in Panel → API. Private endpoints accept Authorization: Bearer YOUR_TOKEN and access only your own brands. Tokens can be revoked immediately.

Private API limit: 60 requests per minute per token (per server process); demo creation additionally allows 5 attempts per hour per IP. Mutations require an Idempotency-Key (16–128 characters). Identical retries replay the saved result. Changed payloads return 409. A processing reservation requires reconciliation; do not retry under a new key.

Errors use {hata: message}. 400 validation, 401 authentication, 403 permission, 404 unknown/other customer’s resource, 409 conflict, 429 rate limit, 500 server failure. Internal production bridge credentials are separate.

get/api/v1/plans

List subscription plans

get_plans

Website catalogue prices in USD. PayTR checkout shows the configured final recurring price separately; no currency conversion is implied.

Public · no token required

ParameterLocationRequiredDetails
languagequeryNo{"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"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
get/api/v1/industries

List industries including Other

get_industries

Public · no token required

ParameterLocationRequiredDetails
languagequeryNo{"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"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
post/api/v1/demo-requests

Create a demo for your customer account

create_demo_request

Creates 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

ParameterLocationRequiredDetails
Idempotency-KeyheaderYesUnique 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"
            }
          }
        }
      }
    }
  }
}
get/api/v1/contents

List your latest 100 content items

get_contents

Authorization: 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"
            }
          }
        }
      }
    }
  }
}
post/api/v1/contents/{id}/decision

Approve, request revision or reject content

approve_content

Requires 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

ParameterLocationRequiredDetails
idpathYes{"type":"integer","minimum":1}
Idempotency-KeyheaderYesUnique 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"
            }
          }
        }
      }
    }
  }
}

Examples

The brief placeholders below must be replaced with real text of at least 300 characters each.

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}'