Sync the tools
Re-reads one endpoint’s manifest. Pass its exact URL when more than one endpoint is connected. The URL may be omitted when there is exactly one. Answers as soon as the sync is scheduled, so read the endpoints back for what it found.
Syncs have their own limit of 60 an hour per organization, with a burst of 10. Past it, this returns 429 rate_limited with “Too many requests. Wait a moment and try again.” An OAuth token needs an admin or owner.
POST
/tool-endpoints/syncAuthorization
AuthorizationBearer token · headerrequiredA MEDIAN_KEY from Settings under API. It starts with `median_key_` and stays on your server. The tool endpoint routes also accept an OAuth access token (`median_oat_`) from `median login` or an MCP client, acting as the person who approved it. The messaging routes accept only a Median key.
Query parameters
urlstringThe exact endpoint URL to sync. Required when more than one is connected.
Responses
202The sync was scheduled.
okboolean400`no_endpoint`: no tool endpoint is connected. `endpoint_required`: several are connected and no `url` was sent.
errorobjectrequiredShow propertiesHide properties
codestringrequiredBranch on this rather than on the message.
messagestringrequired401`missing_api_key`: no bearer token. `invalid_api_key`: the key matches no organization or was revoked. `publishable_key`: a `median_pk_` key was sent. `invalid_token`: the OAuth token is unknown or expired.
errorobjectrequiredShow propertiesHide properties
codestringrequiredBranch on this rather than on the message.
messagestringrequired403With an OAuth token, `forbidden` when the person is not an admin or owner, and `no_organization` when no organization is bound.
errorobjectrequiredShow propertiesHide properties
codestringrequiredBranch on this rather than on the message.
messagestringrequired404`endpoint_not_found`: the `url` matches no connected endpoint.
errorobjectrequiredShow propertiesHide properties
codestringrequiredBranch on this rather than on the message.
messagestringrequired429The organization's API allowance for this class of request is used up. Wait the `Retry-After` header's seconds. Limits depend on the plan. See [rate limits](/api/errors-and-limits#rate-limits).
errorobjectrequiredShow propertiesHide properties
codestringrequiredBranch on this rather than on the message.
messagestringrequiredRequest
curl -X POST "https://api.median.sh/v1/tool-endpoints/sync" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.median.sh/v1/tool-endpoints/sync", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
{
"ok": true
}{
"error": {
"code": "endpoint_required",
"message": "Pass the endpoint URL to sync when more than one is connected."
}
}{
"error": {
"code": "invalid_api_key",
"message": "That Median key does not match any organization. Copy the median_key_ key again from Settings under API."
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "rate_limited",
"message": "Your organization's API allowance is temporarily full. Please retry shortly."
}
}