> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.buildwithorbit.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.buildwithorbit.ai/_mcp/server.

# Integrate Public Endpoints

POST https://api.buildwithorbit.ai/v1/integrate
Content-Type: application/json

# Integrate Public Endpoints

After selecting endpoints from `/v1/search`, send them to `/v1/integrate` along with the task you want to accomplish. It returns a **task brief** with the information and steps needed to call the selected endpoints.

## Request

`POST /v1/integrate`

```json
{
  "task": "Build an app to post current weather to Slack",
  "resources": [
        {
            "id": "urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json",
            "type": "endpoint"
        },
        {
            "id": "urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack",
            "type": "endpoint"
        }
    ]
}
```

* `task` — what you want to accomplish (max 512 characters).
* `resources` — the endpoints to integrate; each is an `id` from `/v1/search` plus its `type` (the result's `resourceType`).

Both fields are required, and every `resources` entry needs `id` and `type`

This call takes no query parameters.

## Response

The response contains one `data` entry with a `taskBrief`. The brief includes authentication requirements, base URLs, request steps, parameters, expected responses, dependencies between steps, and important considerations.
The task brief uses the selected endpoints' schemas and any shared variables, authentication settings, and descriptions defined by their parent APIs.

## Idempotency

Integrate is read-only: it generates a task brief from the referenced endpoints and never creates or mutates data, so it is safe to retry. No idempotency key is required. The generated brief's wording may vary between otherwise identical calls.

## Errors

`400` invalid input, `404` all `id`s could not be resolved, `429` rate limited, `500` server error.

Reference: https://docs.buildwithorbit.ai/api-reference/integrate-public-endpoints

## Request

### Headers

- `Orbit-Client-Name` (string, optional) — Name of the client application or agent invoking this tool (e.g. "cursor/composer-2.5", "claude/sonnet-4.6", "codex/gpt-5.6-sol", "vscode"). Used for anonymous usage analytics.

### Body (application/json)

This endpoint expects an object.

- `task` (string, required)
- `resources` (list of V1IntegratePostRequestBodyContentApplicationJsonSchemaResourcesItems, required)

## Response

### 200

Successful Response

- `data` (list of V1IntegratePostResponsesContentApplicationJsonSchemaDataItems, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `type` (string, optional)
- `title` (string, optional)
- `detail` (string, optional)
- `status` (integer, optional)
- `instance` (string, optional)

### 404 Not Found Error

Not Found

- `type` (string, optional)
- `title` (string, optional)
- `status` (integer, optional)
- `detail` (string, optional)
- `instance` (string, optional)

### 429 Too Many Requests Error

Too Many Requests

- `type` (string, optional)
- `title` (string, optional)
- `status` (integer, optional)
- `detail` (string, optional)
- `instance` (string, optional)

### 500 Internal Server Error

Internal Server Error

- `type` (string, optional)
- `title` (string, optional)
- `status` (integer, optional)
- `detail` (string, optional)
- `instance` (string, optional)

## Types

### V1IntegratePostRequestBodyContentApplicationJsonSchemaResourcesItems

- `id` (string, required)
- `type` (enum, required) — The resource's type, as returned in `/v1/search`'s `resourceType` — `endpoint` (an HTTP endpoint) or `mcp` (an MCP).
  - Allowed values: `endpoint`, `mcp`

### V1IntegratePostResponsesContentApplicationJsonSchemaDataItems

- `taskBrief` (string, optional) — Multi-line task brief with the auth, base URL, steps, and gotchas needed to call the selected endpoints.

## Examples

**Request**

```json
{
  "task": "Build an app to post current weather to slack",
  "resources": [
    {
      "id": "urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json",
      "type": "endpoint"
    },
    {
      "id": "urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack",
      "type": "endpoint"
    }
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "taskBrief": "TASK BRIEF: Two independent calls supporting a weather-to-Slack app: retrieve London weather and post a message to Slack (OpenWeatherMap and Slack Web API)\nFIT\n  Fully. The supplied requests provide both capabilities: retrieving current weather and posting a Slack message. The weather request is used to supply the content for the Slack message; no supplied requests are irrelevant.\n\nAUTH\n  OpenWeatherMap: API key supplied as the required `appid` query parameter; replace `YOUR_API_KEY` with the actual key.\n  Slack: bot token supplied in the `token` form field/header value as `{{bot_token}}`, requiring the `chat:write` scope. The Slack collection also specifies bearer authentication using the same `{{bot_token}}` credential; the request explicitly defines the `token` field.\n\nBASE URL\n  https://api.openweathermap.org  step 1\n  https://slack.com step 2\n\nSTEPS\n  1. GET /data/2.5/weather\n    Params:\n      q: required string query parameter  `London`\n      appid: required string query parameter `YOUR_API_KEY` (replace with your OpenWeatherMap API key)\n    Returns:\n      No saved response example; the request is intended to return current weather data for the specified city.\n    Threading:\n      None\n\n  2. POST /api/chat.postMessage\n    Params (application/x-www-form-urlencoded body):\n      token: required string authentication field  `{{bot_token}}`\n      channel: required string  `<string>` or a channel/private-group/IM channel identifier\n      text: string message text  `test`; replace with the weather summary to post\n      Optional disabled fields include `as_user`, `attachments`, `blocks`, `icon_emoji`, `icon_url`, `link_names`, `mrkdwn`, `parse`, `reply_broadcast`, `thread_ts`, `unfurl_links`, `unfurl_media`, and `username`.\n    Returns:\n      HTTP 200 OK with JSON fields `ok` (boolean), `channel` (string), `ts` (string), and `message` (object). The message example includes `text`, `type`, and `ts`, plus optional attachments and blocks.\n    Threading:\n      None\n\nGOTCHAS\n  - Step 1 uses `appid` in the query string, not an authorization header.\n  - Step 2 must use `application/x-www-form-urlencoded`, not JSON."
    }
  ]
}
```

**SDK Code**

```python integratePublicEndpoints_example
import requests

url = "https://api.buildwithorbit.ai/v1/integrate"

payload = {
    "task": "Build an app to post current weather to slack",
    "resources": [
        {
            "id": "urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json",
            "type": "endpoint"
        },
        {
            "id": "urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack",
            "type": "endpoint"
        }
    ]
}
headers = {
    "Orbit-Client-Name": "claude",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript integratePublicEndpoints_example
const url = 'https://api.buildwithorbit.ai/v1/integrate';
const options = {
  method: 'POST',
  headers: {'Orbit-Client-Name': 'claude', 'Content-Type': 'application/json'},
  body: '{"task":"Build an app to post current weather to slack","resources":[{"id":"urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json","type":"endpoint"},{"id":"urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack","type":"endpoint"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go integratePublicEndpoints_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.buildwithorbit.ai/v1/integrate"

	payload := strings.NewReader("{\n  \"task\": \"Build an app to post current weather to slack\",\n  \"resources\": [\n    {\n      \"id\": \"urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json\",\n      \"type\": \"endpoint\"\n    },\n    {\n      \"id\": \"urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack\",\n      \"type\": \"endpoint\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Orbit-Client-Name", "claude")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby integratePublicEndpoints_example
require 'uri'
require 'net/http'

url = URI("https://api.buildwithorbit.ai/v1/integrate")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Orbit-Client-Name"] = 'claude'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"task\": \"Build an app to post current weather to slack\",\n  \"resources\": [\n    {\n      \"id\": \"urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json\",\n      \"type\": \"endpoint\"\n    },\n    {\n      \"id\": \"urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack\",\n      \"type\": \"endpoint\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java integratePublicEndpoints_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.buildwithorbit.ai/v1/integrate")
  .header("Orbit-Client-Name", "claude")
  .header("Content-Type", "application/json")
  .body("{\n  \"task\": \"Build an app to post current weather to slack\",\n  \"resources\": [\n    {\n      \"id\": \"urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json\",\n      \"type\": \"endpoint\"\n    },\n    {\n      \"id\": \"urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack\",\n      \"type\": \"endpoint\"\n    }\n  ]\n}")
  .asString();
```

```php integratePublicEndpoints_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.buildwithorbit.ai/v1/integrate', [
  'body' => '{
  "task": "Build an app to post current weather to slack",
  "resources": [
    {
      "id": "urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json",
      "type": "endpoint"
    },
    {
      "id": "urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack",
      "type": "endpoint"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'Orbit-Client-Name' => 'claude',
  ],
]);

echo $response->getBody();
```

```csharp integratePublicEndpoints_example
using RestSharp;

var client = new RestClient("https://api.buildwithorbit.ai/v1/integrate");
var request = new RestRequest(Method.POST);
request.AddHeader("Orbit-Client-Name", "claude");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"task\": \"Build an app to post current weather to slack\",\n  \"resources\": [\n    {\n      \"id\": \"urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json\",\n      \"type\": \"endpoint\"\n    },\n    {\n      \"id\": \"urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack\",\n      \"type\": \"endpoint\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift integratePublicEndpoints_example
import Foundation

let headers = [
  "Orbit-Client-Name": "claude",
  "Content-Type": "application/json"
]
let parameters = [
  "task": "Build an app to post current weather to slack",
  "resources": [
    [
      "id": "urn:orbit:endpoint:v1:1OYrNvmw0qAUVtV7jNU3tC3kuCIFbpjpfGZuyexkHTlZg60P7mpN4cYzSm9XW:weatherapi-com:current-weather-json",
      "type": "endpoint"
    ],
    [
      "id": "urn:orbit:endpoint:v1:1Jgb5F43F8b9al2a64G1srYRVxJ3SKnSepsgceU9aKzl1nnJeNHWFxEudTUMG:slack:send-message-to-slack",
      "type": "endpoint"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.buildwithorbit.ai/v1/integrate")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```