dev-resources.site
for different kinds of informations.
Strapi: Update user via api
Published at
9/19/2023
Categories
strapi
api
user
update
Author
GreggHume
To update a user via the api you can do the following:
// route as PUT
localhost:1337/api/users/1
// body
{
"firstname": "Mat",
"lastname": "OD"
}
// response
{
"id": 1,
"username": "matod",
"email": "[email protected]",
"provider": "local",
"confirmed": true,
"blocked": false,
"createdAt": "2023-09-18T13:25:52.248Z",
"updatedAt": "2023-09-19T18:07:03.885Z",
"firstname": "Mat",
"lastname": "OD",
"role": {
"id": 4,
"name": "Organiser",
"description": "Organisers permissions",
"type": "organiser",
"createdAt": "2023-09-19T17:12:57.632Z",
"updatedAt": "2023-09-19T17:12:57.632Z"
}
}
A note, as of writing this "populate: *" param does not work if you want to get back component or related data.
Articles
12 articles in total
AWS S3 Change Url, Proxy Url, Map to Domain in 2024
read article
Prevent body from scrolling when a modal is open : css solution
read article
Svelte 5: Slot / children example
read article
Whatsapp Webhook Setup and Nodejs Code Example
read article
Vite: How to bundle / group chunks together
read article
Payfast API: Easy Nodejs signature and headers function
read article
CSS: Fix a div center on the page
read article
Strapi: Update user via api
currently reading
Strapi: Create user via api
read article
Anyone else get bored of coding? How do you stay excited?
read article
Nextjs: How to check device serverside or know if mobile
read article
Nextjs: How to get url in getInitialProps
read article
Featured ones: