Skip to main content
PATCH
/
v1
/
analyses
/
{analysis_id}
Update Analysis
curl --request PATCH \
  --url https://api.example.com/v1/analyses/{analysis_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "urls_add": [
    "<string>"
  ],
  "sub_analysis_ids_remove": [
    "<string>"
  ],
  "structured_prompts": {
    "ids": [
      "prompt_01h45ytscbebyvny4gc8cr8ma2"
    ],
    "definitions": [
      {
        "name": "<string>",
        "description": "Extracts what a company does and whether it is generalist or specialist.",
        "prompt": "Given the page content, answer the questions according to the schema.",
        "response_schema": {
          "draft_07": {
            "enum": [
              "generalist",
              "specialist"
            ],
            "type": "string"
          }
        }
      }
    ]
  },
  "config": {
    "normalize_input_to_domains": true,
    "max_pages": 5
  }
}
'
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "owner_id": "<string>",
    "created_at": 123,
    "urls": [
      "<string>"
    ],
    "prompts": [
      {
        "id": "<string>",
        "idx": 123,
        "name": "<string>",
        "prompt": "<string>",
        "version": 123,
        "description": "<string>"
      }
    ],
    "description": "<string>",
    "last_run_at": 123
  },
  "response_type": "AnalysisDescriptionResponse",
  "links": []
}

Authorizations

X-API-Key
string
header
required

API Key for external integrations (format: greetincs_...)

Path Parameters

analysis_id
string
required

Analysis ID in TypeID format

Body

application/json

Request schema for updating an analysis.

All fields are optional. At least one field must be provided.

name
string | null
Required string length: 1 - 255
description
string | null
Maximum string length: 1000
urls_add
string[] | null

URLs to add as new sub-analyses

sub_analysis_ids_remove
string[] | null

Sub-analysis IDs to mark as SKIPPED

structured_prompts
StructuredPromptInput · object

Replace all prompts with this list

config
AnalysisConfigInput · object

Replace analysis configuration

Response

Successful Response

Analysis with loaded prompt details and URLs.

data
AnalysisDescriptionData · object
required

Analysis detail data.

response_type
string
default:AnalysisDescriptionResponse

HATEOAS links related to this response (e.g., self, next, prev)

Example:
[
{
"href": "/resource/{resource_id}",
"method": "GET",
"rel": "self",
"title": "Resource Details"
},
{
"href": "/resource/{resource_id}/related",
"method": "GET",
"rel": "related",
"title": "Related Resources"
}
]