gray-machine-46287
10/17/2024, 2:41 PMbrief-egg-61061
10/17/2024, 2:41 PMbrief-egg-61061
10/17/2024, 2:41 PMPATCH /identities/{id}
endpoint to update an identity. When importing identities, you can provide the credentials
field and use the verifiable_addresses
field to import a verified address like an email address. Here is a sample payload for importing an identity with a verified address: json { "schema_id": "<preset://email>", "traits": { "email": "[email protected]" }, "verifiable_addresses": [ { "value": "[email protected]", "verified": true, "via": "email", "status": "completed" } ] }
You can test the above example with a cURL command: bash curl --request POST -sL \ --header "Authorization: Bearer ory_pat_xRKLsFEOUFQFVBjd6o3FQDifaLYhabGd" \ --header "Content-Type: application/json" \ --data '{ "schema_id": "<preset://email>", "traits": { "email": "[email protected]" }, "verifiable_addresses": [ { "value": "[email protected]", "verified": true, "via": "email", "status": "completed" } ] }' https://$<http://PROJECT_SLUG.projects.oryapis.com/admin/identities|PROJECT_SLUG.projects.oryapis.com/admin/identities>
Please note that you must ensure that address verification is enabled and that the verifiable_address
is present in the identity's traits. If the identity traits do not have the address set as the "verified address" type, the imported values will be deleted on the next identity update. For more information, you can refer to the [Ory Kratos documentation](https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities).gray-machine-46287
10/17/2024, 2:50 PM[
{
"path": "/verifiable_addresses/0/verified",
"op": "replace",
"value": true
},
{
"path": "/verifiable_addresses/0/status",
"op": "replace",
"value": "completed"
}
]