Skip to content

Customize

Give a connector by id to agents: scope is workspace (every agent), team (with target, the team's slug) or agent (with target, the agent's handle).

POST/workspaces/{workspace}/customize/connectors/{id}/grants

Returns the connector with its grants. Owners only. Recorded in the audit log.

The same reach as a skill’s: workspace gives it to every agent, team to a team’s agents (target is the team’s slug), agent to one agent (target is its handle, with or without @). A grant that is already there is returned as it is. Each agent’s Abilities tab shows the connectors that reach it, with a level per tool.

  • Authentication: Required. Send an access token as Authorization: Bearer.
  • MCP tool: customize with action grant_connector, and the same inputs
  • Scope: An access token needs workspace:admin.
Name Type Required Description
workspace string Yes The workspace’s slug.
id string Yes The connector’s id (con_…), from list_connectors.

Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.

Name Type Required Description
scope string Yes Every agent, a team’s agents, or one agent. One of workspace, team, agent.
target string No The team’s slug or the agent’s handle; nothing for workspace.
curl -X POST https://api.g1t.sh/workspaces/flagon-io/customize/connectors/con_01kq9h4k6m8p0r2t4v6x8z0b2d/grants \
-H "Authorization: Bearer $G1T_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"scope": "team",
"target": "platform"
}'

A successful request answers 200 with:

{
"id": "con_01kq9h4k6m8p0r2t4v6x8z0b2d",
"name": "linear",
"title": "Linear",
"url": "https://mcp.linear.app/mcp",
"category": "work",
"about": "Issues, projects and cycles in Linear.",
"auth": "oauth",
"state": "connected",
"problem": null,
"from": {
"kind": "directory",
"id": "linear"
},
"tools": [],
"checked_at": "2026-10-11T14:31:05.772Z",
"header_name": null,
"signed_in_as": "chase@flagon.io",
"signed_in_at": "2026-10-11T14:31:05.772Z",
"grants": [
{
"id": "cgr_01kq9h5l7n9q1s3u5w7y9a1c3e",
"scope": "workspace",
"target": null,
"label": "Every agent",
"granted_by": "syntaqx",
"granted_at": "2026-10-11T14:32:10.004Z"
},
{
"id": "cgr_01kq9k7n9q1s3u5w7y9a1c3e5g",
"scope": "team",
"target": "platform",
"label": "Platform",
"granted_by": "syntaqx",
"granted_at": "2026-10-11T15:20:02.561Z"
}
],
"added_by": "syntaqx",
"added_at": "2026-10-11T14:30:12.618Z"
}

A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.

Status Code When
401 unauthenticated A token is required, or the one sent is not valid.
403 forbidden The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository.
404 not_found It does not exist, or you cannot see it.
409 conflict The request conflicts with the current state.
422 invalid The input is not valid. message says which field and why.