Salesly API
API Reference

Create multiple opportunities (max 50)

POST
/opportunities/batch

Authorization

x-api-key<token>

Your tenant API key

In: header

Request Body

application/jsonRequired
data
Required
array<object>
curl -X POST "https://rest.salesly.app/api/v1/developers/opportunities/batch" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "data": [
      {
        "enterprise_identifier": "string",
        "user_email": "[email protected]",
        "name": "string",
        "state": {
          "state": 0,
          "amount": 0
        },
        "close_date": "2019-08-24",
        "campaign_id": 0,
        "extra_fields": {},
        "comment": "string",
        "products": [
          {
            "reference": "string",
            "rate_sku": "string",
            "cost": 0,
            "price": 0,
            "discount": 100,
            "quantity": 0,
            "comment": "string",
            "description": "string"
          }
        ]
      }
    ]
  }'

Opportunities created

{
  "created_ids": [
    0
  ]
}