LeadSail
Clients

Update a client

PATCH
/api/v1/clients/{clientId}

Authorization

ApiKeyAuth
X-API-Key<token>

API key generated from your Leadsail dashboard Settings page

In: header

Path Parameters

clientId*string

The client ID

Request Body

application/json

name?string
Length1 <= length
abbrev?string
Length1 <= length <= 10
active?boolean
contactName?string
contactEmail?string
Formatemail
contactPhone?string
address?
settings?
description?string
tags?array<>
externalId?string
archivedAt?|

Response Body

application/json

application/json

application/json

application/json

package mainimport (  "fmt"  "net/http"  "io/ioutil"  "strings")func main() {  url := "https://api.leadsail.app/api/v1/clients/string"  body := strings.NewReader(`{}`)  req, _ := http.NewRequest("PATCH", 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": {
    "clientId": "string",
    "name": "string",
    "abbrev": "string",
    "active": true,
    "contactName": "string",
    "contactEmail": "user@example.com",
    "contactPhone": "string",
    "address": {
      "street": "string",
      "city": "string",
      "state": "string",
      "zip": "string",
      "country": "string"
    },
    "settings": {
      "defaultPostingUrl": "http://example.com",
      "postingMethod": "http",
      "acceptDuplicates": true,
      "maxLeadsPerDay": 0,
      "maxLeadsPerMonth": 0,
      "timezone": "string",
      "notificationEmail": "user@example.com",
      "sendDailyReport": true
    },
    "description": "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"
  }
}
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}