Clients
Create a client
Creates a new client. Names are automatically title-cased and abbreviations are uppercased.
Authorization
ApiKeyAuth X-API-Key<token>
API key generated from your Leadsail dashboard Settings page
In: header
Request Body
application/json
clientId?string
name*string
Length
1 <= lengthabbrev*string
Length
1 <= length <= 10active?boolean
Default
truecontactName?string
contactEmail?string
Format
emailcontactPhone?string
address?
settings?
description?string
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/clients" body := strings.NewReader(`{ "name": "string", "abbrev": "string" }`) 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": {
"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"
}
}