> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nekt.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Setup Token



## OpenAPI

````yaml POST /api/v1/sources/{source_slug}/setup-tokens/
openapi: 3.0.3
info:
  title: Nekt API
  version: v1
  description: Nekt API Documentation
  contact:
    email: support@nekt.ai
servers:
  - url: https://api.nekt.ai
security: []
paths:
  /api/v1/sources/{source_slug}/setup-tokens/:
    post:
      tags:
        - v1
      operationId: v1_sources_setup_tokens_create
      parameters:
        - in: path
          name: source_slug
          schema:
            type: string
          description: The slug of the source
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SourceSetupToken'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/SourceSetupToken'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SourceSetupToken'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceSetupToken'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SourceSetupToken:
      type: object
      description: >-
        Serializer mixin: relabels the actor as "Nekt Support" for
        customer-facing

        output when the row was produced during a support impersonation session.


        Add to any serializer whose model is an ``ImpersonationAttributedModel``
        and

        that exposes ``created_by`` and/or ``triggered_by``. The real user stays
        in the

        DB and the real agent stays in the ImpersonationSession audit trail.


        The API contract is preserved: an EXPANDED actor field returns the full

        "Nekt Support" object, while an UNEXPANDED one returns the
        ``NEKT_SUPPORT_ID``

        sentinel int — same scalar-id (integer) vs object shape as a normal
        user. We

        never return the real user's id here (the frontend would resolve it
        against the

        org and surface the impersonated customer instead of "Nekt Support").
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        token:
          type: string
          readOnly: true
        expires_in_seconds:
          type: integer
          minimum: 1
          writeOnly: true
        expires_at:
          type: string
          format: date-time
          readOnly: true
        connector_config_fields:
          nullable: true
          description: >-
            Restricts which connector config fields are visible/editable through
            this setup token. Null (the default) makes every field available,
            matching prior behavior. `false` hides a field (and its children); a
            list or object narrows availability to the named fields, recursing
            into their children with the same semantics.
        created_at:
          type: string
          format: date-time
          readOnly: true
        created_by:
          type: integer
          readOnly: true
          description: User that created this setup token (Expandable)
      required:
        - created_at
        - created_by
        - expires_at
        - id
        - token
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key authentication. Format: ''x-api-key: api_key'''

````