---
title: "Add prompts"
method: POST
path: "/api/sites/multiscreen/{site_name}/aeo/prompts"
tags: ["AEO Prompts"]
---

# Add prompts

`POST /api/sites/multiscreen/{site_name}/aeo/prompts`

## Request

- Base URL: `https://api.duda.co`
- URL: `https://api.duda.co/api/sites/multiscreen/{site_name}/aeo/prompts`
- Auth: HTTP basic

Adds one or more prompts to track in one country, and returns their IDs in request order. If any prompt fails, the prompts already added by the call are removed.

- `country_code` defaults to the project's primary market. It must be the primary market or one of the project's additional countries; this endpoint can't add a new country.
- The plan's prompt limit applies per country.
- Prompt texts must be unique within the country, ignoring case and whitespace, including against each other in the same request. The check runs before anything is added, so retrying after a timeout is safe.

Each new prompt adds to the cost of every scheduled and manual run (prompts × AI models).

## Path parameters

- `site_name` string, required

## Request body

- ApiAeoCreatePromptsReq
  - `country_code` string: Country for the new prompts, as an ISO 3166-1 alpha-2 code. Case-insensitive. Must be the primary market or one of the project's additional countries. Defaults to the primary market.
  - `prompts` ApiAeoPromptReq[], required: The prompts to add.
    - `text` string, required: The question to ask the AI answer engines.

## Response `201`

Created

- ApiAeoIdsResp
  - `results` ApiAeoIdResp[]: IDs of the created prompts, in request order.
    - `id` string: ID of the created resource.

## Other responses

- `400`: Bad request. `error_code` is `InvalidInput`, and `errors[0].code` names the cause: - No code (`errors` is empty): `prompts` is empty, a `text` is blank, or `country_code` is unsupported or not one of the project's countries. - `AeoPromptDuplicate`: a prompt text already exists in the country. `errors[0].detail` holds the duplicate text.
- `401`: Unauthorized. The credentials are missing or invalid.
- `403`: Forbidden. `error_code` is `AccessForbidden`, and `errors[0].code` names the cause: - No code (`errors` is empty): the caller can't access the site. - `AeoPlanNotFound`: the account has no active AEO plan. - `AeoPromptsLimitExceeded`: the country would exceed the plan's prompt limit.
- `404`: Not found. `error_code` is `ResourceNotExist`, and `errors[0].code` names the cause: - `AeoProjectNotFound`: the site has no AEO project.
- `429`: Too many requests. The rate limit was exceeded.

---

[API](https://skmtc.dev/duda/apis/duda-partner-api.md) - [All operations](https://skmtc.dev/duda/apis/duda-partner-api/llms.txt) - [OpenAPI document](https://skmtc.dev/duda/apis/duda-partner-api/revisions/52be4d41cb12?raw)
