POST
/
v1
/
organizations
/
{id}
/
members
Add Member to Organization with Token
curl --request POST \
  --url https://api.vertracloud.app/v1/organizations/{id}/members \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "code": "<string>",
  "role": "<string>"
}'
{
  "status": "success"
}
id
string
required
The ID of the organization to add the member to.
code
string
required
The invite token code for adding the member.
role
string
The role to assign to the new member. Must be one of: owner, admin, developer, operator, viewer. Defaults to viewer.

Response

status
string
Indicates whether the call was successful. success if successful, error if not.
{
  "status": "success"
}

Error Responses

status
string
Indicates whether the call was successful. error if not successful.
code
string
The error code indicating the reason for failure. Possible values:
  • UNAUTHORIZED: The user is not authenticated or lacks sufficient permissions.
  • INSUFFICIENT_PERMISSIONS_TO_ADD_MEMBERS: The user does not have owner or admin role to add members.
  • ORGANIZATION_NOT_FOUND: The specified organization does not exist.
  • INVALID_ROLE: The provided role is invalid.
  • ORGANIZATION_MEMBER_LIMIT_REACHED: The organization has reached its member limit.
  • INVALID_OR_EXPIRED_TOKEN: The provided invite token is invalid or expired.
  • USER_ALREADY_IN_ORGANIZATION: The user is already a member of the organization.
  • CODE_MUST_BE_STRING: The provided code is not a string.
{
  "status": "error",
  "code": "UNAUTHORIZED"
}