> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://www.buildwithorbit.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://www.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": "1446534-36e04f24-1a4e-4546-83c4-59049ae23f1b",
            "type": "endpoint"
        },
        {
            "id": "1037136-ac3a9a57-549d-4b73-b9fe-228aa65f75ab",
            "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.

## Errors

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

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

## Request

### Body (application/json)

- `task` (string, required)
- `resources` (list of object, required)
  - `id` (string, required)
  - `type` (enum, required)
    - Allowed values: `endpoint`

## Response

### 200

Successful Response

- `data` (list of object, optional)
  - `taskBrief` (string, optional)

## Examples

**Request**

```json
{
  "task": "add shipment tracking and get basketball match realtime updates",
  "resources": [
    {
      "id": "1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f",
      "type": "endpoint"
    },
    {
      "id": "1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe",
      "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)\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": "add shipment tracking and get basketball match realtime updates",
    "resources": [
        {
            "id": "1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f",
            "type": "endpoint"
        },
        {
            "id": "1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe",
            "type": "endpoint"
        }
    ]
}
headers = {"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: {'Content-Type': 'application/json'},
  body: '{"task":"add shipment tracking and get basketball match realtime updates","resources":[{"id":"1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f","type":"endpoint"},{"id":"1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe","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\": \"add shipment tracking and get basketball match realtime updates\",\n  \"resources\": [\n    {\n      \"id\": \"1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f\",\n      \"type\": \"endpoint\"\n    },\n    {\n      \"id\": \"1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe\",\n      \"type\": \"endpoint\"\n    }\n  ]\n}")

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

	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["Content-Type"] = 'application/json'
request.body = "{\n  \"task\": \"add shipment tracking and get basketball match realtime updates\",\n  \"resources\": [\n    {\n      \"id\": \"1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f\",\n      \"type\": \"endpoint\"\n    },\n    {\n      \"id\": \"1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe\",\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("Content-Type", "application/json")
  .body("{\n  \"task\": \"add shipment tracking and get basketball match realtime updates\",\n  \"resources\": [\n    {\n      \"id\": \"1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f\",\n      \"type\": \"endpoint\"\n    },\n    {\n      \"id\": \"1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe\",\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": "add shipment tracking and get basketball match realtime updates",
  "resources": [
    {
      "id": "1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f",
      "type": "endpoint"
    },
    {
      "id": "1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe",
      "type": "endpoint"
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"task\": \"add shipment tracking and get basketball match realtime updates\",\n  \"resources\": [\n    {\n      \"id\": \"1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f\",\n      \"type\": \"endpoint\"\n    },\n    {\n      \"id\": \"1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe\",\n      \"type\": \"endpoint\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift integratePublicEndpoints_example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "task": "add shipment tracking and get basketball match realtime updates",
  "resources": [
    [
      "id": "1037111-50bc4c19-97d6-4c85-949d-59bd6f24503f",
      "type": "endpoint"
    ],
    [
      "id": "1037111-6dcfabc1-ea9d-41e3-92ad-4f6b02ed4dbe",
      "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()
```