openapi: 3.1.0 info: title: Keap REST API description: | Curated OpenAPI 3.1 description of the Keap (formerly Infusionsoft) REST v2 API. Covers a representative subset of contacts, companies, opportunities, orders, products, tasks, campaigns, and tags. Derived from the official Keap v2 OpenAPI document published at https://developer.infusionsoft.com/docs/restv2/ which is served by the api.infusionsoft.com host. version: "2.70.0" contact: name: Keap url: https://developer.keap.com/get-support/ email: api@keap.com license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0 servers: - url: https://api.infusionsoft.com/crm/rest description: Keap production REST API security: - oauth2: [] tags: - name: Contacts description: Manage Keap contacts. - name: Companies description: Manage company records. - name: Opportunities description: Manage sales opportunities. - name: Orders description: Manage e-commerce orders. - name: Products description: Manage catalog products. - name: Tasks description: Manage tasks and follow-ups. - name: Campaigns description: Read marketing campaigns. - name: Tags description: Manage tags and tag categories. paths: /v2/contacts: get: tags: [Contacts] summary: List contacts operationId: listContacts parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of contacts. content: application/json: schema: $ref: '#/components/schemas/ContactList' post: tags: [Contacts] summary: Create a contact operationId: createContact requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Contact' responses: '201': description: Contact created. content: application/json: schema: $ref: '#/components/schemas/Contact' /v2/contacts/{id}: parameters: - $ref: '#/components/parameters/IdPath' get: tags: [Contacts] summary: Get a contact by ID operationId: getContact responses: '200': description: Contact. content: application/json: schema: $ref: '#/components/schemas/Contact' patch: tags: [Contacts] summary: Patch a contact operationId: patchContact requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Contact' responses: '200': description: Updated contact. content: application/json: schema: $ref: '#/components/schemas/Contact' delete: tags: [Contacts] summary: Delete a contact operationId: deleteContact responses: '204': description: Contact deleted. /v2/companies: get: tags: [Companies] summary: List companies operationId: listCompanies parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of companies. content: application/json: schema: $ref: '#/components/schemas/CompanyList' post: tags: [Companies] summary: Create a company operationId: createCompany requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Company' responses: '201': description: Company created. content: application/json: schema: $ref: '#/components/schemas/Company' /v2/companies/{id}: parameters: - $ref: '#/components/parameters/IdPath' get: tags: [Companies] summary: Get a company by ID operationId: getCompany responses: '200': description: Company. content: application/json: schema: $ref: '#/components/schemas/Company' /v2/opportunities: get: tags: [Opportunities] summary: List opportunities operationId: listOpportunities parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of opportunities. content: application/json: schema: $ref: '#/components/schemas/OpportunityList' post: tags: [Opportunities] summary: Create an opportunity operationId: createOpportunity requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Opportunity' responses: '201': description: Opportunity created. /v2/opportunities/{id}: parameters: - $ref: '#/components/parameters/IdPath' get: tags: [Opportunities] summary: Get an opportunity operationId: getOpportunity responses: '200': description: Opportunity. content: application/json: schema: $ref: '#/components/schemas/Opportunity' patch: tags: [Opportunities] summary: Patch an opportunity operationId: patchOpportunity requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Opportunity' responses: '200': description: Updated opportunity. /v2/orders: get: tags: [Orders] summary: List orders operationId: listOrders parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of orders. content: application/json: schema: $ref: '#/components/schemas/OrderList' post: tags: [Orders] summary: Create an order operationId: createOrder requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Order' responses: '201': description: Order created. /v2/orders/{id}: parameters: - $ref: '#/components/parameters/IdPath' get: tags: [Orders] summary: Get an order operationId: getOrder responses: '200': description: Order. content: application/json: schema: $ref: '#/components/schemas/Order' /v2/products: get: tags: [Products] summary: List products operationId: listProducts parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of products. content: application/json: schema: $ref: '#/components/schemas/ProductList' post: tags: [Products] summary: Create a product operationId: createProduct requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Product' responses: '201': description: Product created. /v2/products/{id}: parameters: - $ref: '#/components/parameters/IdPath' get: tags: [Products] summary: Get a product operationId: getProduct responses: '200': description: Product. content: application/json: schema: $ref: '#/components/schemas/Product' /v2/tasks: get: tags: [Tasks] summary: List tasks operationId: listTasks parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of tasks. content: application/json: schema: $ref: '#/components/schemas/TaskList' post: tags: [Tasks] summary: Create a task operationId: createTask requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Task' responses: '201': description: Task created. /v2/tasks/{id}: parameters: - $ref: '#/components/parameters/IdPath' get: tags: [Tasks] summary: Get a task operationId: getTask responses: '200': description: Task. content: application/json: schema: $ref: '#/components/schemas/Task' /v2/campaigns: get: tags: [Campaigns] summary: List campaigns operationId: listCampaigns parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of campaigns. content: application/json: schema: $ref: '#/components/schemas/CampaignList' /v2/campaigns/{campaign_id}: parameters: - name: campaign_id in: path required: true schema: type: string get: tags: [Campaigns] summary: Get a campaign operationId: getCampaign responses: '200': description: Campaign. content: application/json: schema: $ref: '#/components/schemas/Campaign' /v2/tags: get: tags: [Tags] summary: List tags operationId: listTags parameters: - $ref: '#/components/parameters/PageSize' - $ref: '#/components/parameters/PageToken' responses: '200': description: A page of tags. content: application/json: schema: $ref: '#/components/schemas/TagList' post: tags: [Tags] summary: Create a tag operationId: createTag requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Tag' responses: '201': description: Tag created. /v2/tags/{id}: parameters: - $ref: '#/components/parameters/IdPath' get: tags: [Tags] summary: Get a tag operationId: getTag responses: '200': description: Tag. content: application/json: schema: $ref: '#/components/schemas/Tag' components: securitySchemes: oauth2: type: oauth2 description: Keap uses OAuth 2.0 for authentication. See https://developer.infusionsoft.com/getting-started-oauth-keys/ flows: authorizationCode: authorizationUrl: https://accounts.infusionsoft.com/app/oauth/authorize tokenUrl: https://api.infusionsoft.com/token scopes: full: Full access to the Keap CRM REST API. parameters: IdPath: name: id in: path required: true schema: type: string PageSize: name: limit in: query required: false schema: type: integer minimum: 1 maximum: 1000 default: 100 PageToken: name: page_token in: query required: false schema: type: string schemas: Pagination: type: object properties: next_page_token: type: string count: type: integer Contact: type: object properties: id: type: string given_name: type: string family_name: type: string email_addresses: type: array items: type: object properties: email: type: string format: email field: type: string phone_numbers: type: array items: type: object properties: number: type: string field: type: string company: type: object properties: id: type: string company_name: type: string ContactList: type: object properties: contacts: type: array items: $ref: '#/components/schemas/Contact' next_page_token: type: string count: type: integer Company: type: object properties: id: type: string company_name: type: string email: type: string format: email phone: type: string website: type: string CompanyList: type: object properties: companies: type: array items: $ref: '#/components/schemas/Company' next_page_token: type: string Opportunity: type: object properties: id: type: string opportunity_title: type: string contact: $ref: '#/components/schemas/Contact' stage: type: object properties: id: type: string name: type: string estimated_close_date: type: string format: date OpportunityList: type: object properties: opportunities: type: array items: $ref: '#/components/schemas/Opportunity' next_page_token: type: string Order: type: object properties: id: type: string title: type: string status: type: string total: type: number format: double contact: $ref: '#/components/schemas/Contact' order_items: type: array items: type: object properties: product_id: type: string quantity: type: integer price: type: number OrderList: type: object properties: orders: type: array items: $ref: '#/components/schemas/Order' next_page_token: type: string Product: type: object properties: id: type: string product_name: type: string product_desc: type: string product_price: type: number format: double sku: type: string active: type: boolean ProductList: type: object properties: products: type: array items: $ref: '#/components/schemas/Product' next_page_token: type: string Task: type: object properties: id: type: string title: type: string description: type: string due_date: type: string format: date-time completed: type: boolean contact: $ref: '#/components/schemas/Contact' TaskList: type: object properties: tasks: type: array items: $ref: '#/components/schemas/Task' next_page_token: type: string Campaign: type: object properties: id: type: string name: type: string active_contact_count: type: integer completed_contact_count: type: integer published_status: type: string CampaignList: type: object properties: campaigns: type: array items: $ref: '#/components/schemas/Campaign' next_page_token: type: string Tag: type: object properties: id: type: string name: type: string description: type: string category: type: object properties: id: type: string name: type: string TagList: type: object properties: tags: type: array items: $ref: '#/components/schemas/Tag' next_page_token: type: string