API Interactions

The CRE SDK provides an HTTP client that allows your workflows to interact with external APIs. Use it to fetch offchain data, send results to other systems, or trigger external events.

These guides will walk you through the common use cases for the HTTP client.

CRE reports over HTTP

A CRE report is a DON-signed package your workflow creates with runtime.report() (TypeScript) or runtime.GenerateReport() (Go). It contains your encoded payload, workflow metadata, and cryptographic signatures. It is not a Data Streams report—those come from a different product.

Most secure HTTP integrations use two roles:

flowchart LR
  subgraph sender ["Sender workflow (this guide's focus)"]
    A[Trigger] --> B[Your logic]
    B --> C["runtime.report()"]
    C --> D["sendReport() → HTTP POST"]
  end
  subgraph receiver ["Receiver (separate system)"]
    D --> E[Your API or CRE HTTP trigger]
    E --> F["Report.parse() before trusting data"]
  end
StepWhoWhat happens
1Sender (CRE workflow)Run business logic, encode payload
2Senderruntime.report() — DON agrees and signs
3SendersendReport() — POST report bytes to your URL
4ReceiverVerify signatures, then use payload — see Verifying CRE Reports Offchain

You do not download a report from elsewhere before submitting. The sender workflow creates it in step 2. Validation always happens on the receiver side (CRE workflow, your API, or an onchain forwarder).

Guides

Get the latest Chainlink content straight to your inbox.