Update primary email

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Logto API references MCP server": {
  "url": "https://openapi.logto.io/mcp"
}
Close
POST /api/my-account/primary-email

Update primary email for the user, a logto-verification-id in header is required for checking sensitive permissions, and a new identifier verification record is required for the new email ownership verification.

application/json

Body Required

  • email string(regex) Required

    The new email for the user.

    Format should match the following pattern: /^\S+@\S+\.\S+$/.

  • newIdentifierVerificationRecordId string Required

    The identifier verification record ID for the new email ownership verification.

Responses

  • 204

    The primary email was updated successfully.

  • 400

    The new verification record is invalid.

  • 401

    Unauthorized

  • 403

    Permission denied, the verification record is invalid.

  • 422

    Unprocessable Content

POST /api/my-account/primary-email
curl \
 --request POST 'https://[tenant_id].logto.app/api/my-account/primary-email' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"email":"string","newIdentifierVerificationRecordId":"string"}'
Request examples
{
  "email": "string",
  "newIdentifierVerificationRecordId": "string"
}