Add a Member to a Project

POST/api/project-members

The project and the user must both exist. Staff users can join any project; a client contact can only join a project of their own client, which is the rule the RISE project screen applies. Adding somebody who was removed earlier restores their original membership row, so the id stays the same and no duplicate is created.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
project_id Number Mandatory Project ID
user_id Number Mandatory User ID of the member
is_leader Number optional Optional 0 or 1, defaults to 0
curl -X POST "https://yoursite.com/api/project-members" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "...", "user_id": "..." }'

Success-Response:

HTTP/1.1 201 Created
{ "status": 200, "messages": { "success": "The record has been saved." }, "id": 6 }

Already-A-Member:

HTTP/1.1 400 Bad Request
{ "status": false, "messages": { "user_id": "This user is already a member of the project." } }

Not-Allowed:

HTTP/1.1 400 Bad Request
{ "status": false, "messages": { "user_id": "A client contact can only be added to a project of their own client." } }
MethodPOST
Path/api/project-members
GroupProject Members
Sincev1.0.0
Defined inRestApi/Controllers/ProjectMembersController.php