---
updatedAt: 2026-03-31T12:12:41.000Z
agentTools:
  projectIndex: https://api.net2grid.com/llms.txt
---

# /migrate/user

Migrate users from pincode to password and register them into cognito user pools.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "NET2GRID Customer Engagement API",
    "description": "This is the B2C NET2GRID API that can be used by mobile and web apps to manage the accounts and the data that are provided by the NET2GRID Meter Data Analytics Platform.",
    "version": "13.6.0"
  },
  "servers": [
    {
      "url": "http://api.net2grid.docker",
      "description": "API server"
    }
  ],
  "paths": {
    "/v2/migrate/user": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "/migrate/user",
        "description": "Migrate users from pincode to password and register them into cognito user pools.",
        "operationId": "v2postMigrateUser",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MigrateUserBodyDTO"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OkResponseDTO"
                },
                "examples": {
                  "OkResponse": {
                    "$ref": "#/components/examples/OkResponse"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request\n                <br/>264: New password not valid\n                <br/>278: Invalid credentials\n                <br/>279: Passwords should be identical\n                <br/>422: Invalid input\n                <br/>424: Invalid email address fromat\n                <br/>999: Unspecified Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "MigrateUserBodyDTO": {
        "required": [
          "email_address",
          "old_password",
          "new_password",
          "new_password_confirmed"
        ],
        "properties": {
          "email_address": {
            "description": "Email address of user to be migrated",
            "type": "string"
          },
          "old_password": {
            "description": "The current password of the user",
            "type": "string"
          },
          "new_password": {
            "description": "New password of user",
            "type": "string"
          },
          "new_password_confirmed": {
            "description": "User confirms his new password with the same value.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorDTO": {
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorResponseDTO": {
        "properties": {
          "status": {
            "type": "string"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorDTO"
          }
        },
        "type": "object"
      },
      "OkResponseDTO": {
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "examples": {
      "OkResponse": {
        "summary": "Success response",
        "value": {
          "status": "ok",
          "message": "ok"
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "bearerFormat": "JWT",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Authentication"
    }
  ],
  "x-explorer-enabled": false
}
```