Skip to main content
POST
/
workspaces
/
{workspace}
/
labels
Create Label
curl --request POST \
  --url https://lancepilot.com/api/v3/workspaces/{workspace}/labels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Important",
  "color": "#FF5733"
}
'
{
  "status": 201,
  "message": "Resource created successfully.",
  "data": {}
}

JSON Request Example

{
  "name": "Important",
  "color": "#FF5733"
}

📝 Field Requirements

FieldTypeRequiredNotes
namestring (max 255)YesLabel name (must be unique within the workspace).
colorstring (max 7)NoHex color code (e.g., #FF5733). Defaults to null if omitted.

💡 Notes

  • Label names must be unique within each workspace
  • The color field accepts standard hex color codes with the # prefix
  • Labels can be used to organize and categorize contacts

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace
string<uuid>
required

ID of the workspace.

Body

application/json

Label creation parameters.

name
string
required

Unique name per workspace.

Maximum string length: 255
color
string | null

Hex color code (e.g., #FF5733). Optional.

Maximum string length: 7
Example:

"#FF5733"

Response

status
integer
required
Example:

201

message
string
required
Example:

"Resource created successfully."

data
object
required

Created resource data.