--- title: "Call the Elaine HTTP API with cURL" slug: "api-http-requests" updated: 2026-07-31T06:51:16Z published: 2026-07-31T06:51:16Z canonical: "help.elaine.io/api-http-requests" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.elaine.io/llms.txt > Use this file to discover all available pages before exploring further. # Call the Elaine HTTP API with cURL Elaine HTTP API functions are called through one consistent endpoint pattern. Use an Elaine-issued JSON Web Token as a Bearer token and transmit function parameters as a JSON array in the order defined by the functional reference. ## Endpoint pattern ``` https:///http/api/ ``` Use HTTPS for every request. The exact domain, enabled functions, permissions, and capacity are specific to the Elaine environment. ## Minimal cURL request ```bash export ELAINE_BASE_URL="https://your-elaine-domain.example" export ELAINE_JWT="replace-with-an-elaine-issued-jwt" curl --get "$ELAINE_BASE_URL/http/api/api_getElaineVersion" \  --header "Authorization: Bearer $ELAINE_JWT" \  --data-urlencode 'json=[false]' \  --data-urlencode 'response=json' ``` Document360 displays code blocks with a copy action, so the complete request can be copied and adapted directly. ## Pass function parameters The `json` value is an array of positional function parameters. Objects and nested arrays remain JSON values inside that array. ```bash curl --get "$ELAINE_BASE_URL/http/api/api_userCreateOrUpdateStartCampaign" \  --header "Authorization: Bearer $ELAINE_JWT" \  --data-urlencode 'json=[{"c_email":"recipient@example.com","c_firstname":"Sam"},42,null,false,false,"api",1001,7]' \  --data-urlencode 'response=json' ``` ## Bearer JWT authentication JWTs must be issued by Elaine; self-issued tokens are not accepted. Store the token in a secret manager or protected runtime variable and send it in the HTTP header: ``` Authorization: Bearer ``` - Use a dedicated API identity for each integration trust boundary. - Grant only the functions required by the integration. - Set and monitor an appropriate token lifetime. - Rotate or invalidate a token when ownership or trust changes. - Never transmit tokens in URLs, payloads, logs, or browser-delivered code. ## Responses and errors Set `response=json` for a JSON-formatted result. Many functional API calls return either their documented success value or a negative Elaine error code. HTTP acceptance and function success are separate concerns: evaluate both the HTTP response and the returned function result. ## Related topics - [API reference](/new-public-docs/docs/en/api-reference) - [Return codes](/new-public-docs/docs/en/api-reference-return-codes) - [Transactional messaging API](/new-public-docs/docs/en/transactional-messaging-api) - [Campaign subscription and event API](/new-public-docs/docs/en/campaign-event-api) - [Authentication, network security, and VPN](/new-public-docs/docs/en/api-authentication-security)