PATCH
/connections/{connection_id}Authorization
bearerAuth AuthorizationBearer <token>
Your Maton API key, sent as Authorization: Bearer <MATON_API_KEY>. Create one at https://maton.ai/settings.
In: header
Path Parameters
connection_id*string
The connection's unique identifier.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH \ "https://api.maton.ai/connections/{connection_id}" \ -H "Authorization: Bearer $MATON_API_KEY" \ -H "Content-Type: application/json" \ -d '{"access_policy": {"allow": [{"method": "GET", "path": "**"}]}}'{
"connection": {
"connection_id": "string",
"status": "ACTIVE",
"creation_time": "2019-08-24T14:15:22Z",
"last_updated_time": "2019-08-24T14:15:22Z",
"url": "string",
"app": "string",
"method": "API_KEY",
"metadata": {
"granted_scopes": [
"string"
]
},
"access_policy": {
"allow": [
{
"method": "string",
"path": "gmail/v1/users/*/messages/**",
"when": {
"graphql": "query"
}
}
],
"deny": [
{
"method": "string",
"path": "gmail/v1/users/*/messages/**",
"when": {
"graphql": "query"
}
}
]
}
}
}{
"message": "Invalid app name.",
"type": "Bad Request",
"code": 400
}{
"message": "Invalid API key.",
"type": "Unauthorized",
"code": 401
}{
"message": "Resource not found.",
"type": "Not Found",
"code": 404
}{
"message": "Too many requests.",
"type": "Too Many Requests",
"code": 429
}{
"message": "Internal server error.",
"type": "Internal Server Error",
"code": 500
}