TypeScript
const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({role: 'member'}) }; fetch('http://localhost:4010/v1/atlas/organizations/:id/projects/:projectId/members/:userId', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
{ "success": true, "data": { "id": "<string>", "projectId": "<string>", "userId": "<string>", "role": "admin", "createdAt": "2023-11-07T05:31:56Z", "user": { "id": "<string>", "email": "<string>", "name": "<string>" } }, "meta": { "requestId": "<string>", "timestamp": "<string>" } }
Add a user as a member of a project (admin access)
admin
member
viewer
Member added successfully
true
Show child attributes
Was this page helpful?