> ## Documentation Index
> Fetch the complete documentation index at: https://docs.condotta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# HTTP Requests

> Make HTTP API requests: GET, POST, PUT, PATCH, DELETE, and more.

The HTTP connector lets your workflows make HTTP requests to any API endpoint. It supports all standard HTTP methods with optional authentication and custom headers.

> [!NOTE]
>
> A connection is **optional**. You can use this connector without a connection for public APIs, or configure a connection to set a base URL and authentication for reuse across requests.

## Connection setup (optional)

If you make multiple requests to the same API, configure a connection to avoid repeating the base URL and auth details:

* **Base URL**: Common prefix for all requests (e.g., `https://api.example.com`)
* **Auth Method**: `None`, `Bearer token`, `API key`, `Basic auth`, or `OAuth 2.0`
* **Token / API Key**: For bearer or API key auth
* **Username / Password**: For basic auth
* **OAuth 2.0 app**: For APIs that authorize with an access token from your own OAuth app (see below)

The connection's auth is sent as a default header on every request: `Authorization: Bearer <token>` for bearer and OAuth 2.0, `X-API-Key: <key>` for API key, and `Authorization: Basic <credentials>` for basic. A `headers` value on a tool call overrides the default.

### OAuth 2.0 (bring your own app)

Choose **OAuth 2.0** as the auth method when the API expects an access token issued by an OAuth 2.0 provider (GitHub, Google, Microsoft, HubSpot, and most SaaS APIs). You register an OAuth app with the provider and give Condotta its details; Condotta runs the authorization, stores the tokens securely and refreshes the access token before it expires.

**1. Register the redirect URI on your OAuth app**

Add this callback URL to your provider's OAuth app:

```
https://app.condotta.ai/api/connectors/oauth/callback
```

**2. Fill in the OAuth fields**

On the connection's **Configure** dialog choose **OAuth 2.0** and enter the **Authorization URL**, **Token URL**, **Client ID**, **Client Secret** and **Scopes**. Under **Advanced** you can toggle PKCE and switch client authentication between POST body and Basic header. The **Base URL** works as usual.

**3. Save & connect**

Click **Save & connect**. Condotta redirects you to the provider to consent, then stores the tokens and marks the connection **Connected**. Every request through this connection carries `Authorization: Bearer <access token>`.

> [!TIP]
>
> Editing the base URL later does not ask you to consent again. Changing the OAuth app details (URLs, client ID or secret, scopes) does, and **Reconnect** on the connection re-runs the flow at any time, for example after the provider revokes a token.

Switching the auth method from OAuth 2.0 back to a token method retires the OAuth app: the stored client secret and tokens are removed and the new token takes over.

The same bring-your-own-app flow is used for [custom MCP servers](https://docs.condotta.ai/connectors/remote-mcp-servers/custom.md).

## Tools

> [accordion] http-get: GET request
>
> **url** `string` *required*
>
> URL or path (if base URL is configured).
>
> **headers** `object`
>
> Custom HTTP headers.
>
> **timeout** `number`
>
> Request timeout in milliseconds.
>
> **failOnErrorStatus** `boolean`
>
> Fail the step when the response status is 400 or above. On for steps added in the editor, and the assistant turns it on for steps it builds. Turn it off when an error status is an expected answer (a 404 for a record that does not exist yet) and check `status` instead.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "url": "https://api.example.com/users/42",
>   "headers": {
>     "Accept": "application/json"
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": 200,
>   "statusText": "OK",
>   "headers": {
>     "content-type": "application/json; charset=utf-8",
>     "x-request-id": "req_abc123"
>   },
>   "data": {
>     "id": 42,
>     "name": "Alice Johnson",
>     "email": "alice@example.com"
>   }
> }
> ```

> [accordion] http-post: POST request
>
> **url** `string` *required*
>
> URL or path.
>
> **body** `any`
>
> Request body. If you keep the default **JSON** editor, the body is JSON-serialized with `Content-Type: application/json` auto-set. If you switch the editor to **Text** (via the ⋮ menu), the body is sent as the raw string; set your own `Content-Type` header to match (`text/plain`, `application/xml`, `application/x-www-form-urlencoded`, etc.).
>
> **headers** `object`
>
> Custom HTTP headers.
>
> **timeout** `number`
>
> Request timeout in milliseconds.
>
> **failOnErrorStatus** `boolean`
>
> Fail the step when the response status is 400 or above. On for steps added in the editor, and the assistant turns it on for steps it builds. Turn it off when an error status is an expected answer (a 404 for a record that does not exist yet) and check `status` instead.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "url": "https://api.example.com/orders",
>   "body": {
>     "customerId": "cust_8f3a",
>     "items": [
>       { "sku": "WIDGET-01", "quantity": 3 },
>       { "sku": "GADGET-05", "quantity": 1 }
>     ]
>   },
>   "headers": {
>     "X-Idempotency-Key": "ord_20240315_001"
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": 201,
>   "statusText": "Created",
>   "headers": {
>     "content-type": "application/json",
>     "location": "/orders/ord_9k2m"
>   },
>   "data": {
>     "id": "ord_9k2m",
>     "customerId": "cust_8f3a",
>     "total": 149.97,
>     "status": "pending"
>   }
> }
> ```

> [accordion] http-put: PUT request
>
> **url** `string` *required*
>
> URL or path.
>
> **body** `any`
>
> Request body. If you keep the default **JSON** editor, the body is JSON-serialized with `Content-Type: application/json` auto-set. If you switch the editor to **Text** (via the ⋮ menu), the body is sent as the raw string; set your own `Content-Type` header to match (`text/plain`, `application/xml`, `application/x-www-form-urlencoded`, etc.).
>
> **headers** `object`
>
> Custom HTTP headers.
>
> **timeout** `number`
>
> Request timeout in milliseconds.
>
> **failOnErrorStatus** `boolean`
>
> Fail the step when the response status is 400 or above. On for steps added in the editor, and the assistant turns it on for steps it builds. Turn it off when an error status is an expected answer (a 404 for a record that does not exist yet) and check `status` instead.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "url": "https://api.example.com/users/42",
>   "body": {
>     "name": "Alice Johnson",
>     "email": "alice.johnson@example.com",
>     "role": "admin"
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": 200,
>   "statusText": "OK",
>   "headers": {
>     "content-type": "application/json"
>   },
>   "data": {
>     "id": 42,
>     "name": "Alice Johnson",
>     "email": "alice.johnson@example.com",
>     "role": "admin",
>     "updatedAt": "2025-03-15T10:30:00Z"
>   }
> }
> ```

> [accordion] http-patch: PATCH request
>
> **url** `string` *required*
>
> URL or path.
>
> **body** `any`
>
> Request body. If you keep the default **JSON** editor, the body is JSON-serialized with `Content-Type: application/json` auto-set. If you switch the editor to **Text** (via the ⋮ menu), the body is sent as the raw string; set your own `Content-Type` header to match (`text/plain`, `application/xml`, `application/x-www-form-urlencoded`, etc.).
>
> **headers** `object`
>
> Custom HTTP headers.
>
> **timeout** `number`
>
> Request timeout in milliseconds.
>
> **failOnErrorStatus** `boolean`
>
> Fail the step when the response status is 400 or above. On for steps added in the editor, and the assistant turns it on for steps it builds. Turn it off when an error status is an expected answer (a 404 for a record that does not exist yet) and check `status` instead.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "url": "https://api.example.com/users/42",
>   "body": {
>     "role": "editor"
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": 200,
>   "statusText": "OK",
>   "headers": {
>     "content-type": "application/json"
>   },
>   "data": {
>     "id": 42,
>     "name": "Alice Johnson",
>     "role": "editor",
>     "updatedAt": "2025-03-15T11:45:00Z"
>   }
> }
> ```

> [accordion] http-delete: DELETE request
>
> **url** `string` *required*
>
> URL or path.
>
> **headers** `object`
>
> Custom HTTP headers.
>
> **timeout** `number`
>
> Request timeout in milliseconds.
>
> **failOnErrorStatus** `boolean`
>
> Fail the step when the response status is 400 or above. On for steps added in the editor, and the assistant turns it on for steps it builds. Turn it off when an error status is an expected answer (a 404 for a record that does not exist yet) and check `status` instead.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "url": "https://api.example.com/users/42"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": 204,
>   "statusText": "No Content",
>   "headers": {
>     "x-request-id": "req_del_xyz789"
>   },
>   "data": ""
> }
> ```

> [accordion] http-head: HEAD request
>
> Returns response headers only (no body).
>
> **url** `string` *required*
>
> URL or path.
>
> **headers** `object`
>
> Custom HTTP headers.
>
> **timeout** `number`
>
> Request timeout in milliseconds.
>
> **failOnErrorStatus** `boolean`
>
> Fail the step when the response status is 400 or above. On for steps added in the editor, and the assistant turns it on for steps it builds. Turn it off when an error status is an expected answer (a 404 for a record that does not exist yet) and check `status` instead.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "url": "https://cdn.example.com/assets/logo.png"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": 200,
>   "statusText": "OK",
>   "headers": {
>     "content-type": "image/png",
>     "content-length": "24580",
>     "cache-control": "public, max-age=86400",
>     "etag": "\"abc123def456\""
>   }
> }
> ```

> [accordion] http-request: Generic HTTP request
>
> Make a request with any HTTP method.
>
> **method** `string` *required*
>
> HTTP method: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, or `OPTIONS`.
>
> **url** `string` *required*
>
> URL or path.
>
> **body** `any`
>
> Request body. If you keep the default **JSON** editor, the body is JSON-serialized with `Content-Type: application/json` auto-set. If you switch the editor to **Text** (via the ⋮ menu), the body is sent as the raw string; set your own `Content-Type` header to match (`text/plain`, `application/xml`, `application/x-www-form-urlencoded`, etc.).
>
> **headers** `object`
>
> Custom HTTP headers.
>
> **timeout** `number`
>
> Request timeout in milliseconds.
>
> **failOnErrorStatus** `boolean`
>
> Fail the step when the response status is 400 or above. On for steps added in the editor, and the assistant turns it on for steps it builds. Turn it off when an error status is an expected answer (a 404 for a record that does not exist yet) and check `status` instead.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "method": "OPTIONS",
>   "url": "https://api.example.com/uploads",
>   "headers": {
>     "Origin": "https://app.example.com"
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "status": 204,
>   "statusText": "No Content",
>   "headers": {
>     "access-control-allow-origin": "https://app.example.com",
>     "access-control-allow-methods": "GET, POST, PUT, DELETE",
>     "access-control-allow-headers": "Content-Type, Authorization"
>   },
>   "data": ""
> }
> ```

## Error statuses

With **failOnErrorStatus** on, a response with a status of 400 or above fails the step, and the run shows the status and the reason, for example `HTTP 503: Service Unavailable`. The run then fails like any other failed step: its error handling, retries and Control Center monitors all see it.

Steps saved before the setting existed have it off. With it off, a 4xx or 5xx response is the step's result: check `{{ step.status }}` before using `{{ step.data }}`, or the workflow carries on with an error page as its data.

> [card] [Try this free for 14 days](https://preview.condotta.ai/signup)
>
> Start a 14-day trial on Band 1. At day 14, choose your band, or stop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.