---
title: "Deprecated: use POST /plugins/app:{app}/share {workspace, api_key | all_api_keys: true}. Let a workspace's keys call through one of the caller's connections [write]"
method: POST
path: "/connectors/connections/{id}/grants"
tags: ["connectors"]
deprecated: true
---

# Deprecated: use POST /plugins/app:{app}/share {workspace, api_key | all_api_keys: true}. Let a workspace's keys call through one of the caller's connections \[write\]

`POST /connectors/connections/{id}/grants`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/connectors/connections/{id}/grants`
- Auth: HTTP bearer

> **Deprecated.**

Deprecated: use `POST /plugins/app:{app}/share {workspace, api_key | all_api_keys: true}`. Still served exactly as before; every answer carries a `Deprecation` header. The workspace is the one the request selected (X-Universe, or the credential's own). With `key_id`, only that one live key of the workspace. Granting again changes nothing. Only the connection's owner acting as themselves may grant: a workspace key, an app credential or a task pass answers 403, so no key can grant itself access. 404 for a connection that is not the caller's, or a key that is not a live key of the workspace. Sends `connector.granted` to the workspace's webhooks. Sessions in the workspace do not gain the connection: this is the service path, separate from sharing (POST /universes/{slug}/connections).

## Path parameters

- `id` string, required

## Request body

- object
  - `key_id` string: One key of the workspace (its id from GET /universes/{slug}/keys or GET /api_keys). Omitted: every key of the workspace.

## Response `201`

Created

- object
  - `grant` ConnectionGrant, required: Permission for a workspace's API keys, or one of them, to call through a connection with POST /connectors/proxy. Made and taken back only by the connection's owner.
    - `id` string, required
    - `connection_id` string, required
    - `workspace` object, required
      - `slug` string, required
      - `name` string, required
    - `key` object, nullable, required: The one key the grant is for; null when every key of the workspace may use it.
      - `id` string, required
      - `name` string, required
    - `created_at` string, date-time, required
    - `use_count` integer, required: Calls made under this grant so far.
    - `uses` object[], required: The newest calls, at most 20.
      - `key_id` string, required
      - `method` string, required
      - `host` string, required
      - `status` integer, required
      - `at` string, date-time, required

## Other responses

- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/connectors/connections/:id/grants/post.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
