Saltar al contingut principal
POST

Crear un grup de contactes

Scope:contacts:contacts.write
https://api.holded.com/api/v2/contact-groups

Creates 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/json
object
idstring

Respostes d'error

400Sol·licitud incorrectaapplication/json
401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
429Límit de sol·licituds exceditapplication/json