> For the complete documentation index, see [llms.txt](https://docs.samesystem.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samesystem.dev/getting-started/upcoming-change-to-api-endpoints-action-required.md).

# Upcoming change to API Endpoints – Action required

SameSystem API v1 uses a standardized URL structure to ensure that API requests are routed to the correct infrastructure. When building or maintaining an API v1 integration, always use the current URL structure described below.

### Base URL

Use the following domain for API requests:

`https://api.samesystem.com`

Avoid using environment-specific or legacy domains such as `in.samesystem.com`.

Using `api.samesystem.com` allows SameSystem to route requests to the appropriate infrastructure and enables us to make infrastructure changes without requiring changes to your integration.

### Context Token placement

For API v1 requests, the `clientToken` (or previous known as `ctx_token`)must appear immediately after **`/api/v1/`** in the URL.

The required pattern is:

`https://api.samesystem.com/api/v1/{clientToken}/...`

For example:

`https://api.samesystem.com/api/v1/c1234/departments`

The context token identifies the SameSystem client context for the request. See [**Client Tokens**](/getting-started/client-tokens.md) for more information.

This pattern is already standard for all API v2 endpoints and most API v1 endpoints, and we are now aligning all integrations accordingly.

#### Correct URL Examples

Use:

```
/api/v1/{clientToken}/something
/api/v1/{clientToken}/oauth/token
/api/v1/{clientToken}/login
/api/v1/{clientToken}/logout
/api/v1/{clientToken}/departments
```

#### Deprecated URL Patterns

Older integrations may use alternative URL structures such as:

```
/{clientToken}/api/v1/something
/api/v1/something
/api/v1/oauth/token
/api/v1/login
/api/v1/logout
/api/v1/departments
```

These URL patterns are **deprecated** and should not be used for new integrations.

Existing integrations using deprecated URL patterns should be updated to the current structure.&#x20;

### Existing Integrations

If you maintain an existing API v1 integration, we recommend reviewing the configured endpoint URLs.

Make sure that:

* `api.samesystem.com` is used as the API domain.
* The `clientToken` appears immediately after `/api/v1/`.
* No legacy URL patterns remain in the integration code.

Apart from the URL structure, the behavior of the affected endpoints remains unchanged.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.samesystem.dev/getting-started/upcoming-change-to-api-endpoints-action-required.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
