Target Audience
Broadstripes users with Project Admin permissions.API Overview
The API provides two kinds of data:- Contact Details: A JSON array of specific attributes for a list of contacts matching your Broadstripes query
- Contact Counts: A simple count of contacts matching your query
Prerequisites
To make successful API calls, you need two unique identifiers:- Authentication Token - Specific to your user account
- Project ID - The ID for the project you’re working with (API calls are project-specific)
Getting Your Credentials
Both identifiers can be obtained from the Broadstripes interface:- Click the Settings dropdown in the upper right corner
- Choose “Your project settings”
- At the top of the page, you’ll see both IDs with copy-to-clipboard icons
Retrieving Contact Details
Basic Request Structure
Here’s a sample curl command that retrieves name data for people employed by “Acme Inc”:Request Parameters Explained
-G: Tells curl to send data as part of the URL query string with GET method-H "X-Broadstripes-Authentication-Token": Authentication header with your API token-d "project_id=...": Your project ID as a query parameter-d "q=...": URL-encoded search query using Broadstripes search language-d "fields[]=...": Specifies which fields to return in the response- API Endpoint:
https://crm.broadstripes.com/api/contacts
Available Fields
You can request data from the following fields:name: The name fields of the contactevents: Events associated with the contactrelationships: Information about the contact’s relationshipscustom fields: Custom fields configured in your project. Field matching is case-insensitive.- Example:
fields%5B%5D=Signed%20Card
- Example:
external system IDs: External system values stored on contacts. Use the system’s key name, which follows the format: system name in lowercase, spaces replaced with underscores, followed by_id. Field matching is case-insensitive.
External system key name examples
| External System Name | Key Name for API |
|---|---|
| VAN | van_id |
| Acme System | acme_system_id |
| National Database | national_database_id |
Retrieving external system IDs
Here’s a sample curl command that retrieves name and VAN ID for people employed by “Acme Inc”:null in the response.
URL Encoding for Search Queries
When using Broadstripes search language in URLs, you must convert operators and special characters to URL-encoded strings:| Operator | URL Encoded | Query Example | URL Encoded Query |
|---|---|---|---|
| = | %3D | field=value | field%3Dvalue |
| != | %21%3D | field!=value | field%21%3Dvalue |
| > | %3E | field>value | field%3Evalue |
| >= | %3E%3D | field>=value | field%3E%3Dvalue |
| : | %3A | field:value | field%3Avalue |
| < | %3C | field<value | field%3Cvalue |
| <= | %3C%3D | field<=value | field%3C%3Dvalue |
| (space) | %20 | field=value1 OR field=value2 | field%3Dvalue1%20OR%20field%3Dvalue2 |
Retrieving Contact Counts
To get just the count of matching contacts, use a similar request with two key differences:- No fields parameter needed - you’re only getting a count
- Different endpoint: Use
/api/contacts/countinstead of/api/contacts