Skip to content

Update draft markdown, metadata, or review status

PATCH
/studies/{slug}/drafts/{id}
curl --request PATCH \
--url https://app.discotrace.com/api/v1/studies/core-discovery/drafts/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "example", "target_url_slug": "example", "meta_title": "example", "meta_description": "example", "draft_markdown": "example", "status": "brief_only" }'

Requires write scope. Partially updates an existing draft without wiping omitted fields.

slug
required
string

Example

core-discovery

Lowercase study slug within the authenticated workspace.

id
required
string

Draft ID.

Media typeapplication/json
object
title
string
target_url_slug
string
meta_title
string
meta_description
string
draft_markdown
string
status
string
Allowed values: brief_only draft review approved published

Updated content draft.

Structured error payload with remediation link (resolveUrl).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
resolveUrl
required
string format: uri
details
object
key
additional properties
any

Example

{
"error": {
"code": "insufficient_scope",
"message": "API key is missing required scope 'run'.",
"retryable": false,
"resolveUrl": "https://app.discotrace.com/w/acme/api"
}
}

Structured error payload with remediation link (resolveUrl).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
resolveUrl
required
string format: uri
details
object
key
additional properties
any

Example

{
"error": {
"code": "insufficient_scope",
"message": "API key is missing required scope 'run'.",
"retryable": false,
"resolveUrl": "https://app.discotrace.com/w/acme/api"
}
}

Structured error payload with remediation link (resolveUrl).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
resolveUrl
required
string format: uri
details
object
key
additional properties
any

Example

{
"error": {
"code": "insufficient_scope",
"message": "API key is missing required scope 'run'.",
"retryable": false,
"resolveUrl": "https://app.discotrace.com/w/acme/api"
}
}

Structured error payload with remediation link (resolveUrl).

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
retryable
required
boolean
resolveUrl
required
string format: uri
details
object
key
additional properties
any

Example

{
"error": {
"code": "insufficient_scope",
"message": "API key is missing required scope 'run'.",
"retryable": false,
"resolveUrl": "https://app.discotrace.com/w/acme/api"
}
}