Aller au contenu
Esc
↑↓naviguer↵ouvrir⌘Japerçu

Create a label

A named, colored tag of one inbox: at most 100, names unique regardless of case. A color is picked when omitted.

POST/inboxes/{inbox_id}/labels
Autorisation
AuthorizationJeton Bearer · headerrequis

A BillionSend API key (bs_…).

Paramètres de chemin
inbox_idstringrequis

The inbox ID or its email address, such as support@example.com

Corps de la requête
requisapplication/json
namestringrequis

1-64 characters, unique in the inbox regardless of case

colorstring

#RRGGBB; a color is picked when omitted

Réponses
201

Label created

idstring<uuid>requis
namestringrequis
colorstringrequis

Uppercase #RRGGBB

created_atstringrequis
objectstringrequis
Valeurs autorisées :inbox_label
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequis
namestringrequis
messagestringrequis
404

Not found

statusCodenumberrequis
namestringrequis
messagestringrequis
422

Validation error, a duplicate name or the 100-label cap

statusCodenumberrequis
namestringrequis
messagestringrequis
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberrequis
namestringrequis
messagestringrequis
Essayer
Serveur
Autorisation
Paramètres
Corpsapplication/json
Requête
curl -X POST 'https://api.billionsend.com/inboxes/string/labels' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "color": "string"
}'
Réponse
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "color": "string",
  "created_at": "string",
  "object": "inbox_label"
}

Cette page vous a-t-elle été utile ?