LeadSail
Offers

Create an offer

Creates a new offer. Names are automatically title-cased and abbreviations are uppercased.

POST
/api/v1/offers

Authorization

ApiKeyAuth
X-API-Key<token>

API key generated from your Leadsail dashboard Settings page

In: header

Request Body

application/json

offerId?string
name*string
Length1 <= length
abbrev*string
Length1 <= length <= 10
active?boolean
Defaulttrue
category*string
Value in"mass_tort" | "personal_injury" | "class_action" | "employment" | "product_liability" | "medical_malpractice" | "workers_comp" | "other"
description?string
eligibilityCriteria?array<>
tags?array<>
externalId?string

Response Body

application/json

application/json

application/json

package mainimport (  "fmt"  "net/http"  "io/ioutil"  "strings")func main() {  url := "https://api.leadsail.app/api/v1/offers"  body := strings.NewReader(`{    "name": "string",    "abbrev": "string",    "category": "mass_tort"  }`)  req, _ := http.NewRequest("POST", url, body)  req.Header.Add("Content-Type", "application/json")  res, _ := http.DefaultClient.Do(req)  defer res.Body.Close()  body, _ := ioutil.ReadAll(res.Body)  fmt.Println(res)  fmt.Println(string(body))}
{
  "success": true,
  "data": {
    "offerId": "string",
    "name": "string",
    "abbrev": "string",
    "active": true,
    "category": "mass_tort",
    "description": "string",
    "eligibilityCriteria": [
      "string"
    ],
    "tags": [
      "string"
    ],
    "externalId": "string",
    "createdAt": "string",
    "updatedAt": "string",
    "archivedAt": "string"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input data",
    "details": [
      "string"
    ]
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}