POST Create deals

Base URL: https://server-url-from-token-page.endpoint. Version: 1.2.0.

POST /api/v1/public/deals — Create deals

Read/write token required

Create an input array with name and accountId per row. Defaults: program=1; currency uses the workspace deal currency or SEK for the first deal. Omitted/empty owners inherit from the account; current account stakeholders are linked automatically. Deal program is numeric: 1=Land, 2=Expand. Land is new-customer acquisition; Expand is growth with an existing customer. Only these deal programs are accessible. Account program is a separate free-text classification, not a deal program. Updates are partial: omitted fields stay unchanged; supplied arrays replace the whole array, not append. Read and send the merged full array to append; [] clears it. accountId cannot be reassigned. Rows update/delete independently; inspect failures and retry only failed rows. Creation is not idempotent; verify saved records after a timeout.

Send the documented JSON object. Workspace scope comes exclusively from the bearer credential. Requires a read/write API credential. Check receipts before retrying a timed-out write.

JSON body fields

input (body, object[], required)

See the JSON schema for this field’s contract.

  • Minimum items: 1
  • Maximum items: 1000
name (body, string, required)

See the JSON schema for this field’s contract.

  • Minimum length: 1
program (body, 1 | 2, optional)

Deal program is numeric: 1=Land, 2=Expand. Land is new-customer acquisition; Expand is growth with an existing customer. Only these deal programs are accessible. Account program is a separate free-text classification, not a deal program.

  • Default: 1
owners (body, string[], optional)

See the JSON schema for this field’s contract.

stage (body, Deal Activation | Expansion Potential Identified | Consideration | Deal Closing | Won | Lost | Nurture | Disqualified, optional)

See the JSON schema for this field’s contract.

targetSegment (body, string, optional)

See the JSON schema for this field’s contract.

remarks (body, string, optional)

See the JSON schema for this field’s contract.

locations (body, string[], optional)

See the JSON schema for this field’s contract.

value (body, number, optional)

See the JSON schema for this field’s contract.

valueType (body, ARR | MRR, optional)

See the JSON schema for this field’s contract.

currency (body, USD | EUR | SEK | MYR | AED | SAR, optional)

See the JSON schema for this field’s contract.

activationPoint (body, string, optional)

Source or trigger that activated the opportunity.

activationPointRemarks (body, string, optional)

See the JSON schema for this field’s contract.

championStakeholder (body, string, optional)

Free-text champion label, not a stakeholder ID or association.

titleFight (body, string, optional)

Decision-authority bottleneck preventing closure.

probabilityOfClosing (body, High | Medium | Low | Closed | None, optional)

See the JSON schema for this field’s contract.

estimateCloseDate (body, string:date-time, optional)

See the JSON schema for this field’s contract.

accountId (body, string, required)

See the JSON schema for this field’s contract.

  • Pattern: ^[a-f\d]{24}$
JSON request body schema
{
  "type": "object",
  "properties": {
    "input": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1
          },
          "program": {
            "type": "number",
            "enum": [
              1,
              2
            ],
            "description": "Deal program is numeric: 1=Land, 2=Expand. Land is new-customer acquisition; Expand is growth with an existing customer. Only these deal programs are accessible. Account program is a separate free-text classification, not a deal program.",
            "default": 1
          },
          "owners": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[a-f\\d]{24}$"
            }
          },
          "stage": {
            "type": "string",
            "enum": [
              "Deal Activation",
              "Expansion Potential Identified",
              "Consideration",
              "Deal Closing",
              "Won",
              "Lost",
              "Nurture",
              "Disqualified"
            ]
          },
          "targetSegment": {
            "type": "string"
          },
          "remarks": {
            "type": "string"
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            }
          },
          "value": {
            "type": "number"
          },
          "valueType": {
            "type": "string",
            "enum": [
              "ARR",
              "MRR"
            ]
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD",
              "EUR",
              "SEK",
              "MYR",
              "AED",
              "SAR"
            ]
          },
          "activationPoint": {
            "type": "string",
            "description": "Source or trigger that activated the opportunity."
          },
          "activationPointRemarks": {
            "type": "string"
          },
          "championStakeholder": {
            "type": "string",
            "description": "Free-text champion label, not a stakeholder ID or association."
          },
          "titleFight": {
            "type": "string",
            "description": "Decision-authority bottleneck preventing closure."
          },
          "probabilityOfClosing": {
            "type": "string",
            "enum": [
              "High",
              "Medium",
              "Low",
              "Closed",
              "None"
            ]
          },
          "estimateCloseDate": {
            "type": "string",
            "format": "date-time"
          },
          "accountId": {
            "type": "string",
            "pattern": "^[a-f\\d]{24}$"
          }
        },
        "required": [
          "name",
          "accountId"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "maxItems": 1000
    }
  },
  "required": [
    "input"
  ],
  "additionalProperties": false,
  "description": "Create deals from an input array; name and accountId are required. Program defaults to 1. Owners inherit from the account when omitted/empty; all current account stakeholders are linked on creation. Currency defaults to the workspace deal currency, or SEK for the first deal. Deal program is numeric: 1=Land, 2=Expand. Land is new-customer acquisition; Expand is growth with an existing customer. Only these deal programs are accessible. Account program is a separate free-text classification, not a deal program."
}
JSON response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {}
            ],
            "description": "Deal id."
          },
          "account": {
            "description": "Compact parent account/company reference.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Deal name."
          },
          "programLabel": {
            "type": "string",
            "description": "Program label associated with the deal."
          },
          "owners": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "id": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {}
                      ]
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {}
                  ]
                }
              ]
            },
            "description": "Workspace users assigned as deal owners."
          },
          "stage": {
            "type": "string",
            "description": "Deal stage label."
          },
          "value": {
            "type": "number",
            "description": "Deal value amount."
          },
          "valueType": {
            "type": "string",
            "enum": [
              "ARR",
              "MRR"
            ],
            "description": "Deal value type, such as ARR or MRR."
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD",
              "EUR",
              "SEK",
              "MYR",
              "AED",
              "SAR"
            ],
            "description": "Deal value currency."
          },
          "championStakeholder": {
            "type": "string",
            "description": "Champion stakeholder label when maintained on the deal."
          },
          "activationPoint": {
            "type": "string",
            "description": "Where the B2B deal came from: the source, trigger, or motion that activated the opportunity."
          },
          "titleFight": {
            "type": "string",
            "description": "Current choke point to close the B2B deal: the title or decision-authority bottleneck constraining closure."
          },
          "estimateCloseDate": {
            "type": "string",
            "format": "date-time",
            "description": "Estimated close date."
          },
          "probabilityOfClosing": {
            "type": "string",
            "enum": [
              "75% and above",
              "50% to 74%",
              "25% to 49%",
              "0% to 24%",
              "Unknown"
            ],
            "description": "AI-friendly probability-of-closing bracket."
          },
          "pif": {
            "type": "object",
            "properties": {
              "score": {
                "type": "number"
              },
              "engagementBand": {
                "type": "string",
                "description": "User-facing PIF engagement-band label with emoji. This AI output field must not expose the raw engagement-band enum."
              },
              "trend": {
                "type": "string"
              },
              "momentum": {
                "type": "number"
              },
              "last30Days": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "number"
                  },
                  "engagementBand": {
                    "type": "string",
                    "description": "User-facing PIF engagement-band label with emoji. This AI output field must not expose the raw engagement-band enum."
                  },
                  "trend": {
                    "type": "string"
                  },
                  "momentum": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              },
              "last7Days": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "number"
                  },
                  "engagementBand": {
                    "type": "string",
                    "description": "User-facing PIF engagement-band label with emoji. This AI output field must not expose the raw engagement-band enum."
                  },
                  "trend": {
                    "type": "string"
                  },
                  "momentum": {
                    "type": "number"
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false,
            "description": "Headline deal PIF summary. This is media-intent scoring for the deal, not qualification or deal probability."
          },
          "activationImpact": {
            "type": "string",
            "enum": [
              "High",
              "Medium",
              "Low"
            ]
          },
          "salesImpact": {
            "type": "string",
            "enum": [
              "High",
              "Medium",
              "Low"
            ]
          },
          "locations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "activationPointRemarks": {
            "type": "string"
          },
          "targetSegment": {
            "type": "string"
          },
          "remarks": {
            "type": "string"
          },
          "activationChecklist": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "salesChecklist": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "description": "Created deal records returned by the mutation."
    }
  },
  "required": [
    "items"
  ]
}

Responses

200: Operation receipt or read result. Arrays are returned under items; scalar and null results under value.
RateLimit-Policy (header, value, optional)

Response header

RateLimit-Limit (header, value, optional)

Response header

RateLimit-Remaining (header, value, optional)

Response header

RateLimit-Reset (header, value, optional)

Response header

400: Invalid operation input or record identifiers.
400 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
401: Bearer credential is missing, expired or invalid.
401 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
402: Insufficient research credits. Add credits before retrying.
402 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
403: Write access or resource permission is required.
403 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
404: Record is not available in the credential workspace.
404 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
405: Use the documented HTTP method.
405 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
409: Revision conflict or a record has dependencies. Refetch and reconcile links before retrying.
409 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
413: Request exceeds the permitted JSON body size.
413 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
429: Rate limit exceeded. Observe Retry-After.
RateLimit-Policy (header, value, optional)

Response header

RateLimit-Limit (header, value, optional)

Response header

RateLimit-Remaining (header, value, optional)

Response header

RateLimit-Reset (header, value, optional)

Response header

429 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
500: Internal server error.
500 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
503: Service temporarily unavailable. Observe Retry-After when present.
503 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
504: Execution timed out. A write may have committed; check receipts or progress before retrying.
504 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}

Create deals

curl -X POST "https://server-url-from-token-page.endpoint/api/v1/public/deals" \
  -H "Authorization: Bearer $DOE_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "input": [
    {
      "name": "Example opportunity",
      "accountId": "507f1f77bcf86cd799439011",
      "program": 1
    }
  ]
}'
Response example
No response example is supplied. See the JSON response schema.