Create a source (managed inbox or your S3 bucket)
POST
/api/sources
const url = 'https://api.langparse.dev/api/sources';const options = { method: 'POST', headers: {'X-Api-Key': '<X-Api-Key>', 'Content-Type': 'application/json'}, body: '{"kind":"s3-managed","name":"example","modelId":"example","routerId":"example","tagSourceFiles":true,"bucket":"example","region":"example","prefix":"example","roleArn":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.langparse.dev/api/sources \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <X-Api-Key>' \ --data '{ "kind": "s3-managed", "name": "example", "modelId": "example", "routerId": "example", "tagSourceFiles": true, "bucket": "example", "region": "example", "prefix": "example", "roleArn": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
kind
required
string
name
string
modelId
string
routerId
string
tagSourceFiles
Write the model’s source-scoped output tags back onto each file.
boolean
bucket
BYO (kind=s3) only.
string
region
string
prefix
string
roleArn
BYO (kind=s3) only — role created from /sources/policy.
string
Responses
Section titled “Responses”Created source (+ S3 notification config for BYO buckets)
Media typeapplication/json
object
key
additional properties
any
Examplegenerated
{}