Create a destination (webhook / S3 / SQS / SNS)
POST
/api/destinations
const url = 'https://api.langparse.dev/api/destinations';const options = { method: 'POST', headers: {'X-Api-Key': '<X-Api-Key>', 'Content-Type': 'application/json'}, body: '{"kind":"webhook","name":"example","resultShape":"full","sourceIds":["example"],"writeTags":true,"url":"example","secret":"example","bucket":"example","prefix":"example","region":"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/destinations \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <X-Api-Key>' \ --data '{ "kind": "webhook", "name": "example", "resultShape": "full", "sourceIds": [ "example" ], "writeTags": true, "url": "example", "secret": "example", "bucket": "example", "prefix": "example", "region": "example", "roleArn": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
kind
required
string
name
string
resultShape
string
sourceIds
Sources routed to this destination (‘rest-api’ for API-submitted docs).
Array<string>
writeTags
Attach output tags + metadata to delivered S3 objects.
boolean
url
Webhook only
string
secret
Webhook HMAC secret
string
bucket
string
prefix
string
region
string
roleArn
S3/SQS/SNS — role created from /destinations/policy.
string
Responses
Section titled “Responses”Created destination
Media typeapplication/json
object
key
additional properties
any
Examplegenerated
{}