Add reference
Inject a value from a provider service into a consumer’s environment variable.
Request & response examples
curl --fail-with-body --request POST \ 'https://app.helicarrier.xyz/api/services/YOUR_ID/references' \ -H "Authorization: Bearer $HELI_API_KEY" \ -H 'Content-Type: application/json' \ --data '{ "providerId": "YOUR_DATABASE_SERVICE_ID", "sourceKind": "url", "varKey": "DATABASE_URL"}'const response = await fetch( "https://app.helicarrier.xyz/api/services/YOUR_ID/references", { method: "POST", headers: { Authorization: `Bearer ${process.env.HELI_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "providerId": "YOUR_DATABASE_SERVICE_ID", "sourceKind": "url", "varKey": "DATABASE_URL" }) });const data = await response.json();if (!response.ok) { throw new Error(`HTTP ${response.status}: ${data.error}`);}// Inspect data; avoid logging secret responses.import osimport requests
response = requests.request( "POST", "https://app.helicarrier.xyz/api/services/YOUR_ID/references", headers={ "Authorization": f"Bearer {os.environ['HELI_API_KEY']}" }, json={ "providerId": "YOUR_DATABASE_SERVICE_ID", "sourceKind": "url", "varKey": "DATABASE_URL" }, timeout=30,)response.raise_for_status()data = response.json()# Inspect data; avoid logging secret responses.{ "reference": { "id": "ref_example", "consumerId": "svc_example", "providerId": "svc_database", "sourceKind": "url", "varKey": "DATABASE_URL" }, "note": ""}Illustrative values · selected fields
Path parameters
idstringrequiredThe CONSUMING service id (the app that needs the value). Databases can't consume references.
Request body
providerIdstringrequiredThe service being referenced (e.g. the database).
sourceKindstringoptionalWhich value to pull: "url" (default; full connection URL), "host", "host-port", "public-url" (web-facing services only), or "var:NAME" to copy a specific env var from the provider.
varKeystringoptionalEnv var name to inject into the consumer. Optional — defaults to a natural name for the provider.
Response 201
Returns the new reference and an optional note. Redeploy the consumer to receive the injected environment value.
Examples show selected response fields with illustrative values. Your response can contain additional fields.
referenceobjectNew reference linking a consumer to a provider.
Child fields
idstringUnique identifier of this resource.
consumerIdstringproviderIdstringsourceKindstringvarKeystring
notestringAdditional information about the result; can be empty.
Errors
400Invalid parameters. Check the required fields, types, and resource configuration.
401The API key is missing, invalid, or revoked.
403The caller or key scope does not permit this operation.
404The resource does not exist or is not visible to this caller.
409The current resource state prevents the operation. Inspect it before retrying.
add_reference
Required MCP arguments: id, providerId. Send path, query, and body fields together as tool arguments.