Skip to main content
POST
TypeScript
Use from with version, at, or before to fork from a specific point in history. Learn more in the Fork & Clone Contexts guide.

Authorizations

Authorization
string
header
required

API key from your UltraContext dashboard

Body

application/json

Create a new context with optional fork params and metadata

from
string

Source context ID to copy from (optional)

version
integer

When forking with from, copy from this specific version (0-indexed)

at
integer

When forking with from, copy only messages 0 through this index

before
string<date-time>

When forking with from, copy point-in-time state before this ISO timestamp

metadata
object

User-defined metadata for this context

Response

Context created

id
string

Unique identifier (ctx_...)

Example:

"ctx_a1b2c3d4e5f6"

metadata
object

User-defined metadata

created_at
string<date-time>

ISO 8601 timestamp