Getting Started›Introduction

Introduction

The Shape Open API is a REST API for building applications on top of Shape — create and update records, read and change statuses, look up system data, and schedule calendar events, all programmatically.

This reference is for developers writing client applications against Shape. Anything your team does by hand in the Shape UI — creating records, updating and retrieving their information, reading and changing statuses, scheduling calendar events — you can do through the API. Pick the endpoints that fit your use case; you don’t need to use all of them.

Base URL

Every request is an HTTPS call to the same base URL:

https://secure-api.setshape.com/api

Append the endpoint path to build the full URL. For example, you create a record with a POST to /add/new/lead/{crmid}:

POSThttps://secure-api.setshape.com/api/add/new/lead/{crmid}

Without the CRM ID, the request returns “404 | Page Not found.”

Use only this base URL. https://secure-api.setshape.com/api is the only supported address. Other Shape hostnames you may see in older examples aren’t supported.

Your CRM ID. Most endpoint paths end with {crmid}, your Shape system ID. Use the CRM ID that belongs to your API key. If you don’t know it, ask Shape Support.

No sandbox. Every request works on live data in your system, so use test records you can delete.

No versions. The API is not versioned.

Webhooks. Shape can send outbound webhooks to your systems, but they aren’t part of the Open API. They’re set up inside Shape: create them on the Outbound Webhooks settings page, then use triggers or drip campaigns to send them.

Your first request

curl --request GET 
  --url "https://secure-api.setshape.com/api/get/statuses/YOUR_CRM_ID" 
  --header "Authorization: YOUR_API_AUTHORIZATION_KEY" 
  --header "Accept: application/json"

A successful response (200 OK) lists your statuses, grouped:

{
  "message": "Statuses retrieved successfully",
  "statuses": [
    {
      "id": 1,
      "title": "Lead Status",
      "status": [
        { "id": 101, "title": "New Lead" },
        { "id": 102, "title": "Contacted" }
      ]
    },
    {
      "id": 2,
      "title": "Loan Status",
      "status": [
        { "id": 201, "title": "Application Received" }
      ]
    }
  ]
}

If you get a list of your statuses back, you’re set up correctly. Group and status names are your system’s own.

Conventions

  • REST over HTTP. Resources are accessed at predictable URLs using standard HTTP methods.
  • JSON in, JSON out. Send Content-Type: application/json and parse JSON responses.
  • Standard status codes. A 2xx means success, a 4xx means the request needs fixing, and a 5xx means something went wrong on Shape’s side. Retry 5xx errors after a short wait, increasing the wait each time. Before retrying Add Records, search for the record first: Shape rejects an identical Add Records request for 15 minutes. If errors continue, contact Shape Support. See Status Codes.
  • Rate limits. Each endpoint allows 20 requests per minute, and each system has a daily request limit. See Rate Limits.

Authentication

Every request must include your API Authorization Key in the Authorization header. You’ll need a Shape account; if you have one, grab your key from the API Integrations page. See Authentication for the exact header format and a complete request.

Finding field names

Request bodies use the field names defined on your marketing sources. To find them:

  1. In Shape, go to Settings → Marketing Sources.
  2. Click Edit on any marketing source.
  3. Scroll to Campaign Source Post URL Instructions at the bottom of the page.
  4. Search the table for the field you need, or use Export → CSV to download the full list.


Some endpoint paths and fields use the older term “lead” (for example, /add/new/lead and lead_id). These work with records.

Terms of use

Using the Shape API means agreeing to all Shape Software guidelines and policies — including, but not limited to, Acceptable Use, Terms of Service, Security, and Privacy, along with any other agreed-upon policies or contracts. Violations may result in immediate termination of your API access and possible legal action.