Add one or multiple members to a project
POST
/api/v1/projects/{project_id}/members
const url = 'https://example.com/api/v1/projects/f81d4fae-7dec-11d0-a765-00a0c91e6bf6/members';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"emails":["example"],"role":"ADMIN"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/projects/f81d4fae-7dec-11d0-a765-00a0c91e6bf6/members \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "emails": [ "example" ], "role": "ADMIN" }'Adds more new members to a project with specified roles, also it invites users to the platform if they don’t already have accounts
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project_id
required
Array<number>
Example
f81d4fae-7dec-11d0-a765-00a0c91e6bf6The ID of the project
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
emails
required
Array<string>
role
required
string
Responses
Section titled “Responses”default
Section titled “default”On success
Media typeapplication/json
object
code
required
number format: int32
data
required
Array<object>
object
id
required
Array<number>
project_allowed_device_types
required
Array<string>
project_id
required
Array<number>
role
required
string
status
required
string
user
required
object
email
required
string
family_name
required
string
given_name
required
string
id
required
string
user_id
required
string
message
required
string
pagination
required
object
total
required
number format: int64
status
required
string
Example
{ "code": "200", "data": [ { "id": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", "project_id": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6", "role": "ADMIN", "status": "PENDING" } ], "message": "success", "status": "OK"}