Templates
Reusable agent configurations (system prompt, env vars)
List session templates
Returns own templates plus public templates in the same org scope, ordered by creation date descending.
Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.
In: header
Response Body
curl -X GET "https://app.raziel.fun/api/templates"{
"templates": [
{
"id": "string",
"userId": "string",
"orgSlug": "string",
"name": "Full-stack feature agent",
"description": "string",
"agent": "claude-code",
"systemPrompt": "string",
"envVars": {
"property1": "string",
"property2": "string"
},
"isPublic": true,
"usageCount": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Unauthorized"
}Create a session template
Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.
In: header
Custom system prompt injected at session start
Empty Object
falseResponse Body
curl -X POST "https://app.raziel.fun/api/templates" \
-H "Content-Type: application/json" \
-d '{
"name": "Full-stack feature agent",
"agent": "claude-code"
}'{
"template": {
"id": "string",
"userId": "string",
"orgSlug": "string",
"name": "Full-stack feature agent",
"description": "string",
"agent": "claude-code",
"systemPrompt": "string",
"envVars": {
"property1": "string",
"property2": "string"
},
"isPublic": true,
"usageCount": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Not found"
}{
"error": "Unauthorized"
}Get a template
Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.
In: header
Path Parameters
Response Body
curl -X GET "https://app.raziel.fun/api/templates/string"{
"template": {
"id": "string",
"userId": "string",
"orgSlug": "string",
"name": "Full-stack feature agent",
"description": "string",
"agent": "claude-code",
"systemPrompt": "string",
"envVars": {
"property1": "string",
"property2": "string"
},
"isPublic": true,
"usageCount": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Update a template
Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.
In: header
Path Parameters
Empty Object
Response Body
curl -X PATCH "https://app.raziel.fun/api/templates/string" \
-H "Content-Type: application/json" \
-d '{}'{
"template": {
"id": "string",
"userId": "string",
"orgSlug": "string",
"name": "Full-stack feature agent",
"description": "string",
"agent": "claude-code",
"systemPrompt": "string",
"envVars": {
"property1": "string",
"property2": "string"
},
"isPublic": true,
"usageCount": 0,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Not found"
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Delete a template
Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.
In: header
Path Parameters
Response Body
curl -X DELETE "https://app.raziel.fun/api/templates/string"{
"ok": true
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Launch a session from a template
Creates a new session pre-configured with the template's agent, system prompt, and env vars. Increments the template's usage counter.
Clerk session token. Automatically set as a cookie in the browser; pass as Authorization: Bearer for server-side calls.
In: header
Path Parameters
Response Body
curl -X POST "https://app.raziel.fun/api/templates/string/launch"{
"session": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"userId": "string",
"orgId": "string",
"projectId": "string",
"sandboxId": "xyz789abc",
"agent": "claude-code",
"image": "raziel-agents",
"prompt": "Refactor the auth module",
"repoUrl": "https://github.com/owner/repo.git",
"branch": "main",
"workBranch": "raziel/alice/refactor-auth-550e",
"prNumber": 0,
"prUrl": "string",
"headSha": "string",
"status": "running",
"snapshotName": "string",
"agentStarted": true,
"inputTokens": 10000,
"outputTokens": 2500,
"estimatedCostUsd": 0.0312,
"exitCode": 0,
"errorMessage": "string",
"shareToken": "string",
"sharedAt": "2019-08-24T14:15:22Z",
"aiSummary": "string",
"summaryAt": "2019-08-24T14:15:22Z",
"forkedFromId": "string",
"tags": [
"auth",
"refactor"
],
"startedAt": "2019-08-24T14:15:22Z",
"stoppedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}