openapi: 3.1.0 info: title: Keap Appointment API description: Keap Public API Documentation termsOfService: https://www.thryv.com/terms-of-use contact: name: Keap url: https://developer.keap.com/get-support email: api.keap@thryv.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 version: v1 servers: - url: https://api.infusionsoft.com/crm tags: - name: Appointment paths: /rest/v1/appointments/{appointmentId}: get: tags: - Appointment summary: Retrieve an Appointment description: Retrieves a specific appointment with respect to user permissions. The authenticated user will need the "can view all records" permission for Task/Appt/Notes operationId: getAppointment parameters: - name: appointmentId in: path required: true schema: type: integer format: int64 responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '501': description: Not Implemented content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Appointment' put: tags: - Appointment summary: Replace an Appointment description: Replaces all values of a given appointment operationId: updateAppointment parameters: - name: appointmentId in: path required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/Appointment' required: true responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '501': description: Not Implemented content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Appointment' delete: tags: - Appointment summary: Delete an Appointment description: Deletes the specified appointment operationId: deleteAppointment parameters: - name: appointmentId in: path required: true schema: type: integer format: int64 responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '501': description: Not Implemented content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '204': description: No Content patch: tags: - Appointment summary: Update an Appointment description: Updates the provided values of a given appointment operationId: updatePropertiesOnAppointment parameters: - name: appointmentId in: path required: true schema: type: integer format: int64 requestBody: content: application/json: schema: $ref: '#/components/schemas/Appointment' required: true responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '501': description: Not Implemented content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Appointment' /rest/v1/appointments/model/customFields: post: tags: - Appointment summary: Create a Custom Field description: Adds a custom field of the specified type and options to the Appointment object. operationId: createAppointmentCustomField requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateRestCustomField' required: true responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '501': description: Not Implemented content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CustomFieldMetaData' /rest/v1/appointments: get: tags: - Appointment summary: List Appointments description: Retrieves all appointments for the authenticated user operationId: listAppointments parameters: - name: appointmentSearchCommand in: query required: true schema: $ref: '#/components/schemas/AppointmentSearchCommand' responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '501': description: Not Implemented content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AppointmentList' post: tags: - Appointment summary: Create an Appointment description: Creates a new appointment as the authenticated user operationId: createAppointment requestBody: content: application/json: schema: $ref: '#/components/schemas/Appointment' required: true responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '501': description: Not Implemented content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Appointment' /rest/v1/appointments/model: get: tags: - Appointment summary: Retrieve Appointment Model description: Get the custom fields for the Appointment object operationId: retrieveAppointmentModel responses: '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '403': description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '409': description: Conflict content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '501': description: Not Implemented content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '406': description: Not Acceptable content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '412': description: Precondition Failed content: application/json: schema: $ref: '#/components/schemas/ModelAndView' '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ObjectModel' components: schemas: Appointment: type: object properties: title: type: string description: type: string user: type: integer format: int64 description: Required only for pop-up reminders location: type: string contact_id: type: integer format: int64 description: Required for pop-up reminders start_date: type: string format: date-time example: '2024-01-15T09:00:00.000Z' end_date: type: string format: date-time example: '2024-01-15T10:00:00.000Z' remind_time: type: integer format: int32 description: Value in minutes before start_date to show pop-up reminder. enum: - '5' - '10' - '15' - '30' - '60' - '120' - '240' - '480' - '1440' - '2880' example: 30 required: - end_date - start_date - title AppointmentList: type: object properties: appointments: type: array items: $ref: '#/components/schemas/Appointment' count: type: integer format: int32 next: type: string previous: type: string sync_token: type: string AppointmentSearchCommand: type: object properties: since: type: string until: type: string limit: type: integer format: int32 offset: type: integer format: int32 contact_id: type: integer format: int64 sinceAsDate: type: string format: date-time untilAsDate: type: string format: date-time CreateRestCustomField: type: object properties: label: type: string options: type: array items: $ref: '#/components/schemas/CreateRestCustomFieldOption' field_type: type: string enum: - Currency - Date - DateTime - DayOfWeek - Drilldown - Email - Month - ListBox - Name - WholeNumber - DecimalNumber - Percent - PhoneNumber - Radio - Dropdown - SocialSecurityNumber - State - Text - TextArea - User - UserListBox - Website - Year - YesNo group_id: type: integer format: int64 description: An optional tab group to place the field under in the interface. If not specified, will default to the 'Custom Fields' tab. user_group_id: type: integer format: int64 description: An optional user group to choose from when selecting values for User or UserListBox fields. required: - field_type - label CreateRestCustomFieldOption: type: object properties: label: type: string CustomFieldMetaData: type: object properties: id: type: integer format: int64 label: type: string options: type: array items: $ref: '#/components/schemas/CustomFieldOption' record_type: type: string enum: - CONTACT - REFERRAL_PARTNER - OPPORTUNITY - TASK_NOTE_APPOINTMENT - COMPANY - ORDER - SUBSCRIPTION field_type: type: string enum: - Currency - Date - DateTime - DayOfWeek - Drilldown - Email - Month - ListBox - Name - WholeNumber - DecimalNumber - Percent - PhoneNumber - Radio - Dropdown - SocialSecurityNumber - State - Text - TextArea - User - UserListBox - Website - Year - YesNo field_name: type: string default_value: type: string CustomFieldOption: type: object properties: id: type: string label: type: string DefaultHttpStatusCode: allOf: - $ref: '#/components/schemas/HttpStatusCode' HttpStatus: allOf: - $ref: '#/components/schemas/HttpStatusCode' enum: - 100 CONTINUE - 101 SWITCHING_PROTOCOLS - 102 PROCESSING - 103 EARLY_HINTS - 200 OK - 201 CREATED - 202 ACCEPTED - 203 NON_AUTHORITATIVE_INFORMATION - 204 NO_CONTENT - 205 RESET_CONTENT - 206 PARTIAL_CONTENT - 207 MULTI_STATUS - 208 ALREADY_REPORTED - 226 IM_USED - 300 MULTIPLE_CHOICES - 301 MOVED_PERMANENTLY - 302 FOUND - 303 SEE_OTHER - 304 NOT_MODIFIED - 307 TEMPORARY_REDIRECT - 308 PERMANENT_REDIRECT - 400 BAD_REQUEST - 401 UNAUTHORIZED - 402 PAYMENT_REQUIRED - 403 FORBIDDEN - 404 NOT_FOUND - 405 METHOD_NOT_ALLOWED - 406 NOT_ACCEPTABLE - 407 PROXY_AUTHENTICATION_REQUIRED - 408 REQUEST_TIMEOUT - 409 CONFLICT - 410 GONE - 411 LENGTH_REQUIRED - 412 PRECONDITION_FAILED - 413 CONTENT_TOO_LARGE - 413 PAYLOAD_TOO_LARGE - 414 URI_TOO_LONG - 415 UNSUPPORTED_MEDIA_TYPE - 416 REQUESTED_RANGE_NOT_SATISFIABLE - 417 EXPECTATION_FAILED - 418 I_AM_A_TEAPOT - 421 MISDIRECTED_REQUEST - 422 UNPROCESSABLE_CONTENT - 422 UNPROCESSABLE_ENTITY - 423 LOCKED - 424 FAILED_DEPENDENCY - 425 TOO_EARLY - 426 UPGRADE_REQUIRED - 428 PRECONDITION_REQUIRED - 429 TOO_MANY_REQUESTS - 431 REQUEST_HEADER_FIELDS_TOO_LARGE - 451 UNAVAILABLE_FOR_LEGAL_REASONS - 500 INTERNAL_SERVER_ERROR - 501 NOT_IMPLEMENTED - 502 BAD_GATEWAY - 503 SERVICE_UNAVAILABLE - 504 GATEWAY_TIMEOUT - 505 HTTP_VERSION_NOT_SUPPORTED - 506 VARIANT_ALSO_NEGOTIATES - 507 INSUFFICIENT_STORAGE - 508 LOOP_DETECTED - 509 BANDWIDTH_LIMIT_EXCEEDED - 510 NOT_EXTENDED - 511 NETWORK_AUTHENTICATION_REQUIRED HttpStatusCode: type: object properties: error: type: boolean is1xxInformational: type: boolean is2xxSuccessful: type: boolean is3xxRedirection: type: boolean is4xxClientError: type: boolean is5xxServerError: type: boolean ModelAndView: type: object properties: view: $ref: '#/components/schemas/View' model: type: object additionalProperties: {} status: oneOf: - $ref: '#/components/schemas/DefaultHttpStatusCode' - $ref: '#/components/schemas/HttpStatus' modelMap: type: object additionalProperties: {} properties: empty: type: boolean reference: type: boolean empty: type: boolean viewName: type: string ObjectModel: type: object properties: custom_fields: type: array items: $ref: '#/components/schemas/CustomFieldMetaData' optional_properties: type: array items: type: string uniqueItems: true View: type: object properties: contentType: type: string securitySchemes: oauth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://accounts.infusionsoft.com/app/oauth/authorize tokenUrl: https://api.infusionsoft.com/token scopes: {} security: - oauth2: []