---
title: "Exchange Auth Code"
method: POST
path: "/link/exchange"
tags: ["Auth"]
---

# Exchange Auth Code

`POST /link/exchange`

Exchanges a temporary authorization code for a permanent access token.
See the [Getting Started guide](/how-to-guides/getting-started) for more details.

## Headers

- `x-trackstar-api-key` string, required

## Request body

- ExchangeInputSchema
  - `auth_code` string, required — The authorization code returned from the frontend after a user installs an integration.
  - `customer_id` string, nullable — An identifier for your end customer.

## Response `200`

Successful response

- ExchangeResponseShipbob
  - `access_token` string, required — The permanent access token for the integration used to make requests to the Trackstar API.
  - `connection_id` string, required — A unique connection ID for the integration.
  - `integration_name` string, required — The name of the integration that was installed.
  - `customer_id` string, nullable, required — An identifier for your end customer.
  - `available_actions` string[], required — A list of actions that the integration supports.
  - `me` object, nullable, required — Information that helps identify the connected account. If null, the integration does not provide this information.

## Other responses

- `422` — Validation error

---

[API](https://skmtc.net/trackstarhq/apis/trackstar-api.md) · [All operations](https://skmtc.net/trackstarhq/apis/trackstar-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trackstarhq/trackstar-api/versions/4bc5c6e1a8bf/schema)
