Prompts

Import prompts from your industry

Copies prompts from your organization's industry into your organization and starts importing the run history already collected for them, so their analytics begin with data instead of an empty chart. History is copied only for the AI models and locations your organization runs, and only to prompts whose text matches the industry prompt's.

Only your organization's own industry is accepted: any other industry id, and an organization with no industry, is a 403. Every requested prompt must be a live, active prompt of that industry with text that fits a prompt, and no two may share the same text; otherwise the whole request is rejected with a 400 naming the offending ids and nothing is changed.

Once accepted, each prompt is either created or skipped because your organization already holds a prompt with the same text. Sending the same request again is safe — prompts already present are skipped, and the history import is started again or, if one is still running, that one is returned. Importing activates your organization and starts its scheduled runs. Any prompts already saved to the organization that were not yet running will begin running as well. Should the request fail after it was accepted, prompts created before the failure remain and the organization may already be activated; send the same request again to finish.

Follow the history import with GET /org/history-imports/{importId} using the returned history_import.import_id. A completed import may have copied nothing — read its prompts_count and historic_runs_imported rather than the status alone. Requires the GEO product.

post/org/industries/{id}/prompts/import

Request

  • Base URL
    https://apiv2.senso.ai/api/v1
  • Auth
    API key in header X-API-Key

Path parameters

idstring uuid required

Your organization's industry id. Any other industry is a 403.

Request body

prompt_idsstring[] required

Ids of prompts in your organization's industry. Each id may appear once; a duplicate rejects the request.

Response

One outcome per requested prompt, in request order, plus the history import that was started, found already running, or could not be started.

createdinteger required

How many prompts were added to your organization.

skippedinteger required

How many prompts your organization already had.

Example response

{
  "outcomes": [
    {
      "status": "created",
      "reason": "a prompt with this text already exists in your organization"
    }
  ],
  "created": 4,
  "skipped": 1,
  "history_import": {
    "status": "queued",
    "days": 7,
    "reason": "The history import could not be started. Send the request again to retry."
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.