Update draft markdown, metadata, or review status
PATCH
/studies/{slug}/drafts/{id}
const url = 'https://app.discotrace.com/api/v1/studies/core-discovery/drafts/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","target_url_slug":"example","meta_title":"example","meta_description":"example","draft_markdown":"example","status":"brief_only"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”slug
required
string
Example
core-discoveryLowercase study slug within the authenticated workspace.
id
required
string
Draft ID.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
title
string
target_url_slug
string
meta_title
string
meta_description
string
draft_markdown
string
status
string
Responses
Section titled “Responses”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" }}