Skip to main content
POST
/
labels
Create label
curl --request POST \
  --url https://api.postflow.app/v1/labels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "id": "<string>",
  "organization_id": "<string>",
  "group_id": "<string>",
  "name": "<string>",
  "color": 1
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required
Maximum string length: 40
group_id
string
color
enum<integer>

1 Red
2 Green
3 Blue
4 Yellow
5 Orange
6 Pink
7 Purple
8 Sky
9 Gray

Available options:
1,
2,
3,
4,
5,
6,
7,
8,
9

Response

LabelData

id
string
required
organization_id
string
required
group_id
string | null
required

If group_id is provided, the label is available only in that group, if null, the label is available in all groups

name
string
required
color
enum<integer>
required

1 Red
2 Green
3 Blue
4 Yellow
5 Orange
6 Pink
7 Purple
8 Sky
9 Gray

Available options:
1,
2,
3,
4,
5,
6,
7,
8,
9