POST
Crear un grup de contactes
Scope:
contacts:contacts.writehttps://api.holded.com/api/v2/contact-groupsCreates a new contact group. The response returns the new contact group `id`.
Cos de la petició
object
namestringrequired
Nom del grup
descriptionstringoptional
Descripció del grup
colorstringoptional
Color del grup (codi hexadecimal)
Petició
python
import requests
url = "https://api.holded.com/api/v2/contact-groups"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
payload = {
"name": "string",
"description": "string",
"color": "string"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())Respostes
Resposta
json
{
"id": "507f1f77bcf86cd799439011"
}Respostes exitoses
201Grup de contactes creatapplication/jsonobject
idstring
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json429Límit de sol·licituds exceditapplication/json