Skip to content

Update Association

This endpoint updates the contact role or notification level of an existing project-to-contact association. You identify the association by the project ID in the path and the contact ID in the body or query string.

PUT /v1/associations/associations/:id

Include your API key in the x-api-key header. See Authentication.

associations:write
ParameterTypeRequiredDescription
idstringYesProject ID.
ParameterTypeRequiredDescription
contactIdstringNoContact ID. Use this or contactId in the body.

You must send a JSON body with Content-Type: application/json, even when you pass contactId in the query string. Send at least {}. A request with no body returns 500.

FieldTypeRequiredDescription
contactIdstringNoContact ID. Required here if it is not in the query string. If it is in both places, the values must match.
projectIdstringNoIf provided, it must match the route id.
contactType"MANAGER" | "BACKUP_MANAGER" | "ADDITIONAL_CONTACT"NoNew contact role.
notificationLevel"NONE" | "COPY_ONLY" | "COPY_WITH_LINK"NoNew notification level.

The API does not check contactType and notificationLevel against the allowed values. Other strings are stored as sent, so send only the values listed above.

{
"contactId": "contact-jkl123mno4567890",
"notificationLevel": "COPY_WITH_LINK"
}
Terminal window
curl -X PUT "https://api.crewsum.com/v1/associations/associations/project-mno123pqr4567890" \
-H "x-api-key: $CREWSUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contactId": "contact-jkl123mno4567890",
"notificationLevel": "COPY_WITH_LINK"
}'

On success, the API returns HTTP 200 OK.

{
"message": "Successfully updated association"
}
  • Only contactType and notificationLevel can change. To associate a different project or contact, delete this association and create a new one.
  • Changing notificationLevel to COPY_WITH_LINK with this endpoint does not run the outstanding-timecard check that Create Association runs.
  • If your account has no association for the project and contact, the API returns 404 and changes nothing.
  • After the association is updated, Crewsum emits the associations.updated webhook event. A webhook delivery failure does not change the API response.
StatusMeaning
400contactId must be supplied: contactId was not in the body or the query string.
400projectId in request body must match the route id.
400contactId in request body must match the query string.
400The request had Content-Type: application/json and an empty body. Send at least {}.
404Your account has no association for the project and contact. The message is Association between <projectId> and <contactId> not found.
500The request had no JSON body.
500Crewsum could not update the association. The message is Error updating association.

Authentication and scope failures are described in Errors.