# Update a connector

Renames a connector, replaces its agent-visible description, or re-fetches its source and rebuilds the tool catalog. Connections and policy rules survive a refresh.

### PATCH `/v1/connectors/{connectorRef}`

## Authorization

`Authorization` Bearer token · header required

`Authorization: Bearer <token>` with an API key (`sfa_` prefix), an OAuth access token, a session token, or a Space machine credential (`sfm_` prefix).

or

`Authorization` OAuth2 access token · header required

OAuth 2.0 with Spacefast scopes. People use the authorization code flow; machines use client credentials.

**Scopes:** `connectors:write`

## Path parameters

**`connectorRef` string required**
- min length 1

## Query parameters

**`team` string**
- min length 1 · max length 255

## Request body

required `application/json`

- **`title` string**
  - Replacement display name.
  - min length 1 · max length 255
- **`description` string | any**
  - Replacement agent-visible description.
- `refreshSpec` boolean
  - Re-fetch the source and rebuild the tool catalog. Connections and policy rules survive it.
- `specOverrides` object[]
  - Replacement RFC 6902 JSON Patch operations. Applied on the next spec build.
  - max items 200

## Responses

### 200 Response for status 200

- **`$schema` string <uri>**
  - Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
- **`data` object required**
  - A tool source registered for one team.

#### Show properties

- **`slug` string required**
  - Stable, team-unique connector slug. Also, the namespace tools hang off.
- **`title` string required**
  - Display name, seeded from the source spec.
- **`description` string | any required**
  - What this connector reaches, in one line. Agent-visible.
- **`source` string required**
  - The kind of tool source a connector reads: an OpenAPI spec, a GraphQL endpoint, or a remote MCP server.
  - Allowed: `openapi` `graphql` `mcp`
- **`sourceUrl` string | any required**
  - Spec, endpoint, or MCP URL this connector was built from; null when it was registered from an inline spec.
- **`firstParty` boolean required**
  - Built into Spacefast. First-party connectors cannot be edited or removed.
- **`presetId` string | any required**
  - Curated preset this connector was created from when it came from the catalog.
- **`authMethods` object[] required**
  - Every way this connector can be authenticated.

#### Show properties

- **`kind` string required**
  - Names this method when a connector offers more than one.
- **`slug` string required**
  - Names this method when a connector offers more than one.
- **`label` string required**
  - What to call it in a connect form, in the provider's own words.
- **`scopes` string[] required**
  - Scopes requested at authorization unless the caller narrows them.
- **`dynamicRegistration` boolean required**
  - Whether the provider supports RFC 7591 dynamic client registration, so no client has to be pre-created.

#### Connections

- **`id` string required**
  - Connection id (`cxn_`). This is also the first segment of every tool address it owns.
- **`connector` string required**
  - Slug of the connector this connection authenticates.
- **`owner` string required**
  - `team` is shared with everyone on the team; `personal` is yours, and only within this team.
  - Allowed: `team` `personal`
- **`displayName` string required**
  - What people call this connection, e.g. "Linear (support)".
- **`description` string | any required**
  - Agent-visible note on what this connection is for. Shown to models choosing between several.
- **`status` string required**
  - Derived connection state. Never stored, so it cannot drift from the credential it describes.
  - Allowed: `pending_authorization` `active` `degraded` `needs_reauth` `revoked`
- **`credentialConfigured` boolean required**
  - Whether a usable credential is stored. The credential itself is never returned by any endpoint.
- **`authMethod` string | any required**
  - Slug of the connector auth method this connection used.
- **`isDefault` boolean required**
  - Whether this is the connection an agent gets when it names the connector alone.
- **`toolCount` integer required**
  - Tools reachable through this connection at the last sync.
- **`createdAt` string<date-time> required**
  - Token for connection created date.

## Example Request

```bash
curl -X PATCH "https://api.spacefast.com/v1/connectors/string" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "string",
  "description": "string",
  "refreshSpec": true,
  "specOverrides": [
    {
      "property1": null,
      "property2": null
    }
  ]
}'
```

## Example Response

```json
{
  "$schema": "http://example.com",
  "data": {
    "slug": "string",
    "title": "string",
    "description": "string",
    "source": "openapi",
    "sourceUrl": "string",
    "firstParty": true,
    "presetId": "string",
    "authMethods": [
      {
        "kind": "api_key",
        "slug": "string",
        "label": "string"
      }
    ],
    "toolCount": -9007199254740991,
    "connections": [
      {
        "id": "string",
        "connector": "string",
        "owner": "team",
        "displayName": "string",
        "description": "string",
        "status": "pending_authorization",
        "credentialConfigured": true,
        "authMethod": "string",
        "scopes": [
          "string"
        ],
        "isDefault": true,
        "toolCount": -9007199254740991,
        "createdBy": "string",
        "lastCheckedAt": "2019-08-24T14:15:22Z",
        "revokedAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    ],
    "specSyncedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}
```
