Skip to main content
POST
/
expression
/
recipes
Create recipe
curl --request POST \
  --url https://api.getcargo.io/v1/expression/recipes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "category": "other",
  "isPublic": true,
  "placeholders": [
    {
      "slug": "<string>",
      "name": "<string>",
      "kind": "string",
      "description": "<string>"
    }
  ],
  "expression": "<string>",
  "kind": "jsExpression",
  "instructTo": "ai"
}
'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body schema.

name
string
required

Recipe name.

description
string
required

Recipe description.

category
enum<string>
required

Recipe category.

Available options:
other,
classification,
cleaning,
marketing,
sales,
event,
copywriting
isPublic
boolean
required

Whether the recipe is public.

placeholders
Placeholders · object[]
required

Recipe placeholders.

expression
string
required

Recipe expression.

kind
enum<string>
required

Expression kind.

Available options:
jsExpression,
templateExpression
instructTo
enum<string>
required

Instruction target.

Available options:
ai,
none

Response

Successful response

The response is of type object.