Skip to main content
POST
/
v1
/
project_automation
Create project_automation
curl --request POST \
  --url https://api.braintrust.dev/v1/project_automation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "config": {
    "event_type": "logs",
    "btql_filter": "<string>",
    "interval_seconds": 1296000.5,
    "action": {
      "type": "webhook",
      "url": "<string>"
    }
  },
  "description": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "config": {
    "event_type": "logs",
    "btql_filter": "<string>",
    "interval_seconds": 1296000.5,
    "action": {
      "type": "webhook",
      "url": "<string>"
    }
  },
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created": "2023-11-07T05:31:56Z",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key] to your HTTP request. You can create an API key in the Braintrust organization settings page.

Body

application/json

Any desired information about the new project_automation object

project_id
string<uuid>
required

Unique identifier for the project that the project automation belongs under

name
string
required

Name of the project automation

config
object
required

The configuration for the automation rule

description
string | null

Textual description of the project automation

Response

Returns the new project_automation object

id
string<uuid>
required

Unique identifier for the project automation

project_id
string<uuid>
required

Unique identifier for the project that the project automation belongs under

name
string
required

Name of the project automation

config
object
required

The configuration for the automation rule

user_id
string<uuid> | null

Identifies the user who created the project automation

created
string<date-time> | null

Date of project automation creation

description
string | null

Textual description of the project automation