Reserves a durable source snapshot ID and returns an opaque upload target for
the bundle archive.
This is the first raw-API step before Create Agent
or Publish New Version.
The upload_url is provider-specific; upload the tarball there exactly as
returned, then call
Finalize Source Snapshot.
Bearer token using your Dari API key.
Request Body
Archive format. Today this must be tar.gz.
Lowercase SHA-256 digest of the archive bytes.
Exact archive size in bytes.
Optional audit metadata such as commit_sha, CI identifiers, or provider
run URLs.
Response Fields
Durable source snapshot ID.
Opaque provider upload URL for the archive bytes.
Required request headers for the upload step.
Expiration time for the upload target.
Initial snapshot status, currently pending_upload.
curl -X POST https://api.dari.dev/v1/source-snapshots \
-H "Authorization: Bearer $DARI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "tar.gz",
"sha256": "ea7c6ab2ebd3691173066598e6880159efb39df02ac170477dad66f5b83bea8e",
"size_bytes": 612,
"metadata": {
"commit_sha": "deadbeef",
"github_run_id": "42"
}
}'
{
"source_snapshot_id": "src_456",
"upload_url": "https://storage.example/upload/abc",
"upload_headers": {
"Content-Type": "application/gzip"
},
"expires_at": "2026-03-31T18:55:00Z",
"status": "pending_upload"
}