POST
/
agent
curl --request POST \
  --url https://{api-address}.org.machina.gg/agent \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "name": "my-new-agent",
  "title": "My New Agent",
  "description": "Your agent description",
  "context": {
    "config-frequency": 0.04
  },
  "workflows": [
    {
      "name": "sync-nba-embeds",
      "description": "sync-nba-embeds",
      "inputs": {
        "event_code": "$.get('\''event_code'\'') or None"
      },
      "outputs": {
        "sync-nba-embeds-status": "$.get('\''workflow-status'\'', False)"
      }
    }
  ],
  "status": "inactive"
}'
{
  "data": {
    "id": "67db52c32ae92018b93310a1"
  },
  "meta": {
    "code": 200
  },
  "status": "success"
}

Authorizations

x-api-token
string
header
required

API key authentication

Body

application/json

Response

200
application/json

Agent created successfully

The response is of type object.

POST
/
agent
curl --request POST \
  --url https://{api-address}.org.machina.gg/agent \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '{
  "name": "my-new-agent",
  "title": "My New Agent",
  "description": "Your agent description",
  "context": {
    "config-frequency": 0.04
  },
  "workflows": [
    {
      "name": "sync-nba-embeds",
      "description": "sync-nba-embeds",
      "inputs": {
        "event_code": "$.get('\''event_code'\'') or None"
      },
      "outputs": {
        "sync-nba-embeds-status": "$.get('\''workflow-status'\'', False)"
      }
    }
  ],
  "status": "inactive"
}'
{
  "data": {
    "id": "67db52c32ae92018b93310a1"
  },
  "meta": {
    "code": 200
  },
  "status": "success"
}

Authorizations

x-api-token
string
header
required

API key authentication

Body

application/json

Response

200
application/json

Agent created successfully

The response is of type object.