Delete Contact
This endpoint soft-deletes an existing contact by ID and removes its project associations.
Endpoint
Section titled “Endpoint”DELETE /v1/contacts/contacts/:idAuthentication
Section titled “Authentication”Include your API key in the x-api-key header. See Authentication.
Required Scope
Section titled “Required Scope”contacts:writePath Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Contact ID to delete. |
Request Body
Section titled “Request Body”This endpoint does not accept a request body.
Example Request
Section titled “Example Request”curl -X DELETE "https://api.crewsum.com/v1/contacts/contacts/contact-jkl123mno4567890" \ -H "x-api-key: $CREWSUM_API_KEY"const response = await fetch( "https://api.crewsum.com/v1/contacts/contacts/contact-jkl123mno4567890", { method: "DELETE", headers: { "x-api-key": process.env.CREWSUM_API_KEY }, },);const result = await response.json();DELETE /v1/contacts/contacts/contact-jkl123mno4567890 HTTP/1.1Host: api.crewsum.comx-api-key: <your-api-key>Response
Section titled “Response”On success, the API returns HTTP 200 OK. The response has no data field.
Example Response
Section titled “Example Response”{ "message": "Successfully deleted contact contact-jkl123mno4567890"}Behavior
Section titled “Behavior”- This is a soft delete. The contact is marked
isDeleted: true. It no longer appears in List Contacts, but Get Contact still returns it. - All of the contact’s project associations are also soft-deleted. No
associations.removedwebhook event is sent for them. - The contact’s supplier associations are not changed.
- If no contact with this ID exists in your account, the API returns
404and changes nothing. Deleting a contact in your account that is already deleted returns200. - After the contact is deleted, Crewsum attempts to send the
project-contacts.deletedwebhook event. Because the associations are removed first, the contact in the payload has an emptyassociationsarray. A webhook failure does not change the response.
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
400 | {"message": "ContactID not supplied"}. The ID path segment is empty. |
404 | {"message": "Contact <id> not found"}. No contact with this ID exists in your account. Nothing is changed. |
500 | {"message": "Error deleting contact <id>"}. Crewsum could not delete the contact. |
Authentication and scope failures are described in Errors.
Related Webhooks
Section titled “Related Webhooks” project-contacts.deleted View webhook event details.