Getting Started With Streak's API

Looking to further customize your CRM experience? The sky's the limit (almost) with Streak's API!

The Streak API supports typical CRUD operations and uses the http method of the request to determine which operation is being performed. Typically:

  • a GET request will just return the object specified
  • a PUT will create an entity
  • a DELETE will delete an entity 
  • a POST will update an entity

Find our full API Documentation to learn about our endpoints and parameters as well as some example requests and responses and use this article to get started. 

Getting Started 

  1. From the Streak menu at the top right of your Gmail, select the Developers icon 
  2. Generate your API key and use this to access your Streak data

Note: API keys are passwords to your account, so you will want to keep it a secret! 

Creating a Box

You will first want to create your box:

curl -X PUT -d "name=NewBox" https://www.streak.com/api/v1/pipelines/{pipelinesKey}/boxes -u YOUR_API_KEY:

Then you will be able to set your box name, stage, and add a note

curl -X POST \
-d "{name:NewlyNamedBox, notes:AdditionalNotesText, stageKey:5002}" \
-u YOUR_API_KEY: \
-H "Content-Type:application/json" \
https://www.streak.com/api/v1/boxes/{boxKey}

Editing a Box

To edit specific column fields in your box, you will want to reference the fields endpoint. The box name, stage, and notes field are default fields in the pipeline that do not need to be directed at the fields endpoint, as depicted above. To update any other custom fields in your box, you will need to use it's appropriate field key. 

To find the field keys in your pipeline, you can reference:

curl 
https://www.streak.com/api/v1/pipelines/{pipelineKey}/fields -u YOUR_API_KEY:

All fields that are editable in the Streak extension UI, should be editable via the Streak API. However, these fields are formatted depending on the type of field being edited:

  • TEXT_INPUT- represented in JSON as a string.
  • DATE- represented in number of milliseconds since epoch. 
  • CHECKBOX- represented as either 'true' or 'false'
  • TAG- represented as an array of JSON Objects.
  • DROPDOWN- represented as an array of JSON Objects

Here's an example of updating a free form field, representing the value as a string:

curl  -X POST \
-d "{value:abc}"  \
-u YOUR_API_KEY: \
-H "Content-Type:application/json" \
https://www.streak.com/api/v1/boxes/{boxKey}/fields/{fieldKey}

Updates to date fields will operate the same as a free form field but you'll be sending an epoch date instead of a string. Unless otherwise noted, all date properties in JSON are specified in milliseconds since epoch (Jan 1, 1970). For example:

curl  -X POST \
-d "{value:1348441203844}"  \
-u YOUR_API_KEY: \
-H "Content-Type:application/json" \
https://www.streak.com/api/v1/boxes/{box_key}/fields/{filed_key}

Updates to a checkbox field is sent simply as "true" or "false". For example:

curl  -X POST \
-d "{value:true}"  \
-u YOUR_API_KEY: \
-H "Content-Type:application/json" \
https://www.streak.com/api/v1/boxes/{box_key}/fields/{filed_key}

Tag and dropdown columns must be updates as an array of JSON objects, and the values must first exist in the pipeline's column to be able to update in a box. To add more entries to your column, you would have to update the pipeline with the new list, with new entries having the field "added" set to true to tell the server that it's a brand new field.

[{
"key": "9001",
"name": "drop 1"
}, {
"key": "9002",
"name": "drop 2"
}, {
"name": "drop 3",
"added": true
}]

Once the tag or dropdown option has been added, you can use that options key to update the box. 

Contact Us