---
title: "Create external sync token"
method: POST
path: "/zones/{zoneId}/external-sync-tokens"
tags: ["External Sync Tokens"]
---

# Create external sync token

`POST /zones/{zoneId}/external-sync-tokens`

## Request

- Base URL: `https://docs.keycard.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.keycard.ai/zones/{zoneId}/external-sync-tokens`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Client credentials
    - Token URL: `/service-account-token`

Creates a token an identity provider can use to provision users into this zone over SCIM. The zone must have `external_sync_enabled` set and a `user_identity_provider_id` configured; otherwise the request fails with 400.

The token value is returned only in this response and cannot be retrieved later. Multiple tokens can be active at once: to rotate, create a new token, then delete the old one.

## Path parameters

- `zoneId` string, required

## Response `200`

A new external sync token, including the token value. The value is returned only in this response.

- IamExternalSyncTokenCreateResponse: Token an identity provider uses to provision users and groups into a zone over SCIM. The token value is returned once, when the token is created, and is never returned again.
  - `id` string, required: Unique identifier of the token
  - `organization_id` string, required: Organization that owns this token
  - `zone_id` string, required: Zone this token provisions users into
  - `provider_id` string, required: Identity provider this token provisions users for
  - `last_used_at` string, date-time, nullable, required: When the token was last used. `null` if it has never been used.
  - `created_at` string, date-time, required: Entity creation timestamp
  - `updated_at` string, date-time, required: Entity update timestamp
  - `token` string, required: The token value to configure in the identity provider. Returned only when the token is created.

## Other responses

- `400`: Error response
- `404`: Error response
- `default`: Error response

## Changes

- **2026-10-16** `0cfaff865771`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/keycardai/apis/untitled-api/changes/zones/:zoneId/external-sync-tokens/post.md)

---

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