Add a person to the project
curl --request POST \ --url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/members \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "user_id": "example", "email": "example", "project_role": "viewer" }'By user_id: a person of the project’s organisation, or of another organisation whose access request was approved. By email: any person with a WhatsBuilt account, for a project of the integration’s own organisation; the person gets an e-mail. An integration is never added this way: its address finds nothing and its id answers 404. Adding someone who is already a member answers 200 with already_member and changes nothing, so a repeat is safe. The role can be at most the integration’s own on the project.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”The body of addMember: user_id or email.
object
A person of the project’s organisation, or one whose access request was approved
Any person with a WhatsBuilt account; they get an e-mail. Only for the project’s own organisation.
A role a member route gives.
Responses
Section titled “Responses”Already a member
The answer of addMember.
object
Whether the person was added.
For an add by e-mail: whether the member got the e-mail
A live member.
object
The project.
The person.
Their name, read when answering.
Their e-mail, read when answering.
Their role on the project.
Their organisation.
Null when the member’s organisation is not readable to the principal
The member belongs to another organisation than the project’s owner
Who added them.
When they were added.
The row’s change time.
Example
{ "status": "added", "member": { "project_role": "owner", "deleted": false }}Added
The answer of addMember.
object
Whether the person was added.
For an add by e-mail: whether the member got the e-mail
A live member.
object
The project.
The person.
Their name, read when answering.
Their e-mail, read when answering.
Their role on the project.
Their organisation.
Null when the member’s organisation is not readable to the principal
The member belongs to another organisation than the project’s owner
Who added them.
When they were added.
The row’s change time.
Example
{ "status": "added", "member": { "project_role": "owner", "deleted": false }}VALIDATION_ERROR; MEMBER_OTHER_ACCOUNT: a person of another organisation needs an approved access request, or an add by e-mail
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}INSUFFICIENT_SCOPE; INSUFFICIENT_PROJECT_ROLE when the integration is not the project’s admin, or the role is above its own; MEMBER_EXTERNAL_ADD_FORBIDDEN when the project is another organisation’s; PUBLIC_API_DISABLED
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}No such project or member; MEMBER_EMAIL_NOT_FOUND when no person has the address
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}IDEMPOTENCY_KEY_REUSED: the key was used with another body
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED: the organisation’s hourly budget of adds by e-mail is spent
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}