import requests
url = "https://api.diga.io/v1/project/{project_id}/invitation/{invitation_id}/role"
payload = { "role": "admin" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"status": "error",
"error_code": "INVITATION_NOT_FOUND",
"message": "Invitation 660e8400-e29b-41d4-a716-446655440001 not found"
}Change the role assigned to a pending invitation before it’s accepted.
import requests
url = "https://api.diga.io/v1/project/{project_id}/invitation/{invitation_id}/role"
payload = { "role": "admin" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"status": "error",
"error_code": "INVITATION_NOT_FOUND",
"message": "Invitation 660e8400-e29b-41d4-a716-446655440001 not found"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
admin, member Successful Response