José Vargas
José Vargas
Top Contributor 🌟
SendPulse Partner

Which endpoint should I use to search a company or contact by a custom attribute in the SendPulse CRM API?

Hi everyone,
I’m integrating with the SendPulse CRM API and I need to search for a company or a contact by a custom attribute (for example, “CUIT”, “NIT”, or any other field I’ve created).

Here’s what I’ve tried so far:

  • Created the custom attribute in the company module.

  • Tested several endpoints listed in the SendPulse CRM API documentation: https://sendpulse.com/integrations/api/crm

  • Sent a request like this to filter by that attribute:

{
  "attributes": [
    {
      "id": 969197,
      "expression": "=9011174417"
    }
  ]
}

However, I keep getting this error:
422 - The selected attributes.0.expression is invalid.

I also tried variations such as removing the “=”, using “like”, or switching the endpoint (/search, /filter), but none of them worked.

My questions for the community are:

  1. What is the correct endpoint (URL and HTTP method) to search companies or contacts by a custom attribute?

  2. What is the correct JSON body format for this type of filter? (For example, should I use expression, value, or another key?)

  3. Are there any limitations or conditions on custom attributes (e.g. text, number, list) that prevent this type of search?

  4. Does anyone have a working example of a successful API request that filters records by a custom attribute in SendPulse CRM?

Any help, examples, or insights would be greatly appreciated.
Thanks in advance!

Best reply by Viktoria Otroshenko

Hey José Vargas,

Please, try checking out this scheme, as it might help you:

It should look something like this:

{
    "attributes": [
        {
            "id": 123456,
            "expression": "eq",
            "value": "some value"
        }
    ]
}

Let me know if this works!

View original
1
2 replies