{"openapi":"3.1.0","info":{"title":"Klipy API","version":"1","description":"Klipy API lets you read and write core CRM records from Klipy, including people, companies, and interactions.\n\nAuthenticate every request with either `X-Klipy-Api-Key: <key>` or `Authorization: Bearer <key>`. API keys use the format `klipy_api_<id>`.\n\nEach endpoint requires a scope. Supported scopes are: `ALL`, `people:read`, `people:write`, `companies:read`, `companies:write`, `companies:remove`, `interactions:read`, and `interactions:write`.\n\nRate limiting is enforced per API key (200 requests per minute) and per organization (1000 requests per minute). Successful responses include `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`. When throttled, responses also include `Retry-After`.\n\nAll API responses use envelope objects that follow `{ object, data, meta }`. List responses also include `page_info`. Error responses use `{ object: \"error\", error, meta }`."},"servers":[{"url":"https://api.klipy.ai/api/v1","description":"Production"}],"tags":[{"name":"Authentication","description":"Endpoints for validating API key authentication."},{"name":"People","description":"Endpoints for reading and mutating person records."},{"name":"Companies","description":"Endpoints for reading and mutating company records."},{"name":"Interactions","description":"Endpoints for reading and creating interaction and activity records."}],"paths":{"/authenticate":{"get":{"tags":["Authentication"],"summary":"Authenticate API key","description":"Validates the provided API key and returns team information.","operationId":"authenticate","x-required-scope":"ALL","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Authentication succeeded","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticateSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/people/{personId}":{"get":{"tags":["People"],"summary":"Get a person by ID","operationId":"getPerson","x-required-scope":"people:read","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PersonId"}],"responses":{"200":{"description":"Person retrieved","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"patch":{"tags":["People"],"summary":"Update a person","operationId":"updatePerson","x-required-scope":"people:write","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PersonId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonUpdateRequest"}}}},"responses":{"200":{"description":"Person updated","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"tags":["People"],"summary":"Delete a person","operationId":"deletePerson","x-required-scope":"people:write","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/PersonId"}],"responses":{"204":{"description":"Person deleted"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/people/query":{"post":{"tags":["People"],"summary":"Query people","operationId":"queryPeople","x-required-scope":"people:read","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeopleQueryRequest"}}}},"responses":{"200":{"description":"People page returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeopleListResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/people":{"post":{"tags":["People"],"summary":"Create a person","operationId":"createPerson","x-required-scope":"people:write","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonCreateRequest"}}}},"responses":{"201":{"description":"Person created","headers":{"Location":{"$ref":"#/components/headers/LocationHeader"},"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"put":{"tags":["People"],"summary":"Upsert a person","operationId":"upsertPerson","x-required-scope":"people:write","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonUpsertRequest"}}}},"responses":{"200":{"description":"Person upserted","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/companies/{companyId}":{"get":{"tags":["Companies"],"summary":"Get a company by ID","operationId":"getCompany","x-required-scope":"companies:read","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/CompanyId"}],"responses":{"200":{"description":"Company retrieved","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"patch":{"tags":["Companies"],"summary":"Update a company","operationId":"updateCompany","x-required-scope":"companies:write","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/CompanyId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyUpdateRequest"}}}},"responses":{"200":{"description":"Company updated","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyIdSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}},"delete":{"tags":["Companies"],"summary":"Delete a company","operationId":"deleteCompany","x-required-scope":"companies:remove","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/CompanyId"}],"responses":{"204":{"description":"Company deleted"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/companies":{"post":{"tags":["Companies"],"summary":"Create a company","description":"Creates a company. If the domain already exists within the organization, returns 200 with the existing company id (idempotent-style create).","operationId":"createCompany","x-required-scope":"companies:write","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreateRequest"}}}},"responses":{"200":{"description":"Company already exists in this organization; existing id returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyIdSuccessResponse"}}}},"201":{"description":"Company created","headers":{"Location":{"$ref":"#/components/headers/LocationHeader"},"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyIdSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/interactions/{interactionId}":{"get":{"tags":["Interactions"],"summary":"Get an interaction by ID","operationId":"getInteraction","x-required-scope":"interactions:read","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/InteractionId"}],"responses":{"200":{"description":"Interaction retrieved","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractionSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/interactions/query":{"post":{"tags":["Interactions"],"summary":"Query interactions","operationId":"queryInteractions","x-required-scope":"interactions:read","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractionsQueryRequest"}}}},"responses":{"200":{"description":"Interactions page returned","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractionsListResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}},"/interactions":{"post":{"tags":["Interactions"],"summary":"Create an interaction","operationId":"createInteraction","x-required-scope":"interactions:write","security":[{"ApiKeyHeader":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractionCreateRequest"}}}},"responses":{"201":{"description":"Interaction created","headers":{"Location":{"$ref":"#/components/headers/LocationHeader"},"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InteractionCreateSuccessResponse"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"}}}}},"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-Klipy-Api-Key","description":"API key passed as a header"},"BearerAuth":{"type":"http","scheme":"bearer","description":"API key passed as a Bearer token in the Authorization header"}},"headers":{"XRateLimitLimit":{"schema":{"type":"integer"},"description":"Maximum requests per minute"},"XRateLimitRemaining":{"schema":{"type":"integer"},"description":"Remaining requests this window"},"XRateLimitReset":{"schema":{"type":"integer"},"description":"Unix timestamp when the window resets"},"RetryAfterHeader":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying"},"LocationHeader":{"schema":{"type":"string","format":"uri"},"description":"URL of the newly created resource"}},"parameters":{"PersonId":{"name":"personId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique ID of the person"},"CompanyId":{"name":"companyId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique ID of the company"},"InteractionId":{"name":"interactionId","in":"path","required":true,"schema":{"type":"string"},"description":"Unique ID of the interaction"}},"responses":{"Error401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error403":{"description":"Insufficient scope for this operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error409":{"description":"Conflict — the request conflicts with the current state of the resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error422":{"description":"Validation error - request body failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfterHeader"},"X-RateLimit-Limit":{"$ref":"#/components/headers/XRateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/XRateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/XRateLimitReset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}},"schemas":{"ApiMeta":{"type":"object","required":["request_id","api_version","timestamp"],"properties":{"request_id":{"type":"string","example":"req_abc123"},"api_version":{"type":"string","example":"1"},"timestamp":{"type":"string","format":"date-time"}}},"ApiSuccessEnvelope":{"type":"object","required":["object","data","meta"],"properties":{"object":{"type":"string","example":"success"},"data":{"type":"object","description":"The returned resource"},"meta":{"$ref":"#/components/schemas/ApiMeta"}}},"ApiListEnvelope":{"type":"object","required":["object","data","page_info","meta"],"properties":{"object":{"type":"string","example":"list"},"data":{"type":"array","items":{"type":"object"}},"page_info":{"type":"object","required":["has_next_page","end_cursor"],"properties":{"has_next_page":{"type":"boolean"},"end_cursor":{"type":"string","nullable":true}}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}},"ValidationIssue":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"}}},"ApiErrorBody":{"type":"object","required":["object","error","meta"],"properties":{"object":{"type":"string","example":"error"},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Machine-readable error code","enum":["AUTH_MISSING_CREDENTIALS","AUTH_INVALID_API_KEY","AUTH_EXPIRED_API_KEY","AUTH_INSUFFICIENT_SCOPE","VALIDATION_FAILED","VALIDATION_REQUIRED_FIELD","VALIDATION_INVALID_FORMAT","VALIDATION_OUT_OF_RANGE","RESOURCE_NOT_FOUND","RESOURCE_CONFLICT","OPERATION_FORBIDDEN","RATE_LIMIT_EXCEEDED","INTERNAL_ERROR"]},"message":{"type":"string"},"details":{"type":"array","items":{"$ref":"#/components/schemas/ValidationIssue"},"nullable":true}}},"meta":{"$ref":"#/components/schemas/ApiMeta"}}},"AuthenticateData":{"type":"object","required":["team_name"],"properties":{"team_name":{"type":"string"}}},"Person":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"title":{"type":"string"},"phone":{"type":"string"},"personalPhone":{"type":"string"},"linkedin":{"type":"string"},"twitter":{"type":"string"},"facebook":{"type":"string"},"instagram":{"type":"string"},"whatsapp":{"type":"string"},"altEmails":{"type":"array","items":{"type":"string","format":"email"}},"remarks":{"type":"string"},"companyId":{"type":"string"},"owner":{"type":"string"},"createdBy":{"type":"string"},"creationTime":{"type":"string","format":"date-time"},"lastInteraction":{"type":"string","format":"date-time"}},"additionalProperties":true},"Company":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"name":{"type":"string"},"linkedin":{"type":"string"},"twitter":{"type":"string"},"facebook":{"type":"string"},"instagram":{"type":"string"},"crunchbase":{"type":"string"},"createdBy":{"type":"string"},"creationTime":{"type":"string","format":"date-time"},"lastInteraction":{"type":"string","format":"date-time"}},"additionalProperties":true},"Interaction":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"direction":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"interactionDate":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"creationTime":{"type":"string","format":"date-time"}},"additionalProperties":true},"PeopleQueryFilter":{"type":"object","properties":{"email":{"type":"string"},"phone":{"type":"string"},"companyId":{"type":"string"},"owner":{"type":"string"}},"additionalProperties":false},"PeopleQueryRequest":{"type":"object","properties":{"cursor":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":100,"default":20},"filter":{"$ref":"#/components/schemas/PeopleQueryFilter"}},"additionalProperties":false},"PersonCreateRequest":{"type":"object","required":["type","identifier","firstName"],"properties":{"type":{"type":"string","enum":["email"]},"identifier":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"title":{"type":"string"}},"additionalProperties":false},"PersonUpsertRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"title":{"type":"string"},"phone":{"type":"string"},"personalPhone":{"type":"string"},"linkedin":{"type":"string"},"twitter":{"type":"string"},"facebook":{"type":"string"},"instagram":{"type":"string"},"whatsapp":{"type":"string"},"altEmails":{"type":"array","items":{"type":"string","format":"email"}},"remarks":{"type":"string"}},"additionalProperties":false},"PersonUpdateRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"firstName":{"type":"string"},"lastName":{"type":"string"},"title":{"type":"string"},"phone":{"type":"string"},"personalPhone":{"type":"string"},"linkedin":{"type":"string"},"twitter":{"type":"string"},"facebook":{"type":"string"},"instagram":{"type":"string"},"whatsapp":{"type":"string"},"altEmails":{"type":"array","items":{"type":"string","format":"email"}},"remarks":{"type":"string"}},"additionalProperties":false},"CompanyCreateRequest":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","minLength":1},"name":{"type":"string"}},"additionalProperties":true},"CompanyUpdateRequest":{"type":"object","description":"Arbitrary company fields to patch.","additionalProperties":true},"InteractionsQueryFilter":{"type":"object","properties":{"contactId":{"type":"string"},"companyId":{"type":"string"}},"additionalProperties":false},"InteractionsQueryRequest":{"type":"object","properties":{"cursor":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":21,"default":20},"filter":{"$ref":"#/components/schemas/InteractionsQueryFilter"}},"additionalProperties":false},"InteractionCreateRequest":{"type":"object","required":["type","direction","title"],"properties":{"type":{"type":"string","enum":["DIRECT_MESSAGE","EMAIL","MEETING","MEMO","BOOKING_CREATED","BOOKING_CANCELLED","MANUAL","API_EVENT","VOICE_NOTE"]},"direction":{"type":"string","enum":["INBOUND","OUTBOUND","HYBRID","INTERNAL","EVENT"]},"title":{"type":"string","maxLength":1000},"summary":{"type":"string","maxLength":10000},"primaryId":{"type":"string"},"secondaryId":{"type":"string"},"interactionDate":{"type":"number","description":"Unix timestamp in milliseconds."},"mainContact":{"type":"string"},"mainContactEmail":{"type":"string","format":"email"}},"oneOf":[{"required":["mainContact"]},{"required":["mainContactEmail"]}],"additionalProperties":false},"CompanyIdData":{"type":"object","required":["id"],"properties":{"id":{"type":"string"}}},"InteractionCreateData":{"type":"object","required":["id","isDuplicate"],"properties":{"id":{"type":"string"},"isDuplicate":{"type":"boolean"}}},"AuthenticateSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/ApiSuccessEnvelope"},{"type":"object","properties":{"object":{"type":"string","example":"success"},"data":{"$ref":"#/components/schemas/AuthenticateData"}}}]},"PersonSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/ApiSuccessEnvelope"},{"type":"object","properties":{"object":{"type":"string","example":"success"},"data":{"$ref":"#/components/schemas/Person"}}}]},"PeopleListResponse":{"allOf":[{"$ref":"#/components/schemas/ApiListEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Person"}}}}]},"CompanySuccessResponse":{"allOf":[{"$ref":"#/components/schemas/ApiSuccessEnvelope"},{"type":"object","properties":{"object":{"type":"string","example":"success"},"data":{"$ref":"#/components/schemas/Company"}}}]},"CompanyIdSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/ApiSuccessEnvelope"},{"type":"object","properties":{"object":{"type":"string","example":"success"},"data":{"$ref":"#/components/schemas/CompanyIdData"}}}]},"InteractionSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/ApiSuccessEnvelope"},{"type":"object","properties":{"object":{"type":"string","example":"success"},"data":{"$ref":"#/components/schemas/Interaction"}}}]},"InteractionsListResponse":{"allOf":[{"$ref":"#/components/schemas/ApiListEnvelope"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Interaction"}}}}]},"InteractionCreateSuccessResponse":{"allOf":[{"$ref":"#/components/schemas/ApiSuccessEnvelope"},{"type":"object","properties":{"object":{"type":"string","example":"success"},"data":{"$ref":"#/components/schemas/InteractionCreateData"}}}]}}}}