Accessing the API

To access the api, you must first generate an api key in the Draft & Goal Studio. You need a valid subscription and a user role that has access to the API (e.g. Admin, Builder).

The Draft & Goal API is available at https://agents-api.prod.dng.ai/api.

Authentication

All requests to the Draft & Goal API must include an x-api-key header with your API key. You need to send your API key in the header of all requests to the API.

Content types

The Draft & Goal API always accepts JSON in request bodies and returns JSON in response bodies. You will need to send the content-type: application/json header in requests.

Examples

curl -X POST "https://agents-api.prod.dng.ai/api/v1/workflows/$WORKFLOW_ID/run" \
          --header "x-api-key: $YOUR_API_KEY" \
          --header "content-Type: application/json" \
          --data \
        '{
    "inputs": {
      "Text_0": {
        "value": "Hello world",
        "type": "text"
      }
    }
}'