HTTP/1.1 405 Method Not Allowed



I'm using API for remove a contact from company.
When I try this, I have an error : HTTP/1.1 405 Method Not Allowed. But my request is 'DELETE'...

Client error: DELETE******/contacts/?hapikey=hapiKey resulted in a 405 Method Not Allowed response

1 Reply 1
HubSpot Employee

Hi @JoffreyG

Assuming that redacted URL that you included in your query has asterisks (*) whereever you are placing an ID, it looks like you might be missing the contact ID that you want to remove. The endpoint takes 2 IDs - the company ID and the Contact ID.

So, an example URL would look like:

The first ID is the company ID and the second is the contact id. Also, be sure that you're including a content-type: application/json in your request headers.