{ "openapi": "3.0.3", "info": { "title": "Affinity API", "description": "Affinity CRM API for managing relationships, lists, and opportunities", "version": "1.0", "x-jentic-source-url": "https://api-docs.affinity.co/" }, "servers": [ { "url": "https://api.affinity.co" } ], "paths": { "/lists": { "get": { "summary": "List Lists", "operationId": "listLists", "tags": [ "Lists" ], "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of lists", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create Lists", "operationId": "createLists", "tags": [ "Lists" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Lists created", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/lists/{id}": { "get": { "summary": "Get Lists", "operationId": "getLists", "tags": [ "Lists" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Lists details", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/lists/{list_id}/list-entries": { "get": { "summary": "List List Entries", "operationId": "listListEntries", "tags": [ "List Entries" ], "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of list entries", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create List Entries", "operationId": "createListEntries", "tags": [ "List Entries" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "201": { "description": "List Entries created", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/lists/{list_id}/list-entries/{list_entry_id}": { "get": { "summary": "Get List Entries", "operationId": "getListEntries", "tags": [ "List Entries" ], "parameters": [ { "name": "list_entry_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "List Entries details", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "put": { "summary": "Update List Entries", "operationId": "updateListEntries", "tags": [ "List Entries" ], "parameters": [ { "name": "list_entry_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "200": { "description": "List Entries updated", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "delete": { "summary": "Delete List Entries", "operationId": "deleteListEntries", "tags": [ "List Entries" ], "parameters": [ { "name": "list_entry_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "List Entries deleted" } } } }, "/fields": { "get": { "summary": "List Fields", "operationId": "listFields", "tags": [ "Fields" ], "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of fields", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create Fields", "operationId": "createFields", "tags": [ "Fields" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Fields created", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/fields/{id}": { "delete": { "summary": "Delete Fields", "operationId": "deleteFields", "tags": [ "Fields" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Fields deleted" } } } }, "/field-values": { "get": { "summary": "List Field Values", "operationId": "listFieldValues", "tags": [ "Field Values" ], "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of field values", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create Field Values", "operationId": "createFieldValues", "tags": [ "Field Values" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Field Values created", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/field-values/{field_value_id}": { "get": { "summary": "Get Field Values", "operationId": "getFieldValues", "tags": [ "Field Values" ], "parameters": [ { "name": "field_value_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Field Values details", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "put": { "summary": "Update Field Values", "operationId": "updateFieldValues", "tags": [ "Field Values" ], "parameters": [ { "name": "field_value_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Field Values updated", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "delete": { "summary": "Delete Field Values", "operationId": "deleteFieldValues", "tags": [ "Field Values" ], "parameters": [ { "name": "field_value_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Field Values deleted" } } } }, "/field-value-changes": { "get": { "summary": "List field value changes", "operationId": "list_field_value_changes", "tags": [ "Field Values" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/persons": { "get": { "summary": "List Persons", "operationId": "listPersons", "tags": [ "Persons" ], "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of persons", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create Persons", "operationId": "createPersons", "tags": [ "Persons" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Persons created", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/persons/{person_id}": { "get": { "summary": "Get Persons", "operationId": "getPersons", "tags": [ "Persons" ], "parameters": [ { "name": "person_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Persons details", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "put": { "summary": "Update Persons", "operationId": "updatePersons", "tags": [ "Persons" ], "parameters": [ { "name": "person_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Persons updated", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "delete": { "summary": "Delete Persons", "operationId": "deletePersons", "tags": [ "Persons" ], "parameters": [ { "name": "person_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Persons deleted" } } } }, "/persons/fields": { "get": { "summary": "Get person fields", "operationId": "get_person_fields", "tags": [ "Persons" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/organizations": { "get": { "summary": "List Organizations", "operationId": "listOrganizations", "tags": [ "Organizations" ], "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of organizations", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create Organizations", "operationId": "createOrganizations", "tags": [ "Organizations" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Organizations created", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/organizations/{organization_id}": { "get": { "summary": "Get Organizations", "operationId": "getOrganizations", "tags": [ "Organizations" ], "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Organizations details", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "put": { "summary": "Update Organizations", "operationId": "updateOrganizations", "tags": [ "Organizations" ], "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Organizations updated", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "delete": { "summary": "Delete Organizations", "operationId": "deleteOrganizations", "tags": [ "Organizations" ], "parameters": [ { "name": "organization_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Organizations deleted" } } } }, "/organizations/fields": { "get": { "summary": "Get organization fields", "operationId": "get_organization_fields", "tags": [ "Organizations" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/opportunities": { "get": { "summary": "List Opportunities", "operationId": "listOpportunities", "tags": [ "Opportunities" ], "parameters": [ { "name": "page", "in": "query", "schema": { "type": "integer" } }, { "name": "per_page", "in": "query", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "List of opportunities", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create Opportunities", "operationId": "createOpportunities", "tags": [ "Opportunities" ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "201": { "description": "Opportunities created", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/opportunities/{opportunity_id}": { "get": { "summary": "Get Opportunities", "operationId": "getOpportunities", "tags": [ "Opportunities" ], "parameters": [ { "name": "opportunity_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Opportunities details", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "put": { "summary": "Update Opportunities", "operationId": "updateOpportunities", "tags": [ "Opportunities" ], "parameters": [ { "name": "opportunity_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true }, "responses": { "200": { "description": "Opportunities updated", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "delete": { "summary": "Delete Opportunities", "operationId": "deleteOpportunities", "tags": [ "Opportunities" ], "parameters": [ { "name": "opportunity_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Opportunities deleted" } } } }, "/interactions": { "get": { "summary": "List interactions", "operationId": "list_interactions", "tags": [ "Interactions" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/notes": { "get": { "summary": "List notes", "operationId": "list_notes", "tags": [ "Notes" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create note", "operationId": "create_note", "tags": [ "Notes" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true } } }, "/notes/{note_id}": { "get": { "summary": "Get note", "operationId": "get_note", "tags": [ "Notes" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } }, "parameters": [ { "name": "note_id", "in": "path", "required": true, "schema": { "type": "string" } } ] }, "put": { "summary": "Update note", "operationId": "update_note", "tags": [ "Notes" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } }, "parameters": [ { "name": "note_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true } }, "delete": { "summary": "Delete note", "operationId": "delete_note", "tags": [ "Notes" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } }, "parameters": [ { "name": "note_id", "in": "path", "required": true, "schema": { "type": "string" } } ] } }, "/reminders": { "get": { "summary": "List reminders", "operationId": "list_reminders", "tags": [ "Reminders" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } } } }, "/webhook": { "get": { "summary": "List webhooks", "operationId": "list_webhooks", "tags": [ "Webhooks" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } } }, "post": { "summary": "Create webhook", "operationId": "create_webhook", "tags": [ "Webhooks" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object" } } }, "required": true } } }, "/webhook/{webhook_id}": { "delete": { "summary": "Delete webhook", "operationId": "delete_webhook", "tags": [ "Webhooks" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object" } } } } }, "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string" } } ] } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "Authorization" } } }, "security": [ { "ApiKeyAuth": [] } ] }