Create Source
curl --request POST \
--url https://api.example.com/v0/sourcesimport requests
url = "https://api.example.com/v0/sources"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v0/sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/sources"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v0/sources")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodySources
Create Source
POST /v0/sources — Configure a scheduled producer
POST
/
v0
/
sources
Create Source
curl --request POST \
--url https://api.example.com/v0/sourcesimport requests
url = "https://api.example.com/v0/sources"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/v0/sources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v0/sources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v0/sources"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v0/sources")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/sources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyDraft — needs review
Configures a scheduled producer. Omitteam to create it in your personal scope.
Auth: Authorization: Bearer tr_...
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique within the scope |
adapter | string | Yes | fathom or cron — see List Adapters |
team | string | No | Team slug or id. Omitted = personal |
connection | string | No | Connection name in the same scope. Required by fathom |
brain | string | No | Brain workspace slug in the same scope. Required by fathom |
intervalMinutes | integer | No | 5–1440. Defaults to 60 for adapters that need one; adapters that schedule themselves take none |
config | object | No | Adapter-specific configuration, validated strictly per adapter |
taskKind | string | No | The kind of task to file per landed item, matching ^[a-z0-9][a-z0-9-_]{0,63}$ |
assigneeRule | string | No | creator (default), recorder, none, or a member’s account id / alias |
curl -X POST https://api.tokenrip.com/v0/sources \
-H "Authorization: Bearer tr_live_AbCdEfGhIjKlMnOpQrStUvWx" \
-H "Content-Type: application/json" \
-d '{
"team": "quintel",
"name": "fathom",
"adapter": "fathom",
"connection": "notetaker",
"brain": "company",
"taskKind": "process-call",
"assigneeRule": "recorder"
}'
curl -X POST https://api.tokenrip.com/v0/sources \
-H "Authorization: Bearer tr_live_AbCdEfGhIjKlMnOpQrStUvWx" \
-H "Content-Type: application/json" \
-d '{
"team": "quintel",
"name": "weekly-post",
"adapter": "cron",
"taskKind": "write-post",
"config": {
"cron": "0 9 * * 1",
"tz": "Europe/Amsterdam",
"task": { "title": "Draft the post for week {{week}}" }
}
}'
201 with the serialized source.
Adapter requirements
Each adapter declares what it needs, and the service enforces it both ways — a missing binding and an unneeded one are both rejected.| Adapter | Connection | Brain | Interval |
|---|---|---|---|
fathom | required | required | required (5–1440, default 60) |
cron | not accepted | not accepted | not accepted — it schedules itself |
cron source has no content to land, so a task is the only thing it can produce: taskKind is required. Without one it would tick on schedule forever and emit nothing.
Error codes
| Error | Description |
|---|---|
UNKNOWN_ADAPTER | No such adapter. The message lists the known kinds |
MISSING_CONNECTION | The adapter requires a connection and none was bound |
MISSING_BRAIN | The adapter requires a brain and none was bound |
INVALID_SOURCE_CONFIG | A connection on an adapter that never calls out; a brain on an adapter that lands no content; a cron source with no taskKind |
INVALID_CONFIG | The config failed the adapter’s schema — an invalid cron expression or an unknown IANA timezone, for example |
INVALID_FIELD | intervalMinutes outside 5–1440, or a taskKind that fails the slug grammar |
CONNECTION_NOT_FOUND / WORKSPACE_NOT_FOUND | The named connection or brain does not exist in this scope |
NOT_A_MEMBER / TEAM_NOT_FOUND | Team scope problems |
Operator mirror
POST /v0/operator/sources.