Saltar al contingut principal
POST

Crear un esdeveniment

Scope:crm:events.write
https://api.holded.com/api/v2/events

Crea un nou esdeveniment de calendari en el teu compte.

Cos de la petició

object
namestringrequired

Nom de l'esdeveniment

user_idstring | nulloptional

Identificador de l'usuari propietari

contact_idstring | nulloptional

Identificador del contacte associat

contact_namestring | nulloptional

Nom del contacte per mostrar

kindstring | nulloptional

Tipus d'activitat (p. ex. call, meeting, email)

descriptionstring | nulloptional

Descripció de l'esdeveniment

start_datestring<date-time>required

Data i hora d'inici en format ISO 8601

end_datestring<date-time> | nulloptional

Data i hora de fi en format ISO 8601

durationinteger | nulloptional

Durada en segons (si no s'especifica end_date)

statusinteger | nulloptional

Estat de l'esdeveniment (0 = pendent, 1 = completat)

tags[]string[] | nulloptional

Llista d'etiquetes

lead_idstring | nulloptional

Identificador de l'oportunitat associada

locationstring | nulloptional

Ubicació de l'esdeveniment

participants[]object[] | nulloptional

Llista de participants/convidats a l'esdeveniment

emailstring<email>required

Correu electrònic del participant

namestring | nulloptional

Nom del participant

Petició

python
import requests

url = "https://api.holded.com/api/v2/events"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Accept": "application/json",
}

payload = {
    "name": "string",
    "user_id": "string",
    "contact_id": "string",
    "contact_name": "string",
    "kind": "string",
    "description": "string",
    "start_date": "2024-01-15T10:30:00Z",
    "end_date": "2024-01-15T10:30:00Z",
    "duration": 0,
    "status": 0,
    "tags": [
        "string"
    ],
    "lead_id": "string",
    "location": "string",
    "participants": [
        {
            "email": "user@example.com",
            "name": "string"
        }
    ]
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Respostes

Resposta

json
{
  "id": "507f1f77bcf86cd799439011"
}

Respostes exitoses

201Esdeveniment creatapplication/json
object
idstring

Respostes d'error

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