Collaborators
PUT
Update one or more collaborators. The following is the JSON that is posted.
[ { "account_id": "<string>", "id": "<string>", "role": "<enum{'admin', 'editor'}>", "website_ids": [ "<string>" ] }]account_idis the unique identifier of the account which owns the collaborator.idis the unique identifier for the collaborator to update.roleis one of the following values -adminoreditor. Please see here for details.website_idsis an array of website unique identifiers. This field is only provided if theroleiseditor. Please note that this field will replace websites. To add a new website, all existing website identifiers plus the new one need to be present.
At least 1 object is required in the request.
The response is an array of objects. If the collaborator can be updated successfully, the object will have the following shape:
{ "_idx": <integer>, "id": "<string>", "account_id": "<string>", "email": "<string>", "first_name": "<string|null>", "last_name": "<string|null>", "invitation_url": "<string>", "invitation_status": "<enum{'pending', 'accepted'}>", "role": "<enum{'admin', 'editor'}>", "website_ids": [ "<string>" ]}_idxis the index in the original array of objects posted.idis the unique identifier of the collaborator.account_idis the unique identifier of the account which owns the collaborator.emailis the email address of the collaboratorfirst_nameis the Given name of the collaborator if provided by the collaborator upon signing in for the first time.last_nameis the Surname of the collaborator if provided by the collaborator upon signing in for the first time.invitation_urlis the URL sent to the collaborator so they can activate their account.invitation_statusindicates whether or not the invite has been accepted.roleis one of the following values -adminoreditor. Please see here for details.website_idsis an array of website unique identifiers. This field is only provided if theroleiseditor.
If one of the collaborators cannot be updated, the object will be an error object. If the error is a validation error, there will be a field called validation errors.
Example 1
Request for a single collaborator
Request
PUT https://api.termly.io/v1/collaborators
[ { "account_id": "acct_1234", "id": "col_12", "role": "editor", "website_ids": [ "web_12", "web_34" ] }]Response
[ { "_idx": 0, "id": "col_1", "account_id": "acct_1234", "first_name": "Collaborator", "last_name": "One", "role": "editor", "website_ids": [ "web_12", "web_34" ], "invitation_url": null, "invitation_status": "accepted" }]