Unsubscribe team member

Unsubscribe any team member from HelpCrunch newsletters
Written by Konstantine
Updated 6 months ago

You can programmatically unsubscribe any agent from HelpCrunch newsletters. Agents are the team member accounts that have access to your HelpCrunch account regardless of their roles and permissions.

To get a list of all agents/team members - use Get all team members method.

➡️ Request

URL https://api.helpcrunch.com/v1/agents/<agent_id>/unsubscribe
Method GET
Headers Authorization: Bearer <your_api_key>

<agent_id> is the identifier for the agent/team member as given by HelpCrunch. It is required for this method and looks like a combination of numbers, for example 1568.

Read more about authorization header here.

✅ Successful Response

If your request has succeeded, you'll get a 200 OK success status code together with the "Ok" in the response body.

🛑 Error Responses

You may get one of the following error status codes and responses. More info on the errors is available here.

401 Unauthorized

{
  "errors": [
    {
      "code": "invalid_request",
      "message": "Invalid request"
    },
    {
      "code": "unauthorized",
      "message": "Unauthorized"
    }
  ]
}

404 Not Found

{
  "errors": [
    {
      "code": "invalid_request",
      "message": "Invalid request"
    },
    {
      "code": "not_found",
      "message": "Chat not found"
    }
  ]
}

429 Too Many Requests

{
  "errors": [
    {
      "code": "invalid_request",
      "message": "Invalid request"
    },
    {
      "code": "too_many_requests",
      "message": "Too many requests"
    }
  ]
}

If you have any questions regarding the REST API, feel free to chat us any time.

👩‍💻 Happy Coding! 👨‍💻

Did this answer your question?