Use this file to discover all available pages before exploring further.
Just ask your agent. The easiest way to connect APIs is to tell your agent what you need:
“Connect to the JSONPlaceholder API”
“Add access to my company’s internal API”
“Set up the weather API with my API key”
The agent handles configuration, credentials, and validation automatically.
API sources provide a flexible HTTP tool that lets your agents connect to virtually any REST API. If a service has an API, your agent can use it - no MCP server required.
Craft Agents will hit the base URL, read the WWW-Authenticate header, discover OAuth metadata, dynamically register a client, and start the authorization flow. No oauth config block needed.
Client secret (not required for public PKCE clients)
oauth.scopes
No
Requested OAuth scopes
oauth.audience
No
Auth0-style audience parameter
oauth.extraParams
No
Additional authorization URL params
Full OAuth 2.0 flow with PKCE in both modes. Tokens are automatically refreshed and sent as Authorization: Bearer {token}.
For Google, Microsoft, and Slack APIs, Craft Agents has built-in OAuth support with predefined scopes — you don’t need to configure the oauth block manually. Just set the appropriate provider field.
Sends multiple credentials as separate headers. Each header name in the array gets its own input field during authentication. All headers are included in every API request.
Use multi-header authentication when an API requires two or more authentication headers simultaneously. This is common for services that separate identity from authorization, or require both an API key and an application secret.
Common use cases:
Datadog: DD-API-KEY + DD-APPLICATION-KEY
APIs with identity + signing keys: Separate API key and secret
Services with app + user credentials: Application key plus user token
The testEndpoint field specifies an endpoint used to verify the connection works. When you test a source, Craft Agents makes a request to this endpoint to confirm:
The base URL is reachable
Authentication credentials are valid
The API responds correctly
Common test endpoints:
API Type
Test Endpoint
Health check
/health
User info
/me, /user
API status
/status, /ping
Choose a lightweight endpoint that requires authentication. This validates both connectivity and credentials in one request.
For bearer-token APIs that provide their own token renewal endpoint (not OAuth), you can configure automatic token refresh with the optional renewEndpoint field. When the token expires, Craft Agents calls this endpoint to get a fresh token — no manual re-authentication needed.
Renew URL — relative path (resolved against baseUrl) or absolute URL
method
No
"POST"
HTTP method ("GET" or "POST")
body
No
—
Request body. Use {{token}} as placeholder for the current access token
headers
No
—
Extra headers. {{token}} substitution applies here too
tokenField
No
"access_token"
JSON field name for the new token in the response
expiresInField
No
"expires_in"
JSON field name for expiry in seconds
fallbackTtlSecs
No
—
Fallback TTL when the response doesn’t include expiry
When body is omitted, the current token is sent via the Authorization header. When body is provided, {{token}} placeholders in string values are replaced with the current token (supports nested objects).
This is for APIs with custom renewal endpoints, not OAuth. For OAuth-based APIs, use authType: "oauth" instead — tokens are refreshed automatically via the standard OAuth flow.
Use MCP sources when available for richer integration with predefined tools. Use API sources for services without MCP support or when you need flexible HTTP access.
Need Google, Microsoft, or Slack? Craft Agents has built-in OAuth support for these services with predefined scopes. Just ask your agent to “connect Google Calendar” or “add Slack” and it will walk you through the OAuth flow.Need any other OAuth provider? Use authType: "oauth" with the oauth config block to connect GitHub, Linear, Notion, Spotify, or any other OAuth 2.0 service.