Add Or Invite A Workspace Member
POST
/shares/workspace/members
const url = 'https://app.metakip.com/api/v1/shares/workspace/members';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","role":"viewer"}'};
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://app.metakip.com/api/v1/shares/workspace/members \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "role": "viewer" }'Adds an existing Metakip user to the owner’s workspace or sends an invitation by email. Only the workspace owner can add members.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
role
required
string
Responses
Section titled “Responses”An existing user was added to the workspace.
Media typeapplication/json
object
ok
required
boolean
memberId
string format: uuid
invitation
object
id
required
string format: uuid
targetType
required
string
targetId
required
string format: uuid
email
required
string format: email
permission
required
string
canManage
required
boolean
deliveryStatus
required
string
expiresAt
required
string format: date-time
createdAt
required
string format: date-time
message
required
string
Example
{ "ok": true, "invitation": { "targetType": "workspace", "permission": "viewer", "deliveryStatus": "pending" }}An invitation was queued for an email address without an account.
Media typeapplication/json
object
ok
required
boolean
memberId
string format: uuid
invitation
object
id
required
string format: uuid
targetType
required
string
targetId
required
string format: uuid
email
required
string format: email
permission
required
string
canManage
required
boolean
deliveryStatus
required
string
expiresAt
required
string format: date-time
createdAt
required
string format: date-time
message
required
string
Example
{ "ok": true, "invitation": { "targetType": "workspace", "permission": "viewer", "deliveryStatus": "pending" }}The API token is missing a required scope: pages:write.
Media typeapplication/json
Structured error returned when the request cannot be completed.
object
error
required
Error details for programmatic handling.
object
code
required
Stable error code.
string
message
required
Human-readable explanation.
string
Examplegenerated
{ "error": { "code": "example", "message": "example" }}