---
title: "Copy developers"
url: "https://nov18-dev.movespot.fyi/apis/internal-kauth-portal-1/versions/9b4648a1-50a5-4149-a848-b383fbc07577/operations/copy-developers"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/internal-kauth-portal-1/versions/9b4648a1-50a5-4149-a848-b383fbc07577.md

# Copy developers

`POST` `/portals/developer-copy`

Operation ID: `copy-developers`

Copy developers from a v2 portal to a v3 portal.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Developers copy is successful
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Internal Kauth-Portal
  version: 1.0.2
servers:
  - url: http://kauth-portal-v2.kauth.svc.cluster.local:8080/v1
    description: Kauth-Portal API internal server endpoint
paths:
  /portals/developer-copy:
    post:
      operationId: copy-developers
      summary: Copy developers
      description: Copy developers from a v2 portal to a v3 portal.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CopyDevelopersRequest"
            examples:
              CopyDevelopersRequestExample:
                $ref: "#/components/examples/CopyDevelopersRequestExample"
      responses:
        "201":
          description: Developers copy is successful
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CopyDevelopersResponse"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
      tags:
        - Developers
security:
  - konnectAccessToken: []
components:
  schemas:
    CopyDevelopersRequest:
      description: Request schema for copying developers from a v2 portal to a v3 portal.
      type: object
      properties:
        source_portal_id:
          description: The UUID of the source v2 portal.
          type: string
          format: uuid
          example: 847a6076-a8cd-41c3-a325-8711e1307a5c
        target_portal_id:
          description: The UUID of the target v3 portal.
          type: string
          format: uuid
          example: 6afc2b95-b6dd-4ff3-8a8f-36865b3979f4
        overwrite_developers:
          description: If true, existing developers in the destination portal with the
            same email will be updated to match the source portal developer
            data. If false, existing developers with the same email will not be
            modified.
          type: boolean
          example: true
      required:
        - source_portal_id
        - target_portal_id
        - overwrite_developers
      title: Copy Developers Request
    CopyDevelopersResponse:
      description: Response schema after copying developers.
      type: object
      properties:
        developer_count:
          description: The number of developers processed (inserted or updated) during the
            copy operation.
          type: integer
          example: 42
      title: Copy Developers Response
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurrences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurrence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
  examples:
    CopyDevelopersRequestExample:
      summary: Copy developers request example
      value:
        source_portal_id: 847a6076-a8cd-41c3-a325-8711e1307a5c
        target_portal_id: 6afc2b95-b6dd-4ff3-8a8f-36865b3979f4
        overwrite_developers: true
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
    NotFoundExample:
      value:
        status: 404
        title: Not Found
        instance: kong:trace:6816496025408232265
        detail: Not Found
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            NotFoundExample:
              $ref: "#/components/examples/NotFoundExample"
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI authenticate with.
```
