API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · phone_calls

Phone Call Schema

ID del esquema
phone_call
Colección
phone_calls
Permisos
  • Leerphone_call_view
  • Crearphone_call_create
  • Modificarphone_call_edit
  • Eliminarphone_call_delete

Campos

Phone Call Schema

phone_calls4 permisos

Schema for phone call records including PBX integration data

directionstringobligatorio

Call direction

INBOUNDOUTBOUND
callerNumberstringobligatorio

Phone number of the caller

calledNumberstringobligatorio

Phone number that was called

callerNumberDigitsstringopcional

Digits-only search key derived from callerNumber (internal)

admite null
calledNumberDigitsstringopcional

Digits-only search key derived from calledNumber (internal)

admite null
durationSecondsnumberobligatorio

Total call duration in seconds

≥ 0
partyIduuidopcional

Linked party (customer/contact)

admite null
contactPartyIduuidopcional

Linked contact person

admite null
handledByIduuidopcional

User who handled the call

admite null
rungUserIdsuuid[]opcional

Users whose phone rang during this call. Populated for inbound PBX calls (Starface CALLFLOW with CALLED_TYPE=USER) so missed calls show up under "my calls" for everyone whose extension rang, not just the (non-existent) handler.

ticketIduuidopcional

DEPRECATED (ADR 0386) — legacy single ticket link, superseded by `linkedEntities`. No UI ever wrote it; only read by the activity consumer, which now prefers `linkedEntities`.

admite null
opportunityIduuidopcional

DEPRECATED (ADR 0386) — legacy single opportunity link, superseded by `linkedEntities`. Still READ (existing calls keep showing their link) and cleared when the user removes that chip, but never written for new links. Do not add new consumers.

admite null
linkedEntitiesobject[]opcional

Free-form cross-entity links (ADR 0386). A call is a touchpoint that can concern several records at once — two tickets, a complaint and the opportunity it came from — so this replaces the single-valued `ticketId`/`opportunityId` fields.

Valor por defecto: []admite null
entityTypestringobligatorio
ticketcallback_requestprojectopportunitycomplainttaskassetvehiclecontractpartycoursecampaign
entityIduuidobligatorio
rolestringobligatorio
notestringopcional

Free-text note about the call

admite null
contactRatingintegeropcional

Manual 1-5 star rating of how the conversation went. Aggregated per contact person on the party detail page.

1 – 5admite null
contactSentimentstringopcional

Manual tone assessment of the conversation (freundlich / neutral / schwierig)

positiveneutralnegativenull
admite null
contactFeedbackNotestringopcional

Free-text note on the counterpart ("gut erreichbar", "entscheidet nicht selbst"). Kept separate from `note` (what was discussed) so the assessment can be permission-gated later without hiding the call content.

máx. 1000 caracteresadmite null
ratedByIduuidopcional

Internal user id (`users._id`) who left the assessment

admite null
ratedAtdatetimeopcional

When the assessment was last changed

admite null
isCallbackRequestedbooleanobligatorio

Whether a callback was requested

startedAtdatetimeobligatorio

When the call started (ISO 8601 on the wire; stored as BSON Date)

endedAtdatetimeopcional

When the call ended (ISO 8601 on the wire; stored as BSON Date)

admite null
callerNamestringopcional

Caller name from PBX

admite null
calledNamestringopcional

Called party name from PBX

admite null
callerAccountIdnumberopcional

PBX account ID of the caller (-1 for external)

admite null
isConnectedbooleanobligatorio

Whether the call was answered

isInternalCallbooleanobligatorio

Whether this was an internal call

isPickupbooleanobligatorio

Whether the call was picked up by another user

externalCallUuidstringopcional

External PBX call UUID (e.g. Starface CALL_UUID)

admite null
sourcestringopcional

Source of the call record. Drives the analytics capability tier (see CALL_SOURCE_FACTS); unknown/absent values are treated as tier 1.

manualstarfaceteamsfreeswitchxelionsipgateinnovaphone3cxnfonagfeo
admite null
teamsCallIdstringopcional

Microsoft Graph call record ID

admite null
teamsCallTypestringopcional

Teams call type: peer-to-peer calling or group meeting

callingmeeting
admite null
teamsMeetingUrlstringopcional

Teams meeting join URL (for meeting-type calls)

admite null
teamsParticipantsobject[]opcional

Teams call participants

admite null
displayNamestringobligatorio
userPrincipalNamestringopcional
admite null
microsoftUserIdstringopcional
admite null
internalUserIdstringopcional
admite null
teamsModalitiesstring[]opcional

Communication modalities used (audio, video, screen share)

admite null
callFlowobject[]opcional

Detailed call routing steps from PBX

admite null
indexintegerobligatorio
calledTypestringobligatorio
USERGROUPMODULEUNKNOWN
calledNamestringobligatorio
calledNumberstringobligatorio
calledAccountIdstringopcional
admite null
connectedbooleanobligatorio
forwardTypestringobligatorio
timeStartnumberobligatorio
timeEndnumberobligatorio
pickupbooleanobligatorio
pickupFirstNamestringopcional
admite null
pickupLastNamestringopcional
admite null
pickupAccountIdnumberopcional
admite null
pickupTimenumberopcional
admite null
pickupLoginIdstringopcional
admite null
moduleInfostringopcional
admite null
agentInfoobject[]opcional
admite null
accountIdstringobligatorio
onlinebooleanobligatorio
busybooleanobligatorio
dndbooleanobligatorio
ringingbooleanobligatorio
waitTimeMsnumberopcional

Time the caller waited before pickup or abandonment (INBOUND only)

≥ 0admite null
rawWebhookDataobjectopcional

Raw webhook payload for future analysis

solo lecturaadmite null
bookedAsTimeRecordIduuidopcional

Time record ID created from this call (marks call as booked)

admite null
pbxCallIdstringopcional

FreeSWITCH call UUID

admite null
sipTrunkIduuidopcional

SIP trunk used

admite null
extensionIduuidopcional

Extension that handled the call

admite null
queueIduuidopcional

ACD queue if routed through queue

admite null
recordingFileIduuidopcional

pbx_recording entity ID

admite null
transcriptTextstringopcional

Call transcript from STT

admite null
aiSummarystringopcional

AI-generated call summary

admite null
sentimentScorenumberopcional

Sentiment score -1 (negative) to 1 (positive)

-1 – 1admite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/phone_calls — Lista, paginada y filtrable
  • GET /api/v1/phone_calls/<id> — Una entidad
  • POST /api/v1/phone_calls — Crear
  • PATCH /api/v1/phone_calls/<id> — Actualización parcial
  • DELETE /api/v1/phone_calls/<id> — Eliminación lógica
  • GET /api/v1/phone_calls/<id>/timeline — Auditoría y actividades

Búsqueda