---
title: "Reconnect an account"
method: POST
path: "/v1/connectors/connections/{connectionId}/reconnect"
tags: ["Connectors"]
---

# Reconnect an account

`POST /v1/connectors/connections/{connectionId}/reconnect`

## Request

- Base URL: `https://api.spacefast.com`
- URL: `https://api.spacefast.com/v1/connectors/connections/{connectionId}/reconnect`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.spacefast.com/v1/auth/oauth2/authorize`, token URL `https://api.spacefast.com/v1/auth/oauth2/token`; client credentials, token URL `https://api.spacefast.com/v1/auth/oauth2/token`, scopes: `connectors:write`)

Re-authorizes a connection that already exists. Same three-arm answer as connecting — `connected`, `authorization_required`, or `input_required` — but the connection keeps its id, label, policies, and Space bindings, and the callback route finishes it. A disconnected connection cannot be reconnected.

## Path parameters

- `connectionId` string, required: Connection id (`cxn_`).

## Query parameters

- `team` string: Team id or slug to act for. Required only when the credential could act for more than one team.

## Request body

- object
  - `credential` union: The replacement credential. Omit it and the server tells you what it needs — for OAuth that is usually nothing.
    - object
      - `kind` 'api_key', required
      - `value` string, required: The key. Write-only: sealed on arrival, never returned by any endpoint.
    - object
      - `kind` 'fields', required
      - `values` object, required: Values keyed by the field names the connector asked for. Write-only, same as a key.

## Response `200`

Response for status 200

- object
  - `$schema` string, uri: Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
  - `data` union, required: The three ways connecting can end. Branch on `status`; there is no fourth.
    - object
      - `status` 'connected', required: Done. The connection is usable now.
      - `connection` object, required: A configured instance of a connector, with a credential the control plane holds and never hands out.
        - `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` 'team' | 'personal', required: `team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection.
        - `serving` boolean, required
        - `displayName` string, required: What people call this connection, e.g. "Linear (support)".
        - `description` string, nullable, required: Agent-visible note on what this connection is for. Shown to models choosing between several.
        - `status` 'pending_authorization' | 'active' | 'degraded' | 'needs_reauth' | 'revoked', required: Derived connection state. Never stored, so it cannot drift from the credential it describes.
        - `identityLabel` string, nullable, required: Account label reported by the provider, when it identifies itself. Null until the first successful probe.
        - `credentialConfigured` boolean, required: Whether a usable credential is stored. The credential itself is never returned by any endpoint.
        - `authMethod` string, nullable, required: Slug of the connector auth method this connection used.
        - `scopes` string[], required: Scopes actually granted, when the provider reports them.
        - `scopesKnown` boolean: False when the provider did not report the granted scope set.
        - `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.
        - `createdBy` string, nullable, required: User who connected it; null for first-party connections Spacefast owns.
        - `lastCheckedAt` string, date-time, nullable, required: Last health probe.
        - `revokedAt` string, date-time, nullable, required: When it was disconnected. The credential is purged; the row tombstones.
        - `createdAt` string, date-time, required
        - `updatedAt` string, date-time, required
    - object
      - `status` 'authorization_required', required: Send the user to `authorizeUrl`; the callback completes it.
      - `connection` object, required: Already created, in `pending_authorization`, so it has an id to watch.
        - `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` 'team' | 'personal', required: `team` is shared with everyone on the team; `personal` is yours, and only within this team — connecting the same account for another team is another connection.
        - `serving` boolean, required
        - `displayName` string, required: What people call this connection, e.g. "Linear (support)".
        - `description` string, nullable, required: Agent-visible note on what this connection is for. Shown to models choosing between several.
        - `status` 'pending_authorization' | 'active' | 'degraded' | 'needs_reauth' | 'revoked', required: Derived connection state. Never stored, so it cannot drift from the credential it describes.
        - `identityLabel` string, nullable, required: Account label reported by the provider, when it identifies itself. Null until the first successful probe.
        - `credentialConfigured` boolean, required: Whether a usable credential is stored. The credential itself is never returned by any endpoint.
        - `authMethod` string, nullable, required: Slug of the connector auth method this connection used.
        - `scopes` string[], required: Scopes actually granted, when the provider reports them.
        - `scopesKnown` boolean: False when the provider did not report the granted scope set.
        - `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.
        - `createdBy` string, nullable, required: User who connected it; null for first-party connections Spacefast owns.
        - `lastCheckedAt` string, date-time, nullable, required: Last health probe.
        - `revokedAt` string, date-time, nullable, required: When it was disconnected. The credential is purged; the row tombstones.
        - `createdAt` string, date-time, required
        - `updatedAt` string, date-time, required
      - `authorizeUrl` string, uri, required: Provider authorization page. Open it in a window you reserved beforehand.
      - `expiresAt` string, date-time, required: After this the authorization attempt is dead; start over.
    - object
      - `status` 'input_required', required: Nothing was created. Collect these values and call again.
      - `connector` string, required: Connector slug this applies to.
      - `authMethod` string, required: Auth method the fields belong to. Send it back on the next call.
      - `fields` object[], required: What to ask for, in the order to ask.
        - `name` string, required: Field key to send back in `credential.values`.
        - `required` boolean: Whether this field must be filled before connecting. Defaults to true.
        - `label` string, required: What to show above the input.
        - `secret` boolean, required: Whether the value is a secret: mask it in UI, never log it, never echo it back.
        - `guidance` object, nullable, required: Provider-supplied help for one credential, shown next to the field asking for it.
          - `label` string, nullable, required: The provider’s display label for this credential.
          - `mintUrl` string, nullable, required: Page on the provider where the credential is created.
          - `docsUrl` string, nullable, required: Provider documentation for this credential.
          - `notes` string, nullable, required: Setup notes: prerequisites, plan requirements, scopes to tick.
          - `steps` string[], required: Ordered steps to get the credential, when the provider spells them out.

## Other responses

- `default`: Problem details (RFC 9457). Any 4xx/5xx response is one `application/problem+json` document.

---

[API](https://skmtc.dev/spacefast/apis/spacefast-api.md) · [All operations](https://skmtc.dev/spacefast/apis/spacefast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spacefast/apis/spacefast-api/revisions/bd165bc7c983?raw)
