Skip to content

Another authorization for a connection that needs one: the registration held is reused when it opens, else the server registers us again.

POST
/connections/{id}/authorize
curl --request POST \
--url https://api.canopyhq.dev/connections/example/authorize \
--header 'Authorization: Bearer <token>'
id
required
string

The connection to authorize again.

The connection stands as authorizing; authorize is the URL the owner opens.

Media typeapplication/json

What a link answers: the connection as it stands, and, when the server demands an authorization, the URL the owner opens to grant it.

object
authorize
string | null
connection
required
object
auth
One of:
null
catalog
required
object
key
additional properties

A tool as advertised by its MCP server. An absent output schema stays absent.

object
description
required
string
input_schema
required
output_schema
One of:
null
endpoint
required
string
name
required

The tenant’s readable namespace for this connection’s tools.

string
result_limit
One of:
null
state

Where a connection stands: linked with its catalog, or waiting on the owner to authorize it. A linked connection whose token set was refused and could not be refreshed reads as needing authorization again.

string
Allowed values: linked authorizing needs_authorization
timeout
string | null
outcome
required

The result of applying a resource write at the door.

string
Allowed values: created replaced unchanged
Example
{
"connection": {
"auth": {
"kind": "bearer"
},
"state": "linked"
},
"outcome": "created"
}

No console token, or one that did not verify.

Only an owner of the tenant may configure it.

The tenant owns no connection by that name.

The connection is not one linked through an authorization.

The server could not be registered with; nothing changed.