{ "openapi": "3.1.0", "info": { "description": "Close CRM REST API", "title": "Close API", "version": "1.0.0" }, "servers": [ { "url": "https://api.close.com/api/v1" } ], "security": [ { "ApiKeyAuth": [] }, { "OAuth2": [] } ], "tags": [ { "name": "activities", "externalDocs": { "url": "https://developer.close.com/api/resources/activities" } }, { "name": "activities.calls", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/calls" } }, { "name": "activities.creations", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/creations" } }, { "name": "activities.custom_activities", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/custom-activities" } }, { "name": "activities.email_threads", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/email-threads" } }, { "name": "activities.emails", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/emails" } }, { "name": "activities.form_submissions", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/form-submissions" } }, { "name": "activities.import_updates", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/import-updates" } }, { "name": "activities.lead_merges", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/lead-merges" } }, { "name": "activities.lead_status_changes", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/lead-status-changes" } }, { "name": "activities.meetings", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/meetings" } }, { "name": "activities.notes", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/notes" } }, { "name": "activities.opportunity_status_changes", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/opportunity-status-changes" } }, { "name": "activities.sms", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/sms" } }, { "name": "activities.task_completions", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/task-completions" } }, { "name": "activities.whatsapp_messages", "externalDocs": { "url": "https://developer.close.com/api/resources/activities/whatsapp" } }, { "name": "blocked_phone_numbers", "externalDocs": { "url": "https://developer.close.com/api/resources/blocked-phone-numbers" } }, { "name": "bulk_actions.delete", "externalDocs": { "url": "https://developer.close.com/api/resources/bulk-actions" } }, { "name": "bulk_actions.edit", "externalDocs": { "url": "https://developer.close.com/api/resources/bulk-actions" } }, { "name": "bulk_actions.email", "externalDocs": { "url": "https://developer.close.com/api/resources/bulk-actions" } }, { "name": "bulk_actions.sequence_subscriptions", "externalDocs": { "url": "https://developer.close.com/api/resources/bulk-actions" } }, { "name": "comments", "externalDocs": { "url": "https://developer.close.com/api/resources/comments" } }, { "name": "connected_accounts", "externalDocs": { "url": "https://developer.close.com/api/resources/connected-accounts" } }, { "name": "contacts", "externalDocs": { "url": "https://developer.close.com/api/resources/contacts" } }, { "name": "custom_activity_types", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-activity-types" } }, { "name": "custom_field_schemas", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-fields/custom-field-schemas" } }, { "name": "custom_fields.activity", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-fields/custom-fields-activity" } }, { "name": "custom_fields.contact", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-fields/custom-fields-contact" } }, { "name": "custom_fields.custom_object", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-fields/custom-fields-custom-object" } }, { "name": "custom_fields.lead", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-fields/custom-fields-lead" } }, { "name": "custom_fields.opportunity", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-fields/custom-fields-opportunity" } }, { "name": "custom_fields.shared", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-fields/custom-fields-shared" } }, { "name": "custom_object_types", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-object-types" } }, { "name": "custom_objects", "externalDocs": { "url": "https://developer.close.com/api/resources/custom-objects" } }, { "name": "dialers", "externalDocs": { "url": "https://developer.close.com/api/resources/dialers" } }, { "name": "email_templates", "externalDocs": { "url": "https://developer.close.com/api/resources/email-templates" } }, { "name": "events", "externalDocs": { "url": "https://developer.close.com/api/resources/events" } }, { "name": "exports", "externalDocs": { "url": "https://developer.close.com/api/resources/exports" } }, { "name": "field_enrichment", "externalDocs": { "url": "https://developer.close.com/api/resources/field-enrichment" } }, { "name": "files", "externalDocs": { "url": "https://developer.close.com/api/resources/files" } }, { "name": "forms", "externalDocs": { "url": "https://developer.close.com/api/resources/forms" } }, { "name": "groups", "externalDocs": { "url": "https://developer.close.com/api/resources/groups" } }, { "name": "integration_links", "externalDocs": { "url": "https://developer.close.com/api/resources/integration-links" } }, { "name": "lead_statuses", "externalDocs": { "url": "https://developer.close.com/api/resources/lead-statuses" } }, { "name": "leads", "externalDocs": { "url": "https://developer.close.com/api/resources/leads" } }, { "name": "memberships", "externalDocs": { "url": "https://developer.close.com/api/resources/memberships" } }, { "name": "opportunities", "externalDocs": { "url": "https://developer.close.com/api/resources/opportunities" } }, { "name": "opportunity_statuses", "externalDocs": { "url": "https://developer.close.com/api/resources/opportunity-statuses" } }, { "name": "organizations", "externalDocs": { "url": "https://developer.close.com/api/resources/organizations" } }, { "name": "outcomes", "externalDocs": { "url": "https://developer.close.com/api/resources/outcomes" } }, { "name": "phone_numbers", "externalDocs": { "url": "https://developer.close.com/api/resources/phone-numbers" } }, { "name": "pipelines", "externalDocs": { "url": "https://developer.close.com/api/resources/pipelines" } }, { "name": "playbooks", "externalDocs": { "url": "https://developer.close.com/api/resources/playbooks" } }, { "name": "reporting", "externalDocs": { "url": "https://developer.close.com/api/resources/reporting" } }, { "name": "roles", "externalDocs": { "url": "https://developer.close.com/api/resources/roles" } }, { "name": "scheduling_links", "externalDocs": { "url": "https://developer.close.com/api/resources/scheduling-links" } }, { "name": "send_as", "externalDocs": { "url": "https://developer.close.com/api/resources/send-as" } }, { "name": "sequences", "externalDocs": { "url": "https://developer.close.com/api/resources/sequences" } }, { "name": "smart_views", "externalDocs": { "url": "https://developer.close.com/api/resources/smart-views" } }, { "name": "sms_templates", "externalDocs": { "url": "https://developer.close.com/api/resources/sms-templates" } }, { "name": "tasks", "externalDocs": { "url": "https://developer.close.com/api/resources/tasks" } }, { "name": "unsubscribed_emails", "externalDocs": { "url": "https://developer.close.com/api/resources/unsubscribed-emails" } }, { "name": "users", "externalDocs": { "url": "https://developer.close.com/api/resources/users" } }, { "name": "webhooks", "externalDocs": { "url": "https://developer.close.com/api/resources/webhooks" } } ], "paths": { "/activity/": { "get": { "operationId": "activities_list", "tags": [ "activities" ], "summary": "List or filter all activity types", "description": "To list only a specific activity type (e.g., only `Call` or `LeadStatusChange`), use the other resources listed separately. When querying activities for a single lead (using the `lead_id` parameter), you can ask for multiple activity types using `_type__in`.\n\nWhen listing [Custom Activities](https://developer.close.com/api/resources/activities/custom-activities), `_type` and `_type__in` can include Custom Activity Type ids (e.g. `actitype_1h5m6uHM9BZOpwVhyRJb4Y`) to filter by a specific custom activity type or `Custom` to list custom activities of any type.\n\nThe following filtering parameters can only be used for listing activities on a single lead (using the `lead_id` parameter): `user_id`, `user_id__in`, `contact_id`, `contact_id__in`, `_type`, `_type__in`.\n\nAll activities have two sortable datetime fields: `date_created` and `activity_at`. `date_created` denotes when an activity was created or synced into Close and `activity_at` denotes when that activity actually occurred. For example, on outgoing Email activities, `date_created` is equal to when the email was first created in Close, and `activity_at` is equal to when the email was actually sent. For Meeting activities, `activity_at` is equal to the scheduled time of the meeting. On custom activities, users are able to update the `activity_at` field at any time.\n\nSorting by `-activity_at` can only be used when listing activities on a single lead using the `lead_id` parameter. In addition, you can only use the date-based filters of the field you're currently sorting on. This means that if you want to use `activity_at__lt` and `activity_at__gt` as filters, you need to include `_order_by=-activity_at` in your request.\n\n`thread_emails` parameter:\n\n - (Default) when this parameter is not present, `Email` objects will be returned for each email message.\n - A value of `true` will return `EmailThread` objects representing email conversations. Stripped-down version of `Email` objects will also be returned.\n - A value of `only` will return `EmailThread` objects representing email conversations. `Email` objects will not be returned.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "in": "query", "name": "lead_id__in", "required": false, "schema": { "title": "Lead ID (In)", "type": "string" } }, { "in": "query", "name": "user_id__in", "required": false, "schema": { "title": "User ID (In)", "type": "string" } }, { "in": "query", "name": "contact_id__in", "required": false, "schema": { "title": "Contact ID (In)", "type": "string" } }, { "in": "query", "name": "_type__in", "required": false, "schema": { "title": "Type (In)", "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" }, { "in": "query", "name": "_order_by", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "Created", "activity_at": "2013-02-20T05:44:35.636000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-20T05:44:35.636000+00:00", "date_updated": "2013-02-20T05:44:35.667000+00:00", "id": "acti_ICUkwteuKAaJvhNqF1QBoVOWKQuSbFuOYoZxGeWQAeg", "lead_id": "lead_pqXrF8figcDHN7HvaXmb4wTjpxnxpmqheEyjTYPfdi5", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "api", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne" }, { "_type": "Created", "activity_at": "2013-02-20T05:44:31.940000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-20T05:44:31.940000+00:00", "date_updated": "2013-02-20T05:44:31.955000+00:00", "id": "acti_k8u1xLU5G9L0YLkxLqAHEZFB84oB7fN9vqjCgljfcFN", "lead_id": "lead_6SY1tPBB1EnQneopPGSLsAmXVkTRf4P0r6Y6ntdPowL", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "api", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne" }, { "_type": "Created", "activity_at": "2013-02-20T05:30:24.854000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-20T05:30:24.854000+00:00", "date_updated": "2013-02-20T05:30:24.870000+00:00", "id": "acti_0wDacWkNoKKVn7I8wCuEc1XbQ7lGQxCgZ9WNQn71P8j", "lead_id": "lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "api", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne" }, { "_type": "Email", "activity_at": "2013-02-08T05:03:15.000000+00:00", "attachments": [], "bcc": [], "body_html": "Cool!
\n
\nThis is rad. <3
\n

______________________________________________
Sent via Close – sales communication made simple", "body_text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple", "body_text_quoted": [ { "expand": true, "text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple" } ], "cc": [], "contact_id": "cont_eXZwc2SVL4G3xSR85jnfPny2ykvoAQndSyi1Doa2YLO", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-08T05:02:42.050000+00:00", "date_updated": "2013-02-08T05:03:16.281000+00:00", "direction": "outgoing", "envelope": { "bcc": [], "cc": [], "date": "Fri, 08 Feb 2013 05:03:15 +0000", "from": [ { "email": "phil@close.com", "name": "Phil Freo" } ], "in_reply_to": null, "message_id": "<20130208050314.11553.33819@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>", "reply_to": [], "sender": [ { "email": "phil@close.com", "name": "Phil Freo" } ], "subject": "Testing testing!!!!", "to": [ { "email": "phil@close.com", "name": "" } ] }, "id": "acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "opens": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "send_attempts": [], "sender": "phil@close.com", "status": "sent", "subject": "Testing testing!!!!", "template_id": null, "to": [ "phil@close.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne" }, { "_type": "Note", "activity_at": "2013-02-01T01:05:04.070000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "id": "acti_XOyG7jURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "note": "Welcome to Close! Get started by:\n\n1. Import your leads! Use our \"Bulk CSV Upload\" tool by clicking your name in the top right. Add leads manually by clicking \"New Lead\" in the lower left.\n\n2. Invite your co-workers!\n\n3. Setup two-way syncing of your emails by going to Settings -> Email Settings.", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne" }, { "_type": "Email", "activity_at": "2013-02-01T00:54:51.000000+00:00", "attachments": [], "bcc": [], "body_html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text_quoted": [ { "expand": true, "text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!" } ], "cc": [], "contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t", "created_by": null, "date_created": "2013-02-01T00:54:51.274000+00:00", "date_updated": "2013-02-01T00:56:04.184000+00:00", "direction": "incoming", "envelope": { "bcc": [], "cc": [], "date": "Fri, 01 Feb 2013 00:54:51 +0000", "from": [ { "email": "karan@close.com", "name": "" } ], "in_reply_to": null, "message_id": "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>", "reply_to": [], "sender": [ { "email": "karan@close.com", "name": "" } ], "subject": "Welcome to Close!", "to": [ { "email": "phil+sample@close.com", "name": "" } ] }, "id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "opens": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "send_attempts": [], "sender": "karan@close.com", "status": "inbox", "subject": "Welcome to Close!", "template_id": null, "to": [ "phil+sample@close.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/call/": { "get": { "operationId": "activities.calls_list", "tags": [ "activities.calls" ], "summary": "List or filter all Call activities", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "Call", "activity_at": "2013-02-01T00:51:33+00:00", "call_method": "regular", "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "cost": "2", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T06:34:33.637000+00:00", "date_updated": "2013-02-20T06:34:35.656000+00:00", "dialer_id": null, "dialer_saved_search_id": null, "direction": "outbound", "disposition": "answered", "duration": 10, "id": "acti_Ay0QqN91HKAHVQUesISYV8QlhDobGfWb1Ui3TE75pJR", "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "local_country_iso": "US", "local_phone": "+16505556666", "local_phone_formatted": "+1 650-555-6666", "note": "", "note_html": "

", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_id": "outcome_031uY9IKV1JxfNKM9n2qCw", "phone": "+16503334444", "recording_url": null, "remote_country_iso": "US", "remote_phone": "+16503334444", "remote_phone_formatted": "+1 650-333-4444", "source": "Close.io", "status": "completed", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [], "voicemail_duration": null, "voicemail_url": null } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/CallActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "activities.calls_create", "tags": [ "activities.calls" ], "summary": "Log an external Call activity", "description": "Use this endpoint to log calls made outside of the Close built-in VoIP system.\n\n*status*: defaults to `completed`\n\n*direction* (optional): `outbound` or `inbound`\n\n*recording_url*: you can post a URL pointing to the MP3 recording of your call. For security reasons, we require the URL to be secure (i.e. starting with https://)", "requestBody": { "content": { "application/json": { "example": { "contact_id": "cont_bulY73zoaAwTCLdjHrKzGkzZ942OwtEelJR7kNku9RK", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "direction": "outbound", "duration": 153, "lead_id": "lead_fioU1Nk5LC0H0iei9XBGHW2CFZU0yeP2zZCJQP9pC4m", "note_html": "

call notes go here

", "phone": "+16505551234", "status": "completed", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/CreateCallActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "Call", "activity_at": "2013-02-01T00:51:33+00:00", "call_method": "external", "contact_id": "cont_bulY73zoaAwTCLdjHrKzGkzZ942OwtEelJR7kNku9RK", "cost": "0", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2014-05-22T17:39:04.509000+00:00", "date_updated": "2014-05-22T17:39:04.509000+00:00", "dialer_id": null, "dialer_saved_search_id": null, "direction": "outbound", "disposition": "answered", "duration": 153, "id": "acti_wJGiBIXXBCpBAQacZ7axeOhgTS7TWxyU7ml4WqAswOb", "lead_id": "lead_fioU1Nk5LC0H0iei9XBGHW2CFZU0yeP2zZCJQP9pC4m", "local_country_iso": "US", "note": "call notes go here", "note_html": "

call notes go here

", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_id": null, "phone": "+16505551234", "recording_url": null, "remote_country_iso": "US", "remote_phone": "+16505551234", "remote_phone_formatted": "+1 650-555-1234", "source": "External", "status": "completed", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Phil Freo", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Stefan W\u00f3jcik", "users": [], "voicemail_url": null }, "schema": { "$ref": "#/components/schemas/CallActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/call/{id}/": { "get": { "operationId": "activities.calls_get", "tags": [ "activities.calls" ], "summary": "Get a single Call activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "Call", "activity_at": "2013-02-01T00:51:33+00:00", "call_method": "regular", "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "cost": "2", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T06:34:33.637000+00:00", "date_updated": "2013-02-20T06:34:35.656000+00:00", "dialer_id": null, "dialer_saved_search_id": null, "direction": "outbound", "disposition": "answered", "duration": 10, "id": "acti_Ay0QqN91HKAHVQUesISYV8QlhDobGfWb1Ui3TE75pJR", "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "local_country_iso": "US", "local_phone": "+16505556666", "local_phone_formatted": "+1 650-555-6666", "note": "", "note_html": "

", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_id": "outcome_031uY9IKV1JxfNKM9n2qCw", "phone": "+16503334444", "recording_url": null, "remote_country_iso": "US", "remote_phone": "+16503334444", "remote_phone_formatted": "+1 650-333-4444", "source": "Close.io", "status": "completed", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [], "voicemail_duration": null, "voicemail_url": null }, "schema": { "$ref": "#/components/schemas/CallActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "activities.calls_update", "tags": [ "activities.calls" ], "summary": "Update a Call activity", "description": "Most commonly used to update `note_html` or `outcome_id`. Some fields (`status`, `duration`, `direction`) cannot be updated for internal calls made through Close's VoIP system.\n\n**`note_html` and `note`**: setting one overwrites the other. If both are provided, `note_html` takes precedence. `note_html` supports rich-text HTML; `note` is plaintext only.\n\n**Deleting recordings**: for internal calls, changing or clearing `recording_url` or `voicemail_url`, or setting `recording_transcript` to `null`, permanently deletes the corresponding recording, voicemail, or transcript. This requires the `delete_own_activities` permission for your own calls, or `manage_others_activities` for other users' calls and calls not assigned to a user. Without the required permission the request fails with a `400` error.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "note_html": "

This is some new call note.

", "outcome_id": "outcome_031uY9IKV1JxfNKM9n2qCw" }, "schema": { "$ref": "#/components/schemas/UpdateCallActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "Call", "activity_at": "2013-02-01T00:51:33+00:00", "call_method": "regular", "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "cost": "2", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T06:34:33.637000+00:00", "date_updated": "2013-02-20T06:34:35.656000+00:00", "dialer_id": null, "dialer_saved_search_id": null, "direction": "outbound", "disposition": "answered", "duration": 10, "id": "acti_Ay0QqN91HKAHVQUesISYV8QlhDobGfWb1Ui3TE75pJR", "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "local_country_iso": "US", "local_phone": "+16505556666", "local_phone_formatted": "+1 650-555-6666", "note": "This is some new call note.", "note_html": "

This is some new call note.

", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_id": "outcome_031uY9IKV1JxfNKM9n2qCw", "phone": "+16503334444", "recording_url": null, "remote_country_iso": "US", "remote_phone": "+16503334444", "remote_phone_formatted": "+1 650-333-4444", "source": "Close.io", "status": "completed", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [], "voicemail_duration": null, "voicemail_url": null }, "schema": { "$ref": "#/components/schemas/CallActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.calls_delete", "tags": [ "activities.calls" ], "summary": "Delete a Call activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/created/": { "get": { "operationId": "activities.creations_list", "tags": [ "activities.creations" ], "summary": "List or filter all Created activities", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "Created", "activity_at": "2015-10-27T03:55:41.251000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2015-10-27T03:55:41.251000+00:00", "date_updated": "2015-10-27T03:55:41.252000+00:00", "id": "acti_Lx3fnL9Mq77beBRaMEQmk6rZqxUTVIIQ4MjFFGQ772y", "import_id": null, "lead_id": "lead_1aW9yllGxSZwPa3E8lf3IkBJpVHTjJUrsM2rX9n9nSX", "organization_id": "orga_Bkhj8tDhPUehdIKungGNdFKJL9e8qkj8kn00oMfxq8l", "source": "ui", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/CreatedActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/created/{id}/": { "get": { "operationId": "activities.creations_get", "tags": [ "activities.creations" ], "summary": "Get a single Created activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "Created", "activity_at": "2015-10-27T03:55:41.251000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2015-10-27T03:55:41.251000+00:00", "date_updated": "2015-10-27T03:55:41.252000+00:00", "id": "acti_Lx3fnL9Mq77beBRaMEQmk6rZqxUTVIIQ4MjFFGQ772y", "import_id": null, "lead_id": "lead_1aW9yllGxSZwPa3E8lf3IkBJpVHTjJUrsM2rX9n9nSX", "organization_id": "orga_Bkhj8tDhPUehdIKungGNdFKJL9e8qkj8kn00oMfxq8l", "source": "ui", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/CreatedActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/custom/": { "get": { "operationId": "activities.custom_activities_list", "tags": [ "activities.custom_activities" ], "summary": "List or filter all Custom Activity instances", "description": "Custom Fields appear in the format: `custom.{custom_field_id}`. See [Custom Fields](https://developer.close.com/api/resources/custom-fields/custom-fields-activity).\n\nIf you're filtering by `custom_activity_type_id` or `custom_activity_type_id__in` parameter, the `lead_id` parameter will be required as well. If you want to retrieve all Custom Activity instances of a specific type regardless of the lead, you will need to get leads that contain such an activity type using [Advanced Filtering](https://developer.close.com/api/resources/advanced-filtering) and provide those Lead IDs one at a time to this endpoint.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "in": "query", "name": "custom_activity_type_id", "required": false, "schema": { "title": "Custom Activity Type ID", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } }, { "in": "query", "name": "custom_activity_type_id__in", "required": false, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "CustomActivity", "activity_at": "2020-08-04T16:45:35.367000+00:00", "contact_id": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "created_by_name": "Bruce Wayne", "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T16:45:35.367000+00:00", "date_updated": "2020-08-04T17:37:56.439000+00:00", "id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf", "last_published_at": null, "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "mentions": [], "mentions_updated_at": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": false, "pinned_at": null, "source": "ui", "status": "draft", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Bruce Wayne", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_name": "Bruce Wayne", "users": [] }, { "_type": "CustomActivity", "activity_at": "2020-08-04T16:45:29.612000+00:00", "contact_id": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "created_by_name": "Bruce Wayne", "custom_activity_type_id": "actitype_33dpZWDiI0KoJsmQFCKbgi", "date_created": "2020-08-04T16:45:29.612000+00:00", "date_updated": "2020-08-04T16:46:02.705000+00:00", "id": "acti_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he", "last_published_at": "2020-08-04T16:45:29.612000+00:00", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "mentions": [], "mentions_updated_at": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": false, "pinned_at": null, "source": "ui", "status": "published", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Bruce Wayne", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_name": "Bruce Wayne", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/CustomActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "activities.custom_activities_create", "tags": [ "activities.custom_activities" ], "summary": "Create a new Custom Activity instance", "description": "Custom Activity instances will be created by default with the 'published' status. All required fields will be validated in this status. To create an activity without setting all required fields, you can use the \"draft\" status.\n\nA Custom Activity can be pinned or unpinned by setting the `pinned` field to `true` or `false` when creating or updating a Custom Activity.\n\nCustom Fields appear in the format: `custom.{custom_field_id}`. See [Custom Fields](https://developer.close.com/api/resources/custom-fields/custom-fields-activity).", "requestBody": { "content": { "application/json": { "example": { "custom.cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "thedarknight@close.com", "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "lead_id": "lead_p9bdo1sTVDvc81drMF1IxJBSHiLFZqaABYRu7ZHuxhP", "pinned": true }, "schema": { "$ref": "#/components/schemas/CreateCustomActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "CustomActivity", "activity_at": "2020-08-04T16:45:35.367000+00:00", "contact_id": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "created_by_name": "Bruce Wayne", "custom.cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "thedarknight@close.com", "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T16:45:35.367000+00:00", "date_updated": "2020-08-04T17:37:56.439000+00:00", "id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf", "last_published_at": "2020-08-04T16:45:35.367000+00:00", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "mentions": [], "mentions_updated_at": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": true, "pinned_at": "2020-08-04T17:37:56.439000+00:00", "source": "ui", "status": "published", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Bruce Wayne", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/CustomActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/custom/{id}/": { "get": { "operationId": "activities.custom_activities_get", "tags": [ "activities.custom_activities" ], "summary": "Get a single Custom Activity instance", "description": "Custom Fields appear in the format: `custom.{custom_field_id}`. See [Custom Fields](https://developer.close.com/api/resources/custom-fields/custom-fields-activity).", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "CustomActivity", "activity_at": "2020-08-04T16:45:35.367000+00:00", "contact_id": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "created_by_name": "Bruce Wayne", "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Yes", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T16:45:35.367000+00:00", "date_updated": "2020-08-04T17:37:56.439000+00:00", "id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf", "last_published_at": null, "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "mentions": [], "mentions_updated_at": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": false, "pinned_at": null, "source": "ui", "status": "draft", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Bruce Wayne", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/CustomActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "activities.custom_activities_update", "tags": [ "activities.custom_activities" ], "summary": "Updating a Custom Activity instance", "description": "A Custom Activity can be updated to add, change or remove any Custom Fields and to change the status between \"draft\" and \"published\".\n\nA Custom Activity can be pinned or unpinned by setting the `pinned` field to `true` or `false` when creating or updating a Custom Activity.\n\nCustom Fields appear in the format: `custom.{custom_field_id}`. See [Custom Fields](https://developer.close.com/api/resources/custom-fields/custom-fields-activity).", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "custom.cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "thedarknight@close.com", "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": null, "pinned": true, "status": "published" }, "schema": { "$ref": "#/components/schemas/UpdateCustomActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "CustomActivity", "activity_at": "2020-08-04T16:45:35.367000+00:00", "contact_id": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "created_by_name": "Bruce Wayne", "custom.cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "thedarknight@close.com", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T16:45:35.367000+00:00", "date_updated": "2020-08-04T17:37:56.439000+00:00", "id": "acti_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf", "last_published_at": "2020-08-04T16:45:35.367000+00:00", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "mentions": [], "mentions_updated_at": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": true, "pinned_at": "2020-08-04T17:37:56.439000+00:00", "source": "ui", "status": "published", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Bruce Wayne", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/CustomActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.custom_activities_delete", "tags": [ "activities.custom_activities" ], "summary": "Delete a Custom Activity instance", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/email/": { "get": { "operationId": "activities.emails_list", "tags": [ "activities.emails" ], "summary": "List or filter all Email activities", "description": "You'll get one object per email message.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "Email", "activity_at": "2013-02-08T05:02:42.050000+00:00", "attachments": [ { "content_type": "image/png", "filename": "screenshot.png", "size": 1108447, "url": "https://app.close.com/go/file/persisted/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/activity.email/acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO/3iPCenL9lciJrKnjFucsJ8/screenshot.png" } ], "bcc": [], "body_html": "Cool!
\n
\nThis is rad. <3
\n

______________________________________________
Sent via Close – sales communication made simple", "body_text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple", "body_text_quoted": [ { "expand": true, "text": "Cool!\n\nThis is rad. <3\n\n\n______________________________________________\nSent via http://close.com/ - sales communication made simple" } ], "bulk_email_action_id": null, "cc": [], "contact_id": "cont_eXZwc2SVL4G3xSR85jnfPny2ykvoAQndSyi1Doa2YLO", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-08T05:02:42.050000+00:00", "date_scheduled": null, "date_sent": "2013-02-08T05:02:42.050000+00:00", "date_updated": "2013-02-08T05:03:16.281000+00:00", "direction": "outgoing", "envelope": { "bcc": [], "cc": [], "date": "Fri, 08 Feb 2013 05:03:15 +0000", "from": [ { "email": "phil@close.com", "name": "Phil Freo" } ], "in_reply_to": null, "message_id": "<20130208050314.11553.33819@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>", "reply_to": [], "sender": [ { "email": "phil@close.com", "name": "Phil Freo" } ], "subject": "Testing testing!!!!", "to": [ { "email": "phil@close.com", "name": "" } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO", "in_reply_to_id": null, "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "message_ids": [ "<20130208050314.11553.33819@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>" ], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "phil@close.com", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sequence_name": "My Sequence", "sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo", "status": "sent", "subject": "Testing testing!!!!", "template_id": null, "thread_id": "acti_C4DFcBED1FwLSDqn853hjc979h7DIuH2vwABzGWhRAO", "to": [ "phil@close.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Wayne", "users": [] }, { "_type": "Email", "activity_at": "2013-02-01T00:54:51.274000+00:00", "attachments": [], "bcc": [], "body_html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text_quoted": [ { "expand": true, "text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!" } ], "bulk_email_action_id": null, "cc": [], "contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t", "created_by": null, "date_created": "2013-02-01T00:54:51.274000+00:00", "date_scheduled": null, "date_sent": "2013-02-01T00:54:51.274000+00:00", "date_updated": "2013-02-01T00:56:04.184000+00:00", "direction": "incoming", "envelope": { "bcc": [], "cc": [], "date": "Fri, 01 Feb 2013 00:54:51 +0000", "from": [ { "email": "karan@close.com", "name": "" } ], "in_reply_to": null, "message_id": "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>", "reply_to": [], "sender": [ { "email": "karan@close.com", "name": "" } ], "subject": "Welcome to Close!", "to": [ { "email": "phil+sample@close.com", "name": "" } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o", "in_reply_to_id": null, "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "message_ids": [ "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>" ], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "karan@close.com", "status": "inbox", "subject": "Welcome to Close!", "template_id": null, "thread_id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o", "to": [ "phil+sample@close.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/EmailActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "activities.emails_create", "tags": [ "activities.emails" ], "summary": "Create an Email activity", "description": "*status* must be one of the following:\n\n - `inbox` to log an already received email.\n - `draft` to create a draft email.\n - `scheduled` to send an email at a scheduled date and time, which must be specified in the `date_scheduled` field.\n - `outbox` to actually **send** an email. To delay email sending by a few seconds (to allow undo), specify `send_in` in seconds (must be less than 60).\n - `sent` to log an already sent email.\n\nOnly drafts can be modified, and their status can be changed to `scheduled` (to send later) or `outbox` (to send immediately). Scheduled emails, or emails in outbox that weren't sent yet can be canceled by setting the status back to `draft`.\n\nFor scheduled, outbox, or sent emails, a `followup_date` may be posted, which will have Close create an email followup task if no response was received.\n\nWe'll render an Email Template server-side if you include a `template_id` _without_ including `body_text` or `body_html` in your POST.\n\nTo specify both a sender name and a sender email address when posting an email, you can use the `sender` field with the format `\"sender\": \"\"John Smith\" \"`\n\nThe `sender` field is **required** for emails with status `inbox`, `scheduled`, `outbox`, or `error`. It may be omitted for `draft` (since the sender can be specified later before sending) and `sent` (where it defaults to the email address of the `user` associated with the email or the owner of the API key).\n\nTo include an attachment, you must first upload the file to Close using the [Files API](https://developer.close.com/api/resources/files). Then, add an object to the `attachments` array with the following fields: `url`, `filename`, `content_type`, and `size`. The `url` should be the URL provided in the `download.url` field of the response from the [Files API](https://developer.close.com/api/resources/files). It must begin `https://app.close.com/go/file/`.", "requestBody": { "content": { "application/json": { "example": { "attachments": [ { "content_type": "image/jpeg", "filename": "image.jpg", "size": 1108447, "url": "https://app.close.com/go/file/temporary/user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk/1Zx0AlY1DwBXzKKrVwpAoj/image.jpg/" } ], "bcc": [], "body_html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "cc": [], "contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t", "created_by": null, "date_created": "2013-02-01T00:54:51.274000+00:00", "email_account_id": "emailacct_nuALjWGi09rlr36zXp0ygjja9De0mzPqyqPPVsriTzt", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "sender": "karan@close.com", "status": "draft", "subject": "Welcome to Close!", "template_id": null, "to": [ "phil+sample@close.com" ], "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/CreateEmailActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "Email", "activity_at": "2015-06-26T02:01:43.059265", "attachments": [ { "content_id": null, "content_type": "image/jpeg", "filename": "image.jpg", "inline_only": false, "size": 1108447, "url": "https://app.close.com/go/file/persisted/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/activity.email/acti_EdpqkmtlQHIDWE2CixJo606BapX34SpYV3fzHryGPc3/1Zx0AlY1DwBXzKKrVwpAoj/image.jpg/" } ], "bcc": [], "body_html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_html_quoted": { "expand": true, "html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!" }, "body_preview": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any ", "body_text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text_quoted": null, "bulk_email_action_id": null, "cc": [], "contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Steve Wiseman", "date_created": "2015-06-26T02:01:43.059265", "date_scheduled": null, "date_sent": null, "date_updated": "2015-06-26T02:01:43.101910", "direction": "outgoing", "email_account_id": "emailacct_nuALjWGi09rlr36zXp0ygjja9De0mzPqyqPPVsriTzt", "envelope": null, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_EdpqkmtlQHIDWE2CixJo606BapX34SpYV3fzHryGPc3", "in_reply_to_id": null, "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "message_ids": [], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "karan@close.com", "sequence_id": null, "sequence_name": null, "sequence_subscription_id": null, "status": "draft", "subject": "Welcome to Close!", "template_id": null, "template_name": null, "thread_id": "acti_3VFfJMUKvwvQPXAbXAbs9b01usbFC5acL8MrmFcsmK5", "to": [ "phil+sample@gclose.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Steve Wiseman", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steve Wiseman", "users": [] }, "schema": { "$ref": "#/components/schemas/EmailActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/email/{id}/": { "get": { "operationId": "activities.emails_get", "tags": [ "activities.emails" ], "summary": "Get a single Email activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "Email", "activity_at": "2013-02-01T00:54:51.274000+00:00", "attachments": [], "bcc": [], "body_html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text_quoted": [ { "expand": true, "text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!" } ], "bulk_email_action_id": null, "cc": [], "contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t", "created_by": null, "date_created": "2013-02-01T00:54:51.274000+00:00", "date_scheduled": null, "date_sent": "2013-02-01T00:54:51.274000+00:00", "date_updated": "2013-02-01T00:56:04.184000+00:00", "direction": "incoming", "envelope": { "bcc": [], "cc": [], "date": "Fri, 01 Feb 2013 00:54:51 +0000", "from": [ { "email": "karan@close.com", "name": "" } ], "in_reply_to": null, "message_id": "<20130201005451.14369.20369@ec2-54-245-86-79.us-west-2.compute.amazonaws.com>", "reply_to": [], "sender": [ { "email": "karan@close.com", "name": "" } ], "subject": "Welcome to Close!", "to": [ { "email": "phil+sample@close.com", "name": "" } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o", "in_reply_to_id": null, "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "message_ids": [], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "karan@close.com", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sequence_name": "My Sequence", "sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo", "status": "inbox", "subject": "Welcome to Close!", "template_id": null, "thread_id": "acti_WuIVvTT9b3zLmOOWalxK0OrqtdkxEEdu4mNr1TPGb2o", "to": [ "phil+sample@close.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/EmailActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "activities.emails_update", "tags": [ "activities.emails" ], "summary": "Update an Email activity", "description": "This can be used to modify a draft or send it once the draft is complete.\n\nWhen changing a draft's status to `scheduled` or `outbox`, the `sender` field is required if not already set on the email.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "subject": "Updated subject!" }, "schema": { "$ref": "#/components/schemas/UpdateEmailActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "Email", "activity_at": "2015-06-26T02:01:43.059265", "attachments": [], "bcc": [], "body_html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_html_quoted": { "expand": true, "html": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!" }, "body_preview": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any ", "body_text": "Hi! My name is Karan and I'm your Account Manager. I'm here to get your team set up and help with anything you may need as you evaluate our platform. Please don't hesitate to reach out to me with any questions!", "body_text_quoted": null, "bulk_email_action_id": null, "cc": [], "contact_id": "cont_8NNOJnVwmHQEYuVOgJ4B4zU7g9RUxYH4JnPjza5Vr6t", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Steve Wiseman", "date_created": "2015-06-26T02:01:43.059265", "date_scheduled": null, "date_sent": null, "date_updated": "2015-06-26T02:01:43.101910", "direction": "outgoing", "email_account_id": null, "envelope": null, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_EdpqkmtlQHIDWE2CixJo606BapX34SpYV3fzHryGPc3", "in_reply_to_id": null, "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "message_ids": [], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "karan@close.com", "sequence_id": null, "sequence_name": null, "sequence_subscription_id": null, "status": "draft", "subject": "Updated subject!", "template_id": null, "template_name": null, "thread_id": "acti_3VFfJMUKvwvQPXAbXAbs9b01usbFC5acL8MrmFcsmK5", "to": [ "phil+sample@gclose.com" ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Steve Wiseman", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steve Wiseman", "users": [] }, "schema": { "$ref": "#/components/schemas/EmailActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.emails_delete", "tags": [ "activities.emails" ], "summary": "Delete an Email activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/emailthread/": { "get": { "operationId": "activities.email_threads_list", "tags": [ "activities.email_threads" ], "summary": "List or filter all EmailThread activities", "description": "You'll get one object per email conversation (generally grouped by subject).", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "EmailThread", "activity_at": "2014-12-07T04:10:46+00:00", "contact_id": null, "created_by": null, "created_by_name": null, "date_created": "2014-12-07T04:10:46+00:00", "date_updated": "2014-12-07T04:11:00.476000+00:00", "emails": [ { "_type": "Email", "activity_at": "2014-12-07T04:10:46+00:00", "attachments": [], "bcc": [], "body_preview": "Hey Karen,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nAdditi", "bulk_email_action_id": null, "cc": [], "contact_id": "cont_alksdjfalksdfj8NzQM56BzBZ8X2GWaowuifsOeWyeJ", "created_by": null, "created_by_name": null, "date_created": "2014-12-07T04:10:46+00:00", "date_scheduled": null, "date_sent": "2014-12-07T04:10:46+00:00", "date_updated": "2014-12-07T04:11:00.459000+00:00", "direction": "outgoing", "email_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "envelope": { "bcc": [], "cc": [], "date": "Sun, 07 Dec 2014 04:10:46 +0000", "from": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "in_reply_to": null, "message_id": "<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>", "reply_to": [], "sender": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "subject": "Excited to have you on board!", "to": [ { "email": "karen@example.com", "name": null } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_12342j3451lk25iH1Rrtk9LWxwpUZmHygjww4c5iFw4", "in_reply_to_id": null, "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5", "message_ids": [ "<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>" ], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "Steli Efti ", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sequence_name": "My Sequence", "sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo", "status": "sent", "subject": "Excited to have you on board!", "template_id": null, "template_name": null, "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH", "to": [ "karen@example.com" ], "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steli Efti", "users": [] }, { "_type": "Email", "activity_at": "2014-11-28T17:26:00+00:00", "attachments": [], "bcc": [], "body_preview": "Hey Carlos,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nAddit", "bulk_email_action_id": null, "cc": [], "contact_id": "cont_Hw4160e5c61QoFpEkvbUeGYJ0uDMLODYfrBRLWDFHh6", "created_by": null, "created_by_name": null, "date_created": "2014-11-28T17:26:00+00:00", "date_scheduled": null, "date_sent": "2014-11-28T17:26:00+00:00", "date_updated": "2014-11-28T17:26:47.740000+00:00", "direction": "outgoing", "email_account_id": "emailacct_eLq7Zxa3CPKgapCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "envelope": { "bcc": [], "cc": [], "date": "Fri, 28 Nov 2014 17:26:00 +0000", "from": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "in_reply_to": null, "message_id": "<5478b0283055a_724e3fb94e13cb5c60513397@ns5001376.ip-192-95-32.net.mail>", "reply_to": [], "sender": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "subject": "Excited to have you on board!", "to": [ { "email": "carlos@abc.com", "name": null } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_3ANoOJE7DkTwxG9s1TY3SP3VhiJFeua3gt85nuzb0by", "in_reply_to_id": null, "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5", "message_ids": [ "<5478b0283055a_724e3fb94e13cb5c60513397@ns5001376.ip-192-95-32.net.mail>" ], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "Steli Efti ", "sequence_id": null, "sequence_name": null, "sequence_subscription_id": null, "status": "sent", "subject": "Excited to have you on board!", "template_id": null, "template_name": null, "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH", "to": [ "carlos@abc.com" ], "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steli Efti", "users": [] }, { "_type": "Email", "activity_at": "2014-11-26T10:15:44+00:00", "attachments": [], "bcc": [], "body_preview": "Hey TrueAccord,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nA", "bulk_email_action_id": null, "cc": [], "contact_id": "cont_6d0dRVHWGMvsJLFjAms1xTL0LCeQoRVWyZtpQs0Y98S", "created_by": null, "created_by_name": null, "date_created": "2014-11-26T10:15:44+00:00", "date_scheduled": null, "date_sent": "2014-11-26T10:15:44+00:00", "date_updated": "2014-11-26T10:17:58.234000+00:00", "direction": "outgoing", "email_account_id": "emailacct_eLq7Zxa3CPKgapCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "envelope": { "bcc": [], "cc": [], "date": "Wed, 26 Nov 2014 10:15:44 +0000", "from": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "in_reply_to": null, "message_id": "<5475a850a030a_620f1ba3e246281806c1@ns5000834.ip-142-4-219.net.mail>", "reply_to": [], "sender": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "subject": "Excited to have you on board!", "to": [ { "email": "ohad@trueaccord.com", "name": null } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_lcAFcE1n7vbkjtlcwpSSLGpheZKBSrmrPFcCM9S13q0", "in_reply_to_id": null, "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5", "message_ids": [ "<5475a850a030a_620f1ba3e246281806c1@ns5000834.ip-142-4-219.net.mail>" ], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "Steli Efti ", "sequence_id": null, "sequence_name": null, "sequence_subscription_id": null, "status": "sent", "subject": "Excited to have you on board!", "template_id": null, "template_name": null, "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH", "to": [ "ohad@abc.com" ], "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steli Efti", "users": [] } ], "id": "acti_giHHCV8uOnialksjdflaksjdflq5zXxWi6FQL88MoNH", "latest_normalized_subject": "Excited to have you on board!", "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5", "n_emails": 3, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "participants": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steli Efti", "users": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" ] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/EmailThreadActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/emailthread/{id}/": { "get": { "operationId": "activities.email_threads_get", "tags": [ "activities.email_threads" ], "summary": "Get a single EmailThread activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "EmailThread", "activity_at": "2014-12-07T04:10:46+00:00", "contact_id": null, "created_by": null, "created_by_name": null, "date_created": "2014-12-07T04:10:46+00:00", "date_updated": "2014-12-07T04:11:00.476000+00:00", "emails": [ { "_type": "Email", "activity_at": "2014-12-07T04:10:46+00:00", "attachments": [], "bcc": [], "body_preview": "Hey Karen,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nAdditi", "bulk_email_action_id": null, "cc": [], "contact_id": "cont_alksdjfalksdfj8NzQM56BzBZ8X2GWaowuifsOeWyeJ", "created_by": null, "created_by_name": null, "date_created": "2014-12-07T04:10:46+00:00", "date_scheduled": null, "date_sent": "2014-12-07T04:10:46+00:00", "date_updated": "2014-12-07T04:11:00.459000+00:00", "direction": "outgoing", "email_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "envelope": { "bcc": [], "cc": [], "date": "Sun, 07 Dec 2014 04:10:46 +0000", "from": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "in_reply_to": null, "message_id": "<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>", "reply_to": [], "sender": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "subject": "Excited to have you on board!", "to": [ { "email": "karen@example.com", "name": null } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_12342j3451lk25iH1Rrtk9LWxwpUZmHygjww4c5iFw4", "in_reply_to_id": null, "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5", "message_ids": [ "<5483d346af89c_c0031a60fdc11130711c@ns5001546.ip-192-95-32.net.mail>" ], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "Steli Efti ", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sequence_name": "My Sequence", "sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo", "status": "sent", "subject": "Excited to have you on board!", "template_id": null, "template_name": null, "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH", "to": [ "karen@example.com" ], "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steli Efti", "users": [] }, { "_type": "Email", "activity_at": "2014-11-28T17:26:00+00:00", "attachments": [], "bcc": [], "body_preview": "Hey Carlos,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nAddit", "bulk_email_action_id": null, "cc": [], "contact_id": "cont_Hw4160e5c61QoFpEkvbUeGYJ0uDMLODYfrBRLWDFHh6", "created_by": null, "created_by_name": null, "date_created": "2014-11-28T17:26:00+00:00", "date_scheduled": null, "date_sent": "2014-11-28T17:26:00+00:00", "date_updated": "2014-11-28T17:26:47.740000+00:00", "direction": "outgoing", "email_account_id": "emailacct_eLq7Zxa3CPKgapCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "envelope": { "bcc": [], "cc": [], "date": "Fri, 28 Nov 2014 17:26:00 +0000", "from": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "in_reply_to": null, "message_id": "<5478b0283055a_724e3fb94e13cb5c60513397@ns5001376.ip-192-95-32.net.mail>", "reply_to": [], "sender": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "subject": "Excited to have you on board!", "to": [ { "email": "carlos@abc.com", "name": null } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_3ANoOJE7DkTwxG9s1TY3SP3VhiJFeua3gt85nuzb0by", "in_reply_to_id": null, "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5", "message_ids": [ "<5478b0283055a_724e3fb94e13cb5c60513397@ns5001376.ip-192-95-32.net.mail>" ], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "Steli Efti ", "sequence_id": null, "sequence_name": null, "sequence_subscription_id": null, "status": "sent", "subject": "Excited to have you on board!", "template_id": null, "template_name": null, "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH", "to": [ "carlos@abc.com" ], "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steli Efti", "users": [] }, { "_type": "Email", "activity_at": "2014-11-26T10:15:44+00:00", "attachments": [], "bcc": [], "body_preview": "Hey TrueAccord,\r\n\r\nThanks for signing up for Close. My name is Steli Efti and I'm\r\nthe CEO of Close. Please let me know if I can do anything to\r\nhelp make your trial into a massive success.\r\n\r\nA", "bulk_email_action_id": null, "cc": [], "contact_id": "cont_6d0dRVHWGMvsJLFjAms1xTL0LCeQoRVWyZtpQs0Y98S", "created_by": null, "created_by_name": null, "date_created": "2014-11-26T10:15:44+00:00", "date_scheduled": null, "date_sent": "2014-11-26T10:15:44+00:00", "date_updated": "2014-11-26T10:17:58.234000+00:00", "direction": "outgoing", "email_account_id": "emailacct_eLq7Zxa3CPKgapCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "envelope": { "bcc": [], "cc": [], "date": "Wed, 26 Nov 2014 10:15:44 +0000", "from": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "in_reply_to": null, "message_id": "<5475a850a030a_620f1ba3e246281806c1@ns5000834.ip-142-4-219.net.mail>", "reply_to": [], "sender": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "subject": "Excited to have you on board!", "to": [ { "email": "ohad@trueaccord.com", "name": null } ] }, "followup_sequence_add_cc_bcc": false, "followup_sequence_delay": null, "has_reply": false, "id": "acti_lcAFcE1n7vbkjtlcwpSSLGpheZKBSrmrPFcCM9S13q0", "in_reply_to_id": null, "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5", "message_ids": [ "<5475a850a030a_620f1ba3e246281806c1@ns5000834.ip-142-4-219.net.mail>" ], "need_smtp_credentials": false, "opens": [], "opens_summary": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "references": [], "send_as_id": null, "send_attempts": [], "sender": "Steli Efti ", "sequence_id": null, "sequence_name": null, "sequence_subscription_id": null, "status": "sent", "subject": "Excited to have you on board!", "template_id": null, "template_name": null, "thread_id": "acti_giHHCV8uOniX2wuFmKY14VWqOEq5zXxWi6FQL88MoNH", "to": [ "ohad@abc.com" ], "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steli Efti", "users": [] } ], "id": "acti_giHHCV8uOnialksjdflaksjdflq5zXxWi6FQL88MoNH", "latest_normalized_subject": "Excited to have you on board!", "lead_id": "lead_5cIz6MHYMYEJLDTJRzoyfLHAMymuWlPweEMvslHoBf5", "n_emails": 3, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "participants": [ { "email": "steli@close.com", "name": "Steli Efti" } ], "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Steli Efti", "users": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" ] }, "schema": { "$ref": "#/components/schemas/EmailThreadActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.email_threads_delete", "tags": [ "activities.email_threads" ], "summary": "Delete an EmailThread activity", "description": "This will also delete all the email activities belonging to this thread.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/form_submission/": { "get": { "operationId": "activities.form_submissions_list", "tags": [ "activities.form_submissions" ], "summary": "List or filter all FormSubmission activities", "description": "Get a list of matching FormSubmission activities. In addition to standard Activity filtering parameters, you can filter by specific form(s) using the `form_id` or `form_id__in` parameters.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "in": "query", "name": "lead_id__in", "required": false, "schema": { "title": "Lead ID (In)", "type": "string" } }, { "in": "query", "name": "user_id__in", "required": false, "schema": { "title": "User ID (In)", "type": "string" } }, { "in": "query", "name": "contact_id__in", "required": false, "schema": { "title": "Contact ID (In)", "type": "string" } }, { "in": "query", "name": "_type__in", "required": false, "schema": { "title": "Type (In)", "type": "string" } }, { "in": "query", "name": "form_id", "required": false, "description": "Filter by a specific form ID.", "schema": { "title": "Form ID", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } }, { "in": "query", "name": "form_id__in", "required": false, "description": "Filter by multiple form IDs (comma-separated).", "schema": { "title": "Form ID (In)", "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "FormSubmission", "activity_at": "2025-01-02T10:30:00.000000+00:00", "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "created_by": null, "created_by_name": null, "date_created": "2025-01-02T10:30:00.000000+00:00", "date_updated": "2025-01-02T10:30:00.000000+00:00", "form_configuration_id": "formconf_0325NyQ1X3HplqjyP631at", "form_id": "form_0325NAK3KhCZ3EdJfDldRU", "id": "acti_j0fs4KP22Ngn68GE5kInEcC7JWsbJzXthV1A8WtyZEk", "ip_address": "192.168.1.100", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "origin": "https://example.com", "source_url": "https://example.com/contact?utm_source=google&utm_campaign=demo", "source_url_normalized": "example.com/contact", "updated_by": null, "updated_by_name": null, "user_id": null, "user_name": null, "users": [], "values": { "formfld_0325NAK2ePwMEBJrZZCk5F": "John Doe", "formfld_0325NAK2kjTXTUFwW4i01n": "john@example.com", "formfld_08slbL4D4wR3vOqf28RvhF": true }, "values_by_name": {} } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/FormSubmissionActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/form_submission/{id}/": { "get": { "operationId": "activities.form_submissions_get", "tags": [ "activities.form_submissions" ], "summary": "Get a single FormSubmission activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "FormSubmission", "activity_at": "2025-01-02T10:30:00.000000+00:00", "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "created_by": null, "created_by_name": null, "date_created": "2025-01-02T10:30:00.000000+00:00", "date_updated": "2025-01-02T10:30:00.000000+00:00", "form_configuration_id": "formconf_0325NyQ1X3HplqjyP631at", "form_id": "form_0325NAK3KhCZ3EdJfDldRU", "id": "acti_j0fs4KP22Ngn68GE5kInEcC7JWsbJzXthV1A8WtyZEk", "ip_address": "192.168.1.100", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "origin": "https://example.com", "source_url": "https://example.com/contact?utm_source=google&utm_campaign=demo", "source_url_normalized": "example.com/contact", "updated_by": null, "updated_by_name": null, "user_id": null, "user_name": null, "users": [], "values": { "formfld_0325NAK2ePwMEBJrZZCk5F": "John Doe", "formfld_0325NAK2kjTXTUFwW4i01n": "john@example.com", "formfld_08slbL4D4wR3vOqf28RvhF": true }, "values_by_name": {} }, "schema": { "$ref": "#/components/schemas/FormSubmissionActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.form_submissions_delete", "tags": [ "activities.form_submissions" ], "summary": "Delete a FormSubmission activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/import_update/": { "get": { "operationId": "activities.import_updates_list", "tags": [ "activities.import_updates" ], "summary": "List or filter all ImportUpdate activities", "description": "Get a list of ImportUpdate activities, which record bulk import operations that modified existing leads. Each ImportUpdate is associated with a bulk import (`import_id`) and indicates whether the change has been reverted.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "ImportUpdate", "activity_at": "2024-05-01T12:00:00.000000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2024-05-01T12:00:00.000000+00:00", "date_updated": "2024-05-01T12:00:00.000000+00:00", "id": "acti_AyXImportUpd4te0ExAmPLeAcTiViTyId00000000000", "import_id": "bulk_AyXImpOrtIdEx4mPlE000000000000000000000000", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "reverted": false, "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Stefan W\u00f3jcik", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Stefan W\u00f3jcik", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/ImportUpdateActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/import_update/{id}/": { "get": { "operationId": "activities.import_updates_get", "tags": [ "activities.import_updates" ], "summary": "Get a single ImportUpdate activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "ImportUpdate", "activity_at": "2024-05-01T12:00:00.000000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2024-05-01T12:00:00.000000+00:00", "date_updated": "2024-05-01T12:00:00.000000+00:00", "id": "acti_AyXImportUpd4te0ExAmPLeAcTiViTyId00000000000", "import_id": "bulk_AyXImpOrtIdEx4mPlE000000000000000000000000", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "reverted": false, "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Stefan W\u00f3jcik", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Stefan W\u00f3jcik", "users": [] }, "schema": { "$ref": "#/components/schemas/ImportUpdateActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.import_updates_delete", "tags": [ "activities.import_updates" ], "summary": "Delete an ImportUpdate activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/lead_merge/": { "get": { "operationId": "activities.lead_merges_list", "tags": [ "activities.lead_merges" ], "summary": "List or filter all LeadMerge activities", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "LeadMerge", "activity_at": "2013-02-01T01:05:04.070000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "destination_display_name": "Destination Lead", "destination_lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "error_message": null, "id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "merge_status": "in_progress", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source_display_name": "Source Lead", "source_lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Stefan W\u00f3jcik", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Stefan W\u00f3jcik", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/LeadMergeActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/lead_merge/{id}/": { "get": { "operationId": "activities.lead_merges_get", "tags": [ "activities.lead_merges" ], "summary": "Get a single LeadMerge activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "LeadMerge", "activity_at": "2013-02-01T01:05:04.070000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "destination_display_name": "Destination Lead", "destination_lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "error_message": null, "id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "merge_status": "in_progress", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source_display_name": "Source Lead", "source_lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Stefan W\u00f3jcik", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Stefan W\u00f3jcik", "users": [] }, "schema": { "$ref": "#/components/schemas/LeadMergeActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/meeting/": { "get": { "operationId": "activities.meetings_list", "tags": [ "activities.meetings" ], "summary": "List or filter all Meeting activities", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "Meeting", "activity_at": "2019-10-11T16:30:00+00:00", "actual_duration": null, "attached_call_ids": [], "attendees": [ { "contact_id": "cont_V3RuqD9VJKJWOtPsoH7EMy3MnKoFED2Ulgd4g87Ayqc", "email": "bruce@wayneenterprises.com", "is_organizer": false, "name": "Bruce Wayne", "status": "noreply", "user_id": null }, { "contact_id": null, "email": "jane@example.com", "is_organizer": true, "name": null, "status": "yes", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "calendar_event_link": "https://www.google.com/calendar/event?eid=NzlrNGRoMmk5bm9jZDEwOGtjMmY3Y2RzODggamFuZUBleGFtcGxlLmNvbQ", "calendar_event_uids": [ "79k4dh2i9nocd108kc2f7cds88" ], "conference_links": [ { "type": "ZOOM", "url": "https://zoom.us/j/zoommeeting" } ], "connected_account_id": "emailacct_OoSyqxjm1HbuxcRsOyrm2SwR1uOTBdHKPdhAaf9mhUp", "contact_id": null, "conversation_type_id": null, "conversation_type_reason": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "created_by_name": "Jane User", "date_created": "2019-10-11T16:30:00+00:00", "date_updated": "2019-10-11T16:18:17.942000+00:00", "duration": 3600, "ends_at": "2019-10-11T17:30:00+00:00", "id": "acti_qwA2IPmjYyMQQ2UWuNxBOtc2CbZtRUOb5JkS1i3Qo1b", "integrations": [], "is_recurring": false, "lead_id": "lead_Qq33JAqr6zrgqtJGkKv7XQxTnQxpTEJA7Mfcx98ZrWe", "location": "https://zoom.us/j/zoommeeting", "note": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nJane User is inviting you to a scheduled Zoom meeting to find out if you're really Batman.\n\nJoin Zoom Meeting\nhttps://zoom.us/j/zoommeeting\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500", "notetaker_id": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_autofill_confidence": null, "outcome_autofill_reasoning": null, "outcome_id": null, "outcome_reason": null, "playbook_id": null, "playbook_reason": null, "provider_calendar_event_id": "79k4dh2i9nocd108kc2f7cds88", "provider_calendar_ids": [ "primary" ], "provider_calendar_type": "google", "source": "calendar", "starts_at": "2019-10-11T16:30:00+00:00", "status": "upcoming", "summary": null, "title": "Bruce Wayne Interview", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Jane User", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_name": "Jane User", "user_note": null, "user_note_date_updated": null, "user_note_html": null, "user_note_mentions": [], "users": [ "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" ] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/MeetingActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/meeting/{id}/": { "get": { "operationId": "activities.meetings_get", "tags": [ "activities.meetings" ], "summary": "Get a single Meeting activity", "description": "Meeting transcripts can be accessed using this API but are not loaded by default. To load transcripts, use the `_fields` parameter with `transcripts` value.\n\nThe `transcripts` field is an array of objects for each Close Notetaker bot that joined the meeting. Typically, there will be only one transcript. Transcripts are ordered by the time bots joined the meeting.\n\nExample transcripts in response:\n\n```json\n{ \"transcripts\": [ { \"utterances\": [ { \"speaker_label\": \"John Lead\", \"speaker_side\": \"contact\", \"start\": 0.1, \"end\": 1.2, \"text\": \"Hey, what's up? How is it going?\" }, { \"speaker_label\": \"Jane User\", \"speaker_side\": \"close-user\", \"start\": 1.3, \"end\": 2.4, \"text\": \"Hey John, I'm doing great. How about you?\" } ], \"summary_text\": \"Summary text\", \"summary_html\": \"

Summary text

\" } ] }\n```", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "Meeting", "activity_at": "2019-10-11T16:30:00+00:00", "actual_duration": null, "attached_call_ids": [], "attendees": [ { "contact_id": "cont_V3RuqD9VJKJWOtPsoH7EMy3MnKoFED2Ulgd4g87Ayqc", "email": "bruce@wayneenterprises.com", "is_organizer": false, "name": null, "status": "noreply", "user_id": null }, { "contact_id": null, "email": "jane@example.com", "is_organizer": true, "name": null, "status": "yes", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "calendar_event_link": "https://www.google.com/calendar/event?eid=NzlrNGRoMmk5bm9jZDEwOGtjMmY3Y2RzODggamFuZUBleGFtcGxlLmNvbQ", "calendar_event_uids": [ "79k4dh2i9nocd108kc2f7cds88" ], "conference_links": [ { "type": "ZOOM", "url": "https://zoom.us/j/zoommeeting" } ], "connected_account_id": "emailacct_OoSyqxjm1HbuxcRsOyrm2SwR1uOTBdHKPdhAaf9mhUp", "contact_id": null, "conversation_type_id": null, "conversation_type_reason": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "created_by_name": "Jane User", "date_created": "2019-10-11T16:30:00+00:00", "date_updated": "2019-10-11T16:30:00.368000+00:00", "duration": 3600, "ends_at": "2019-10-11T17:30:00+00:00", "id": "acti_qwA2IPmjYyMQQ2UWuNxBOtc2CbZtRUOb5JkS1i3Qo1b", "integrations": [], "is_recurring": false, "lead_id": "lead_Qq33JAqr6zrgqtJGkKv7XQxTnQxpTEJA7Mfcx98ZrWe", "location": "https://zoom.us/j/zoommeeting", "note": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nJane User is inviting you to a scheduled Zoom meeting to find out if you're really Batman.\n\nJoin Zoom Meeting\nhttps://zoom.us/j/zoommeeting\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500", "notetaker_id": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_autofill_confidence": null, "outcome_autofill_reasoning": null, "outcome_id": null, "outcome_reason": null, "playbook_id": null, "playbook_reason": null, "provider_calendar_event_id": "79k4dh2i9nocd108kc2f7cds88", "provider_calendar_ids": [ "primary" ], "provider_calendar_type": "google", "source": "calendar", "starts_at": "2019-10-11T16:30:00+00:00", "status": "in-progress", "summary": null, "title": "Bruce Wayne Interview", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Jane User", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_name": "Jane User", "user_note": null, "user_note_date_updated": null, "user_note_html": null, "user_note_mentions": [], "users": [ "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" ] }, "schema": { "$ref": "#/components/schemas/MeetingActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "activities.meetings_update", "tags": [ "activities.meetings" ], "summary": "Update a Meeting activity", "description": "Most commonly this can be used to update a meetings's `user_note_html` or `outcome_id`.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "outcome_id": "outcome_031uY9IKV1JxfNKM9n2qCw", "user_note_html": "

  • Discussed product/service offering, highlighting security and scalability features.
  • Addressed Bruce Wayne's specific project requirements and concerns.
  • Negotiated customized pricing package.
    • " } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "Meeting", "activity_at": "2019-10-11T16:30:00+00:00", "actual_duration": null, "attached_call_ids": [], "attendees": [ { "contact_id": "cont_V3RuqD9VJKJWOtPsoH7EMy3MnKoFED2Ulgd4g87Ayqc", "email": "bruce@wayneenterprises.com", "is_organizer": false, "name": null, "status": "noreply", "user_id": null }, { "contact_id": null, "email": "jane@example.com", "is_organizer": true, "name": null, "status": "yes", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "calendar_event_link": "https://www.google.com/calendar/event?eid=NzlrNGRoMmk5bm9jZDEwOGtjMmY3Y2RzODggamFuZUBleGFtcGxlLmNvbQ", "calendar_event_uids": [ "79k4dh2i9nocd108kc2f7cds88" ], "conference_links": [ { "type": "ZOOM", "url": "https://zoom.us/j/zoommeeting" } ], "connected_account_id": "emailacct_OoSyqxjm1HbuxcRsOyrm2SwR1uOTBdHKPdhAaf9mhUp", "contact_id": null, "conversation_type_id": null, "conversation_type_reason": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "created_by_name": "Jane User", "date_created": "2019-10-11T16:30:00+00:00", "date_updated": "2019-10-11T16:30:00.368000+00:00", "duration": 3600, "ends_at": "2019-10-11T17:30:00+00:00", "id": "acti_qwA2IPmjYyMQQ2UWuNxBOtc2CbZtRUOb5JkS1i3Qo1b", "integrations": [], "is_recurring": false, "lead_id": "lead_Qq33JAqr6zrgqtJGkKv7XQxTnQxpTEJA7Mfcx98ZrWe", "location": "https://zoom.us/j/zoommeeting", "note": "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nJane User is inviting you to a scheduled Zoom meeting to find out if you're really Batman.\n\nJoin Zoom Meeting\nhttps://zoom.us/j/zoommeeting\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500", "notetaker_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_autofill_confidence": null, "outcome_autofill_reasoning": null, "outcome_id": "outcome_031uY9IKV1JxfNKM9n2qCw", "outcome_reason": null, "playbook_id": null, "playbook_reason": null, "provider_calendar_event_id": "79k4dh2i9nocd108kc2f7cds88", "provider_calendar_ids": [ "primary" ], "provider_calendar_type": "google", "source": "calendar", "starts_at": "2019-10-11T16:30:00+00:00", "status": "in-progress", "summary": null, "title": "Bruce Wayne Interview", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Jane User", "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_name": "Jane User", "user_note": "Discussed product/service offering, highlighting security and scalability features.", "user_note_date_updated": "2019-10-11T16:30:00.368000+00:00", "user_note_html": "

      • Discussed product/service offering, highlighting security and scalability features.
      • Addressed Bruce Wayne's specific project requirements and concerns.
      • Negotiated customized pricing package.
        • ", "user_note_mentions": [], "users": [ "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" ] }, "schema": { "$ref": "#/components/schemas/MeetingActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.meetings_delete", "tags": [ "activities.meetings" ], "summary": "Delete a Meeting activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/meeting/{id}/integration/": { "post": { "operationId": "activities.meetings_create_integration", "tags": [ "activities.meetings" ], "summary": "Create or update third-party Meeting integration", "description": "Please note that only OAuth apps can perform this operation. Using API key will result in an error. See [Authentication with OAuth](https://developer.close.com/api/overview/oauth-authentication) for more information.\n\nThird party integrations are presented as tabs titled with OAuth app name in the activity feed. When invoked for the first time with a given OAuth app a new integration is created, subsequent calls with the same OAuth app will update an existing integration. Submitting an empty JSON body does nothing.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "integration_data": { "note_html": "
          • Very interested in calendar integration feature.
          • Frustrated with their existing CRM.
          " } } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "id": "evtint_68gPlaA2Q79nvAa4PFHG9J", "integration_data": { "note_html": "
          • Very interested in calendar integration feature.
          • Frustrated with their existing CRM.
          " }, "integration_name": "third_party", "oauth_client": { "id": "oa2client_2hoWsDYOJtiaR7SrUbXyN2", "name": "AI Highlights" } } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/note/": { "get": { "operationId": "activities.notes_list", "tags": [ "activities.notes" ], "summary": "List or filter all Note activities", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "Note", "activity_at": "2013-02-01T01:05:04.070000+00:00", "attachments": [], "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "id": "acti_XOyG7jURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "note": "Welcome to Close!\n\nGet started by:\n\n 1. Import your leads! Use our \"Bulk CSV Upload\" tool by clicking your name in the top right. Add leads manually by clicking \"New Lead\" in the lower left.\n 2. Invite your co-workers!\n 3. Setup two-way syncing of your emails by going to Settings -> Email Settings.", "note_html": "

          Welcome to Close!

          Get started by:

          1. Import your leads! Use our \"Bulk CSV Upload\" tool by clicking your name in the top right. Add leads manually by clicking \"New Lead\" in the lower left.
          2. Invite your co-workers!
          3. Setup two-way syncing of your emails by going to Settings -> Email Settings.
          ", "note_mentions": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": true, "pinned_at": "2025-08-19T14:14:34.383000+00:00", "source": null, "title": "Welcome to Close!", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/ActivityBase" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "activities.notes_create", "tags": [ "activities.notes" ], "summary": "Create a Note activity", "description": "To include an attachment, you must first upload the file to Close using the [Files API](https://developer.close.com/api/resources/files). Then, add an object to the `attachments` array with the following fields: `url`, `filename` and `content_type`. The `url` should be the URL provided in the `download.url` field of the response from the [Files API](https://developer.close.com/api/resources/files). It must begin `https://app.close.com/go/file/`.\n\nA note can be pinned or unpinned by setting the `pinned` field to `true` or `false` when creating or updating a note.", "requestBody": { "content": { "application/json": { "example": { "attachments": [ { "content_type": "image/gif", "filename": "picture.gif", "url": "https://app.close.com/go/file/temporary/user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo/3HV4BNwDyBLdfrPbFZF78s/picture.gif/" } ], "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "note_html": "

          this is a test note.

          " }, "schema": { "$ref": "#/components/schemas/CreateNoteActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "Note", "activity_at": "2013-02-20T06:39:57.266000+00:00", "attachments": [ { "content_type": "image/gif", "filename": "picture.gif", "size": 20673, "thumbnail_url": "https://app.close.com/go/file/persisted/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/activity.note/acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw/3HV4BNwDyBLdfrPbFZF78s/picture.gif/thumbnail/", "url": "https://app.close.com/go/file/persisted/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/activity.note/acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw/3HV4BNwDyBLdfrPbFZF78s/picture.gif/" } ], "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-20T06:39:57.266000+00:00", "date_updated": "2013-02-20T06:39:57.266000+00:00", "id": "acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw", "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "note": "this is a test note.", "note_html": "

          this is a test note.

          ", "note_mentions": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": false, "pinned_at": null, "source": "api", "title": null, "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/ActivityBase" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/note/{id}/": { "get": { "operationId": "activities.notes_get", "tags": [ "activities.notes" ], "summary": "Get a single Note activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "Note", "activity_at": "2013-02-01T01:05:04.070000+00:00", "attachments": [ { "content_type": "image/gif", "filename": "picture.gif", "size": 20673, "thumbnail_url": "https://app.close.com/go/file/persisted/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/activity.note/acti_XOyG7jURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak/3HV4BNwDyBLdfrPbFZF78s/picture.gif/thumbnail/", "url": "https://app.close.com/go/file/persisted/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/activity.note/acti_XOyG7jURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak/3HV4BNwDyBLdfrPbFZF78s/picture.gif/" } ], "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "id": "acti_XOyG7jURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "note": "Welcome to Close!\n\nGet started by:\n\n 1. Import your leads! Use our \"Bulk CSV Upload\" tool by clicking your name in the top right. Add leads manually by clicking \"New Lead\" in the lower left.\n 2. Invite your co-workers!\n 3. Setup two-way syncing of your emails by going to Settings -> Email Settings.", "note_html": "

          Welcome to Close!

          Get started by:

          1. Import your leads! Use our \"Bulk CSV Upload\" tool by clicking your name in the top right. Add leads manually by clicking \"New Lead\" in the lower left.
          2. Invite your co-workers!
          3. Setup two-way syncing of your emails by going to Settings -> Email Settings.
          ", "note_mentions": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": true, "pinned_at": "2025-08-19T14:14:34.383000+00:00", "source": null, "title": "Welcome to Close!", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/ActivityBase" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "activities.notes_update", "tags": [ "activities.notes" ], "summary": "Update a Note activity", "description": "**`note_html` and `note`**: setting one overwrites the other. If both are provided, `note_html` takes precedence. `note_html` supports rich-text HTML; `note` is plaintext only.\n\nA note can be pinned or unpinned by setting `pinned` to `true` or `false`.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "note_html": "

          this is an update to my existing note.

          ", "pinned": true }, "schema": { "$ref": "#/components/schemas/UpdateNoteActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "Note", "activity_at": "2013-02-20T06:39:57.266000+00:00", "attachments": [], "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-20T06:39:57.266000+00:00", "date_updated": "2013-02-20T06:41:59.846000+00:00", "id": "acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw", "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "note": "this is an update to my existing note.", "note_html": "

          this is an update to my existing note.

          ", "note_mentions": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pinned": true, "pinned_at": "2013-02-20T06:41:59.846000+00:00", "source": "api", "title": "Welcome to Close!", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/ActivityBase" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.notes_delete", "tags": [ "activities.notes" ], "summary": "Delete a Note activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/sms/": { "get": { "operationId": "activities.sms_list", "tags": [ "activities.sms" ], "summary": "List or filter all SMS activities", "description": "Get a list of matching SMS activities.\n\nMMS messages are considered SMS messages with attachments. Attachments have identical fields to email attachments (`url`, `filename`, `size` and `content_type`), a `media_id` uniquely identifying an attachment, and if Close was able to generate a thumbnail, a `thumbnail_url` too.\n\nAccessing `url` or `thumbnail_url` requires an authenticated session and leads to a temporarily signed S3 URL.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "SMS", "activity_at": "2016-10-03T16:06:11.167000+00:00", "attachments": [ { "content_type": "image/png", "filename": "media_1.png", "media_id": "media_1GnAWzBfs0SOjTDcUnyyP9", "size": 15148, "thumbnail_url": "https://app.close.com/go/sms/acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp/media/media_7Ga8l93XLVvqNsgjPbBuUI/thumbnail/", "url": "https://app.close.com/go/sms/acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp/media/media_7Ga8l93XLVvqNsgjPbBuUI/" } ], "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "cost": "1", "created_by": null, "created_by_name": null, "date_created": "2016-10-03T16:06:11.167000+00:00", "date_scheduled": null, "date_sent": null, "date_updated": "2016-10-03T16:06:11.167000+00:00", "direction": "inbound", "error_message": null, "id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "local_country_iso": "US", "local_phone": "+16503334444", "local_phone_formatted": "+1 650-333-4444", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_country_iso": "US", "remote_phone": "+18183004000", "remote_phone_formatted": "+1 818-300-4000", "source": "Close.io", "status": "inbox", "template_id": null, "text": "SMS in Close? HUZZAH!!!", "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Tobias Fuenke", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/SMSActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "activities.sms_create", "tags": [ "activities.sms" ], "summary": "Create an SMS activity", "description": "*status* must be one of the following:\n\n - `inbox` to log an already received SMS.\n - `draft` to create a draft SMS.\n - `scheduled` to send an SMS at a scheduled date and time, which must be specified in the `date_scheduled` field.\n - `outbox` to actually **send** an SMS. To delay SMS sending by a few seconds (to allow undo), specify `send_in` in seconds (must be less than 60).\n - `sent` to log an already sent SMS.\n\nOnly drafts can be modified, and their status can be changed to `scheduled` (to send later) or `outbox` (to send immediately). Scheduled SMS, or SMS in outbox that weren't sent yet can be canceled by setting the status back to `draft`.\n\nYou have to provide a `local_phone` that will be used to send the SMS. The number you choose has to be associated with a Phone Number of type `internal`. See the [Phone Numbers](https://developer.close.com/api/resources/phone-numbers) paragraph for more details.\n\nA `template_id` referencing an SMS Template may be provided instead of `text` to automatically render that template and use the content as `text`.\n\nWhen `direction` is not provided, but `status=\"inbox\"`, `direction` will default to \"inbound\". Otherwise, `direction` defaults to \"outbound\".\n\nWhen creating a new SMS with the status set to `inbox`, you can pass the query parameter `send_to_inbox` with the value of `true` to create a corresponding Inbox Notification for the SMS.", "parameters": [ { "in": "query", "name": "send_to_inbox", "required": false, "schema": { "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "example": { "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "direction": "inbound", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "local_phone": "+14154445555", "remote_phone": "+18183334444", "source": "External", "status": "inbox", "text": "Hi! This is a reminder that we have a call scheduled for 12pm PT today." }, "schema": { "$ref": "#/components/schemas/CreateSMSActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "SMS", "activity_at": "2016-10-03T16:06:11.167000+00:00", "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "cost": "1", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Tobias Fuenke", "date_created": "2016-10-03T16:06:11.167000+00:00", "date_scheduled": null, "date_sent": null, "date_updated": "2016-10-03T16:06:11.167000+00:00", "direction": "outbound", "error_message": null, "id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "local_country_iso": "US", "local_phone": "+14154445555", "local_phone_formatted": "+1 415-444-5555", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_country_iso": "US", "remote_phone": "+18183334444", "remote_phone_formatted": "+1 818-333-4444", "source": "Close.io", "status": "outbox", "template_id": null, "text": "Hi! This is a reminder that we have a call scheduled for 12pm PT today.", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Tobias Fuenke", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Tobias Fuenke", "users": [] }, "schema": { "$ref": "#/components/schemas/SMSActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/sms/{id}/": { "get": { "operationId": "activities.sms_get", "tags": [ "activities.sms" ], "summary": "Get a single SMS activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "SMS", "activity_at": "2016-10-03T16:06:11.167000+00:00", "attachments": [ { "content_type": "image/png", "filename": "media_1.png", "media_id": "media_1GnAWzBfs0SOjTDcUnyyP9", "size": 15148, "thumbnail_url": "https://app.close.com/go/sms/acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp/media/media_7Ga8l93XLVvqNsgjPbBuUI/thumbnail/", "url": "https://app.close.com/go/sms/acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp/media/media_7Ga8l93XLVvqNsgjPbBuUI/" } ], "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "cost": "1", "created_by": null, "created_by_name": null, "date_created": "2016-10-03T16:06:11.167000+00:00", "date_scheduled": null, "date_sent": null, "date_updated": "2016-10-03T16:06:11.167000+00:00", "direction": "inbound", "error_message": null, "id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "local_country_iso": "US", "local_phone": "+16503334444", "local_phone_formatted": "+1 650-333-4444", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_country_iso": "US", "remote_phone": "+18183004000", "remote_phone_formatted": "+1 818-300-4000", "source": "Close.io", "status": "inbox", "template_id": null, "text": "SMS in Close? HUZZAH!!!", "updated_by": null, "updated_by_name": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Tobias Fuenke", "users": [] }, "schema": { "$ref": "#/components/schemas/SMSActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "activities.sms_update", "tags": [ "activities.sms" ], "summary": "Update an SMS activity", "description": "This can be used to modify a draft or send it once the draft is complete.\n\nTo send an SMS immediately, you can update its `status` to `outbox`. To send it at a later time, change the `status` to `scheduled` and provide the desired date & time in the `date_scheduled` field.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "text": "Updated text message!" }, "schema": { "$ref": "#/components/schemas/UpdateSMSActivity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "SMS", "activity_at": "2016-10-03T16:06:11.167000+00:00", "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "cost": "1", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Tobias Fuenke", "date_created": "2016-10-03T16:06:11.167000+00:00", "date_scheduled": null, "date_sent": null, "date_updated": "2016-10-03T18:00:00.167000+00:00", "direction": "outbound", "error_message": null, "id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "local_country_iso": "US", "local_phone": "+14154445555", "local_phone_formatted": "+1 415-444-5555", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_country_iso": "US", "remote_phone": "+18183334444", "remote_phone_formatted": "+1 818-333-4444", "source": "Close.io", "status": "draft", "template_id": null, "text": "Updated text message!", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Tobias Fuenke", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Tobias Fuenke", "users": [] }, "schema": { "$ref": "#/components/schemas/SMSActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.sms_delete", "tags": [ "activities.sms" ], "summary": "Delete an SMS activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/status_change/lead/": { "get": { "operationId": "activities.lead_status_changes_list", "tags": [ "activities.lead_status_changes" ], "summary": "List or filter all LeadStatusChange activities", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "LeadStatusChange", "activity_at": "2013-08-23T20:57:45.956000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Anthony Nemitz", "date_created": "2013-08-23T20:57:45.956000+00:00", "date_updated": "2013-08-23T20:57:45.956000+00:00", "id": "acti_jSqoxKYTY522iEfrKfKzqjhw5zP8uS59SQx38KGbbhx", "lead_id": "lead_DwJwyY8nynRQicBMFPFccrbAJHT1bxv7t31UiphS9kv", "new_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8", "new_status_label": "Trial Qualified", "old_status_id": "stat_TRuQucMjSlSSV6cGAQixHBNyU2FS9zDyixNguwlfXxu", "old_status_label": "Trial", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Anthony Nemitz", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Anthony Nemitz", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/LeadStatusChangeActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "activities.lead_status_changes_create", "tags": [ "activities.lead_status_changes" ], "summary": "Create a new LeadStatusChange activity", "description": "Creating a lead status change does not change the lead's status. It only logs the status change event in the lead's activity feed. This should only be used to import historical status changes from another system.", "requestBody": { "content": { "application/json": { "example": { "date_created": "2013-08-23T20:57:45.956000+00:00", "lead_id": "lead_fioU1Nk5LC0H0iei9XBGHW2CFZU0yeP2zZCJQP9pC4m", "new_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8", "old_status_id": "stat_TRuQucMjSlSSV6cGAQixHBNyU2FS9zDyixNguwlfXxu" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "LeadStatusChange", "activity_at": "2013-08-23T20:57:45.956000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Anthony Nemitz", "date_created": "2013-08-23T20:57:45.956000+00:00", "date_updated": "2013-08-23T20:57:45.956000+00:00", "id": "acti_jSqoxKYTY522iEfrKfKzqjhw5zP8uS59SQx38KGbbhx", "lead_id": "lead_fioU1Nk5LC0H0iei9XBGHW2CFZU0yeP2zZCJQP9pC4m", "new_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8", "new_status_label": "Trial Qualified", "old_status_id": "stat_TRuQucMjSlSSV6cGAQixHBNyU2FS9zDyixNguwlfXxu", "old_status_label": "Trial", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Anthony Nemitz", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Anthony Nemitz", "users": [] }, "schema": { "$ref": "#/components/schemas/LeadStatusChangeActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/status_change/lead/{id}/": { "get": { "operationId": "activities.lead_status_changes_get", "tags": [ "activities.lead_status_changes" ], "summary": "Get a single LeadStatusChange activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "LeadStatusChange", "activity_at": "2013-08-23T20:57:45.956000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Anthony Nemitz", "date_created": "2013-08-23T20:57:45.956000+00:00", "date_updated": "2013-08-23T20:57:45.956000+00:00", "id": "acti_jSqoxKYTY522iEfrKfKzqjhw5zP8uS59SQx38KGbbhx", "lead_id": "lead_DwJwyY8nynRQicBMFPFccrbAJHT1bxv7t31UiphS9kv", "new_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8", "new_status_label": "Trial Qualified", "old_status_id": "stat_TRuQucMjSlSSV6cGAQixHBNyU2FS9zDyixNguwlfXxu", "old_status_label": "Trial", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Anthony Nemitz", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Anthony Nemitz", "users": [] }, "schema": { "$ref": "#/components/schemas/LeadStatusChangeActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.lead_status_changes_delete", "tags": [ "activities.lead_status_changes" ], "summary": "Delete a single LeadStatusChange activity", "description": "Deleting a LeadStatusChange does not change the status of the Lead. It only removes the status change event from the Lead's activity feed.\n\nIt should only be used if the status change is irrelevant (such as records for a change that has been reverted) and having it in the activity feed is causing integration problems with another system.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/status_change/opportunity/": { "get": { "operationId": "activities.opportunity_status_changes_list", "tags": [ "activities.opportunity_status_changes" ], "summary": "List or filter all OpportunityStatusChange activities", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "in": "query", "name": "opportunity_id", "required": false, "schema": { "title": "Opportunity ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "OpportunityStatusChange", "activity_at": "2013-08-23T21:21:11.862000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Anthony Nemitz", "date_created": "2013-08-23T21:21:11.862000+00:00", "date_updated": "2013-08-23T21:21:11.862000+00:00", "id": "acti_CAI2lO44gRLMIvgsKfPZghRyuv1h8S3l7c4cDznXukd", "lead_id": "lead_0VaTsortzKpCv1ik6hbNoudduuD0m2Itevet0fKX39G", "new_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "new_pipeline_name": "Sales", "new_status_id": "stat_DetsqwxFOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G", "new_status_label": "Won", "new_status_type": "won", "old_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "old_pipeline_name": "Sales", "old_status_id": "stat_ue534UFRaocoMJJA9CYCwnMsRJP2qt6YGnpZOAx7ckK", "old_status_label": "Active", "old_status_type": "active", "opportunity_confidence": 100, "opportunity_date_won": "2013-08-23T00:00:00+00:00", "opportunity_id": "oppo_fn2kSFXS06akJ7XisR7vQQeObyK4upCc43RiAx1Vyz6", "opportunity_value": 0, "opportunity_value_currency": "USD", "opportunity_value_formatted": null, "opportunity_value_period": "one_time", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Anthony Nemitz", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Anthony Nemitz", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/OpportunityStatusChangeActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "activities.opportunity_status_changes_create", "tags": [ "activities.opportunity_status_changes" ], "summary": "Create a new OpportunityStatusChange activity", "description": "Creating an opportunity status change does not change the opportunity's status. It only logs the status change event. This should only be used to import historical status changes from another system.", "requestBody": { "content": { "application/json": { "example": { "date_created": "2013-08-23T20:57:45.956000+00:00", "lead_id": "lead_fioU1Nk5LC0H0iei9XBGHW2CFZU0yeP2zZCJQP9pC4m", "new_status_id": "stat_DetsqwxFOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G", "old_status_id": "stat_ue534UFRaocoMJJA9CYCwnMsRJP2qt6YGnpZOAx7ckK", "opportunity_id": "oppo_fn2kSFXS06akJ7XisR7vQQeObyK4upCc43RiAx1Vyz6" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "OpportunityStatusChange", "activity_at": "2013-08-23T21:21:11.862000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Anthony Nemitz", "date_created": "2013-08-23T21:21:11.862000+00:00", "date_updated": "2013-08-23T21:21:11.862000+00:00", "id": "acti_CAI2lO44gRLMIvgsKfPZghRyuv1h8S3l7c4cDznXukd", "lead_id": "lead_0VaTsortzKpCv1ik6hbNoudduuD0m2Itevet0fKX39G", "new_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "new_pipeline_name": "Sales", "new_status_id": "stat_DetsqwxFOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G", "new_status_label": "Won", "new_status_type": "won", "old_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "old_pipeline_name": "Sales", "old_status_id": "stat_ue534UFRaocoMJJA9CYCwnMsRJP2qt6YGnpZOAx7ckK", "old_status_label": "Active", "old_status_type": "active", "opportunity_confidence": 100, "opportunity_date_won": "2013-08-23T00:00:00+00:00", "opportunity_id": "oppo_fn2kSFXS06akJ7XisR7vQQeObyK4upCc43RiAx1Vyz6", "opportunity_value": 0, "opportunity_value_currency": "USD", "opportunity_value_formatted": null, "opportunity_value_period": "one_time", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Anthony Nemitz", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Anthony Nemitz", "users": [] }, "schema": { "$ref": "#/components/schemas/OpportunityStatusChangeActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/status_change/opportunity/{id}/": { "get": { "operationId": "activities.opportunity_status_changes_get", "tags": [ "activities.opportunity_status_changes" ], "summary": "Get a single OpportunityStatusChange activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "OpportunityStatusChange", "activity_at": "2013-08-23T21:21:11.862000+00:00", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Anthony Nemitz", "date_created": "2013-08-23T21:21:11.862000+00:00", "date_updated": "2013-08-23T21:21:11.862000+00:00", "id": "acti_CAI2lO44gRLMIvgsKfPZghRyuv1h8S3l7c4cDznXukd", "lead_id": "lead_0VaTsortzKpCv1ik6hbNoudduuD0m2Itevet0fKX39G", "new_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "new_pipeline_name": "Sales", "new_status_id": "stat_DetsqwxFOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G", "new_status_label": "Won", "new_status_type": "won", "old_pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "old_pipeline_name": "Sales", "old_status_id": "stat_ue534UFRaocoMJJA9CYCwnMsRJP2qt6YGnpZOAx7ckK", "old_status_label": "Active", "old_status_type": "active", "opportunity_confidence": 100, "opportunity_date_won": "2013-08-23T00:00:00+00:00", "opportunity_id": "oppo_fn2kSFXS06akJ7XisR7vQQeObyK4upCc43RiAx1Vyz6", "opportunity_value": 0, "opportunity_value_currency": "USD", "opportunity_value_formatted": null, "opportunity_value_period": "one_time", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Anthony Nemitz", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Anthony Nemitz", "users": [] }, "schema": { "$ref": "#/components/schemas/OpportunityStatusChangeActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.opportunity_status_changes_delete", "tags": [ "activities.opportunity_status_changes" ], "summary": "Delete a single OpportunityStatusChange activity", "description": "Deleting an OpportunityStatusChange does not change the status of the Opportunity. It only removes the status change event from the Lead's activity feed.\n\nIt should only be used if the status change is irrelevant (such as records for a change that has been reverted) and having it in the activity feed is causing integration problems with another system.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/task_completed/": { "get": { "operationId": "activities.task_completions_list", "tags": [ "activities.task_completions" ], "summary": "List or filter all TaskCompleted activities", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "TaskCompleted", "activity_at": "2013-02-01T01:05:04.070000+00:00", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "task_assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "task_assigned_to_name": "Stefan W\u00f3jcik", "task_id": "task_ask2cItUeDL0jvuoJIcOocrqhqVVnLUZrEbcdM3ihhT", "task_text": "Follow up", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Stefan W\u00f3jcik", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Stefan W\u00f3jcik", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/TaskCompletedActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/task_completed/{id}/": { "get": { "operationId": "activities.task_completions_get", "tags": [ "activities.task_completions" ], "summary": "Get a single TaskCompleted activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "TaskCompleted", "activity_at": "2013-02-01T01:05:04.070000+00:00", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "task_assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "task_assigned_to_name": "Stefan W\u00f3jcik", "task_id": "task_ask2cItUeDL0jvuoJIcOocrqhqVVnLUZrEbcdM3ihhT", "task_text": "Follow up", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Stefan W\u00f3jcik", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Stefan W\u00f3jcik", "users": [] }, "schema": { "$ref": "#/components/schemas/TaskCompletedActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.task_completions_delete", "tags": [ "activities.task_completions" ], "summary": "Delete a TaskCompleted activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/whatsapp_message/": { "get": { "operationId": "activities.whatsapp_messages_list", "tags": [ "activities.whatsapp_messages" ], "summary": "List or filter all WhatsAppMessage activities", "description": "Filter by `external_whatsapp_message_id` to find messages to update or delete based on changes in WhatsApp.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/ActivityFilters_IdInParam" }, { "$ref": "#/components/parameters/ActivityFilters_LeadIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_ContactIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_UserIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "$ref": "#/components/parameters/ActivityFilters_TypeParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_DateCreatedLtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLteParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtGtParam" }, { "$ref": "#/components/parameters/ActivityFilters_ActivityAtLtParam" }, { "in": "query", "name": "external_whatsapp_message_id", "required": false, "schema": { "title": "External WhatsApp Message ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "WhatsAppMessage", "activity_at": "2013-02-01T01:06:35.668000+00:00", "attachments": [], "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "direction": "outgoing", "external_whatsapp_message_id": "1234567890", "id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "integration_link": "https://example.com/messages/1234567890", "integration_name": "API", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "local_phone": "+16503334444", "local_phone_formatted": "+1 650-333-444", "message_html": "

          test

          ", "message_markdown": "test", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_phone": "+18183004000", "remote_phone_formatted": "+1 818-300-4000", "response_to_id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "source": "api", "text": "test", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Stefan W\u00f3jcik", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [] } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/WhatsAppMessageActivity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "activities.whatsapp_messages_create", "tags": [ "activities.whatsapp_messages" ], "summary": "Create a WhatsAppMessage activity", "description": "`external_whatsapp_message_id` must be the ID of the message inside WhatsApp. You can filter by this field to find messages in Close to update or delete based on updates or deletions in WhatsApp.\n\n`message_markdown` must be the body of the message in the WhatsApp Markdown format. The `message_html` read-only field will return the HTML representation of this message.\n\nTo include an attachment, you must first upload the file to Close using the [Files API](https://developer.close.com/api/resources/files). Then, add an object to the `attachments` array with the following fields: `url`, `filename`, and `content_type`. The `url` should be the URL provided in the `download.url` field of the response from the [Files API](https://developer.close.com/api/resources/files). It must begin with `https://app.close.com/go/file/`.\n\n`integration_link` (optional) is a URL string that can be provided by the integration partner creating the WhatsApp message. This can be used to link back to the message in the external system.\n\n`response_to_id` (optional) is the Close activity ID of another WhatsApp message activity (not the WhatsApp native message ID) that this message is replying to. This field creates a thread relationship between messages, allowing you to track conversation flow and message replies within WhatsApp threads. The ID must be a valid WhatsApp message activity ID in Close (e.g., `acti_...`).\n\nOnly WhatsApp Markdown messages and file attachments are supported. No support is provided for Polls, Events, Locations, etc.\n\n**Important**: The total size of all attachments for a single WhatsApp message activity cannot exceed 25MB.\n\nWhen creating a new WhatsApp message with the direction set to `incoming`, you can pass the query parameter `send_to_inbox` with the value of `true` to create a corresponding Inbox Notification for the message.", "parameters": [ { "in": "query", "name": "send_to_inbox", "required": false, "schema": { "type": "boolean" } } ], "requestBody": { "content": { "application/json": { "example": { "activity_at": "2016-10-03T16:06:11.167000+00:00", "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "direction": "outgoing", "external_whatsapp_message_id": "1234567890", "integration_link": "https://example.com/messages/1234567890", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "local_phone": "16503334444", "message_markdown": "test", "remote_phone": "18183004000", "response_to_id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak" }, "schema": { "$ref": "#/components/schemas/CreateWhatsAppMessage" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "WhatsAppMessage", "activity_at": "2016-10-03T16:06:11.167000+00:00", "attachments": [], "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Tobias Fuenke", "date_created": "2016-10-03T16:06:11.167000+00:00", "date_updated": "2016-10-03T16:06:11.167000+00:00", "direction": "outgoing", "external_whatsapp_message_id": "1234567890", "id": "acti_12358hIUhaklslYoYSbtozZuUTyB2zO2nhm7iVSpZpp", "integration_link": "https://example.com/messages/1234567890", "integration_name": "API", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "local_phone": "+16503334444", "local_phone_formatted": "+1 650-333-444", "message_html": "

          test

          ", "message_markdown": "test", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_phone": "+18183004000", "remote_phone_formatted": "+1 818-300-4000", "response_to_id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "source": "api", "text": "test", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Tobias Fuenke", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Tobias Fuenke", "users": [] }, "schema": { "$ref": "#/components/schemas/WhatsAppMessageActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/activity/whatsapp_message/{id}/": { "get": { "operationId": "activities.whatsapp_messages_get", "tags": [ "activities.whatsapp_messages" ], "summary": "Get a single WhatsAppMessage activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "WhatsAppMessage", "activity_at": "2013-02-01T01:06:35.668000+00:00", "attachments": [], "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan W\u00f3jcik", "date_created": "2013-02-01T01:05:04.070000+00:00", "date_updated": "2013-02-01T01:06:35.668000+00:00", "direction": "outgoing", "external_whatsapp_message_id": "1234567890", "id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "integration_link": "https://example.com/messages/1234567890", "integration_name": "API", "lead_id": "lead_KwD00BYbXCHiPWj68LxFkxaeWuULpZ7awzm6LqeFs0h", "local_phone": "+16503334444", "local_phone_formatted": "+1 650-333-444", "message_html": "

          test

          ", "message_markdown": "test", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_phone": "+18183004000", "remote_phone_formatted": "+1 818-300-4000", "response_to_id": "acti_asjiweURMfsLgKuYGqbQ4Qp7L5a16pQOcDfTgotqDak", "source": "api", "text": "test", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Stefan W\u00f3jcik", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [] }, "schema": { "$ref": "#/components/schemas/WhatsAppMessageActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "activities.whatsapp_messages_update", "tags": [ "activities.whatsapp_messages" ], "summary": "Update a WhatsAppMessage activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "message_markdown": "Updated content." }, "schema": { "$ref": "#/components/schemas/UpdateWhatsAppMessage" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "WhatsAppMessage", "activity_at": "2013-02-20T06:39:57.266000+00:00", "attachments": [], "contact_id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Bruce Wayne", "date_created": "2013-02-20T06:39:57.266000+00:00", "date_updated": "2013-02-20T06:41:59.846000+00:00", "direction": "outgoing", "external_whatsapp_message_id": "1234567890", "id": "acti_kwWA3rOfy4BnaZ8QQk3RIIAz51dU9ayiluy1s961Oiw", "integration_link": null, "integration_name": "API", "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "local_phone": "+16503334444", "local_phone_formatted": "+1 650-333-444", "message_html": "

          Updated content.

          ", "message_markdown": "Updated content.", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_phone": "+18183004000", "remote_phone_formatted": "+1 818-300-4000", "response_to_id": null, "source": "api", "text": "test", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Bruce Wayne", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Bruce Wayne", "users": [] }, "schema": { "$ref": "#/components/schemas/WhatsAppMessageActivity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "activities.whatsapp_messages_delete", "tags": [ "activities.whatsapp_messages" ], "summary": "Delete a WhatsAppMessage activity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/blocked_phone_number/": { "get": { "operationId": "blocked_phone_numbers_list", "tags": [ "blocked_phone_numbers" ], "summary": "List Blocked Phone Numbers", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2026-03-01T12:00:00.000000+00:00", "date_updated": "2026-03-01T12:00:00.000000+00:00", "id": "blkph_3wMz8Tc8NRE2YzDT5vNb1h", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phone": "+15553334444", "reason": "Unwanted Caller", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/BlockedPhoneNumber" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "blocked_phone_numbers_create", "tags": [ "blocked_phone_numbers" ], "summary": "Create a Blocked Phone Number", "description": "Once this record is created, the phone number you have specified will no longer work for outbound nor inbound calls. That means:\n\n* Nobody in your organization will be able to call that phone number.\n* That phone number will not be able to call anybody in your organization.", "requestBody": { "content": { "application/json": { "example": { "phone": "+15553334444", "reason": "Unwanted Caller" }, "schema": { "$ref": "#/components/schemas/CreateBlockedPhoneNumber" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2026-03-01T12:00:00.000000+00:00", "date_updated": "2026-03-01T12:00:00.000000+00:00", "id": "blkph_3wMz8Tc8NRE2YzDT5vNb1h", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phone": "+15553334444", "reason": "Unwanted Caller", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BlockedPhoneNumber" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/blocked_phone_number/settings/": { "get": { "operationId": "blocked_phone_numbers_get_settings", "tags": [ "blocked_phone_numbers" ], "summary": "Retrieve Blocked Phone Number settings", "responses": { "200": { "content": { "application/json": { "example": { "reject_anonymous_inbound_calls": false }, "schema": { "$ref": "#/components/schemas/BlockedPhoneNumberSettings" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "blocked_phone_numbers_update_settings", "tags": [ "blocked_phone_numbers" ], "summary": "Update Blocked Phone Number settings", "requestBody": { "content": { "application/json": { "example": { "reject_anonymous_inbound_calls": true }, "schema": { "$ref": "#/components/schemas/UpdateBlockedPhoneNumberSettings" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "reject_anonymous_inbound_calls": true }, "schema": { "$ref": "#/components/schemas/BlockedPhoneNumberSettings" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/blocked_phone_number/{id}/": { "get": { "operationId": "blocked_phone_numbers_get", "tags": [ "blocked_phone_numbers" ], "summary": "Retrieve a single Blocked Phone Number", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2026-03-01T12:00:00.000000+00:00", "date_updated": "2026-03-01T12:00:00.000000+00:00", "id": "blkph_3wMz8Tc8NRE2YzDT5vNb1h", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phone": "+15553334444", "reason": "Unwanted Caller", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BlockedPhoneNumber" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "blocked_phone_numbers_update", "tags": [ "blocked_phone_numbers" ], "summary": "Update a Blocked Phone Number", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "reason": "Incessant Robocaller" }, "schema": { "$ref": "#/components/schemas/UpdateBlockedPhoneNumber" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2026-03-01T12:00:00.000000+00:00", "date_updated": "2026-03-01T12:00:00.000000+00:00", "id": "blkph_3wMz8Tc8NRE2YzDT5vNb1h", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phone": "+15553334444", "reason": "Incessant Robocaller", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BlockedPhoneNumber" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "blocked_phone_numbers_delete", "tags": [ "blocked_phone_numbers" ], "summary": "Delete a Blocked Phone Number", "description": "Once the given Blocked Phone Number record is deleted, the specified \"\n\"phone number will again be able to make calls into your organization \"\n\"and you'll be able to make calls to it.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/bulk_action/delete/": { "get": { "operationId": "bulk_actions.delete_list", "tags": [ "bulk_actions.delete" ], "summary": "List bulk deletes", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "bulk_object_type": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2015-03-16T00:19:50.141000+00:00", "date_updated": "2015-03-16T00:20:09.442000+00:00", "id": "bulkdelete_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET", "n_leads": 77, "n_leads_processed": 77, "n_objects": 77, "n_objects_processed": 77, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "done", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/BulkDeleteAction" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "bulk_actions.delete_create", "tags": [ "bulk_actions.delete" ], "summary": "Initiate a new bulk delete", "description": "Use `\"send_done_email\": false` if you don't want to get a confirmation email after the bulk action is done.", "requestBody": { "content": { "application/json": { "example": { "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "bulk_object_type": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2015-03-16T00:19:50.141000+00:00", "date_updated": "2015-03-16T00:20:09.442000+00:00", "id": "bulkdelete_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET", "n_leads": null, "n_leads_processed": 0, "n_objects": null, "n_objects_processed": 0, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": true, "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ], "status": "created", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BulkDeleteAction" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/bulk_action/delete/{id}/": { "get": { "operationId": "bulk_actions.delete_get", "tags": [ "bulk_actions.delete" ], "summary": "Fetch a single bulk delete object", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "bulk_object_type": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2015-03-16T00:19:50.141000+00:00", "date_updated": "2015-03-16T00:20:09.442000+00:00", "id": "bulkdelete_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET", "n_leads": 77, "n_leads_processed": 77, "n_objects": 77, "n_objects_processed": 77, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "done", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BulkDeleteAction" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/bulk_action/edit/": { "get": { "operationId": "bulk_actions.edit_list", "tags": [ "bulk_actions.edit" ], "summary": "List bulk edits", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_name": null, "custom_field_value": null, "date_created": "2015-03-16T00:19:50.141000+00:00", "date_updated": "2015-03-16T00:20:09.442000+00:00", "id": "bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET", "lead_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8", "n_leads": 100, "n_leads_processed": 100, "n_objects": 100, "n_objects_processed": 100, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "done", "type": "set_lead_status", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/BulkEditAction" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "bulk_actions.edit_create", "tags": [ "bulk_actions.edit" ], "summary": "Initiate a new bulk edit", "description": "Pass additional parameters depending on which `type` is passed:\n\n - `set_lead_status` will set the Lead Status on all leads. It expects:\n - `lead_status_id` - ID of the Lead Status to use.\n - `clear_custom_field` will clear/remove/unset a specific custom field from all leads. It expects:\n - `custom_field_id` or `custom_field_name` - ID or exact name of the custom field to remove.\n - `set_custom_field` will set/update/add a specific custom field on all leads. It expects:\n - `custom_field_id` or `custom_field_name` - ID or exact name of the custom field to set/update.\n - `custom_field_value` - New value. Use `custom_field_values` to pass multiple values to custom fields that support it.\n - `custom_field_operation` - `replace`, `add`, or `remove` (defaults to `replace`). Only applicable for custom fields that accept multiple values.\n\nUse `\"send_done_email\": false` if you don't want to get a confirmation email after the bulk action is done.", "requestBody": { "content": { "application/json": { "example": { "lead_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ], "type": "set_lead_status" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_name": null, "custom_field_value": null, "date_created": "2015-03-16T00:19:50.141000+00:00", "date_updated": "2015-03-16T00:20:09.442000+00:00", "id": "bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET", "lead_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8", "n_leads": null, "n_leads_processed": 0, "n_objects": null, "n_objects_processed": 0, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": true, "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ], "status": "created", "type": "set_lead_status", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BulkEditAction" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/bulk_action/edit/{id}/": { "get": { "operationId": "bulk_actions.edit_get", "tags": [ "bulk_actions.edit" ], "summary": "Fetch a single bulk edit object", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_name": null, "custom_field_value": null, "date_created": "2015-03-16T00:19:50.141000+00:00", "date_updated": "2015-03-16T00:20:09.442000+00:00", "id": "bulkedit_asdVYCm54A0El829k39e7nIvlCSDDhVLuyb8aspGSET", "lead_status_id": "stat_t7Zd2uspYPvBafR5bu9agrFZFs8GToWIbDnkqSk8nT8", "n_leads": 100, "n_leads_processed": 100, "n_objects": 100, "n_objects_processed": 100, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "done", "type": "set_lead_status", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BulkEditAction" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/bulk_action/email/": { "get": { "operationId": "bulk_actions.email_list", "tags": [ "bulk_actions.email" ], "summary": "List bulk emails", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" }, { "in": "query", "name": "template_id", "required": false, "schema": { "title": "Template ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "contact_preference": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-12-05T18:34:41.753000+00:00", "date_updated": "2013-12-05T19:33:29.357000+00:00", "email_account_id": "emailacct_qwSIFLEjbJXBJOGb0KsqSvnxX5P9DTXUMnb6mFBLxNt", "id": "bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy", "n_leads": 824, "n_leads_processed": 523, "n_objects": 824, "n_objects_processed": 523, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sender": "sender@example.com", "sort": [], "status": "processing", "template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/BulkEmailAction" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "bulk_actions.email_create", "tags": [ "bulk_actions.email" ], "summary": "Initiate a new bulk email", "description": "`contact_preference` can be set to `lead` (only email the primary/first contact email of the lead) or `contact` (email the first contact email of each contact of the lead).", "requestBody": { "content": { "application/json": { "example": { "contact_preference": "lead", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ], "template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "contact_preference": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-12-05T18:34:41.753000+00:00", "date_updated": "2013-12-05T19:33:29.357000+00:00", "email_account_id": "emailacct_qwSIFLEjbJXBJOGb0KsqSvnxX5P9DTXUMnb6mFBLxNt", "id": "bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy", "n_leads": null, "n_leads_processed": 0, "n_objects": null, "n_objects_processed": 0, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sender": "sender@example.com", "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ], "status": "created", "template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BulkEmailAction" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/bulk_action/email/{id}/": { "get": { "operationId": "bulk_actions.email_get", "tags": [ "bulk_actions.email" ], "summary": "Fetch a single bulk email object", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "contact_preference": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-12-05T18:34:41.753000+00:00", "date_updated": "2013-12-05T19:33:29.357000+00:00", "email_account_id": "emailacct_qwSIFLEjbJXBJOGb0KsqSvnxX5P9DTXUMnb6mFBLxNt", "id": "bulkemail_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy", "n_leads": 824, "n_leads_processed": 523, "n_objects": 824, "n_objects_processed": 523, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sender": "sender@example.com", "sort": [], "status": "processing", "template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BulkEmailAction" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/bulk_action/sequence_subscription/": { "get": { "operationId": "bulk_actions.sequence_subscriptions_list", "tags": [ "bulk_actions.sequence_subscriptions" ], "summary": "List bulk sequence subscriptions", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "action_type": "subscribe", "calls_assigned_to": null, "contact_preference": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-12-05T18:34:41.753000+00:00", "date_updated": "2013-12-05T19:33:29.357000+00:00", "from_phone_number_id": null, "id": "bulkseqsub_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy", "n_leads": 824, "n_leads_processed": 523, "n_objects": 824, "n_objects_processed": 523, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sort": [], "status": "processing", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/BulkSequenceSubscriptionAction" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "bulk_actions.sequence_subscriptions_create", "tags": [ "bulk_actions.sequence_subscriptions" ], "summary": "Initiate a new bulk sequence subscription", "description": "`action_type` must be one of:\n\n- `subscribe` to create a new sequence subscription for contacts that have never received the given sequence.\n- `resume` to resume any paused sequence subscriptions for the given sequence or all sequences if `sequence_id` is not provided.\n- `resume_finished` to resume any finished sequence subscriptions for the given sequence or all sequences if `sequence_id` is not provided.\n- `pause` to pause any active sequence subscriptions for the given sequence or all sequences if `sequence_id` is not provided.\n\n`sequence_id`, `sender_account_id`, `sender_name`, `sender_email` and `contact_preference` are required if `action_type` is `subscribe`.\n\n`contact_preference` can be set to:\n\n- `lead` to only subscribe the primary/first contact email of the lead.\n- `contact` to subscribe the primary email of each contact of the lead.", "requestBody": { "content": { "application/json": { "example": { "action_type": "subscribe", "contact_preference": "lead", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "action_type": "subscribe", "calls_assigned_to": null, "contact_preference": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-12-05T18:34:41.753000+00:00", "date_updated": "2013-12-05T19:33:29.357000+00:00", "from_phone_number_id": null, "id": "bulkseqsub_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy", "n_leads": 824, "n_leads_processed": 523, "n_objects": 824, "n_objects_processed": 523, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ], "status": "processing", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BulkSequenceSubscriptionAction" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/bulk_action/sequence_subscription/{id}/": { "get": { "operationId": "bulk_actions.sequence_subscriptions_get", "tags": [ "bulk_actions.sequence_subscriptions" ], "summary": "Fetch a single bulk sequence subscription object", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "action_type": "subscribe", "calls_assigned_to": null, "contact_preference": "lead", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-12-05T18:34:41.753000+00:00", "date_updated": "2013-12-05T19:33:29.357000+00:00", "from_phone_number_id": null, "id": "bulkseqsub_qmjJY85TSmMBqw1MKgL5o3LdSJkvklqfAwfdcjiRYCy", "n_leads": 824, "n_leads_processed": 523, "n_objects": 824, "n_objects_processed": 523, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "lead_status:Potential", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sender_account_id": "emailacct_aslkdjfalksjdfCmLShmuvlPMFy7Ze61FVeEj1VXnlG", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sort": [], "status": "processing", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/BulkSequenceSubscriptionAction" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/comment/": { "get": { "operationId": "comments_list", "tags": [ "comments" ], "summary": "Fetch multiple comments", "description": "Comments may be fetched by `object_id` (the object that was commented on) or by `thread_id`. Exactly one of those filters must be provided.\n\nComments on leads the requestor cannot see are omitted from the response.", "parameters": [ { "in": "query", "name": "thread_id", "required": false, "schema": { "title": "Thread ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "object_id", "required": false, "schema": { "title": "Object ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "body": "

          Real nice comment you've got here.

          ", "created_at": "2024-03-27T18:57:02.770240+00:00", "created_by": "user_abc123", "id": "comm_abc123", "lead_id": "lead_abc123", "mentions": [], "organization_id": "orga_abc123", "removed_at": null, "removed_by": null, "thread_id": "comthr_abc123", "updated_at": "2024-03-27T18:57:02.770240+00:00", "updated_by": "user_abc123" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "comments_create", "tags": [ "comments" ], "summary": "Create a Comment", "description": "Create a comment on an object. If a comment thread already exists on that object, a new comment is added to the existing thread. If no thread exists yet, one is created automatically.", "requestBody": { "content": { "application/json": { "example": { "body": "

          Real nice activity you've got here.

          ", "object_id": "acti_abc123" }, "schema": { "$ref": "#/components/schemas/CreateComment" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "body": "

          Real nice activity you've got here.

          ", "created_at": "2024-03-27T18:57:02.770240+00:00", "created_by": "user_abc123", "id": "comm_abc123", "lead_id": "lead_abc123", "mentions": [], "organization_id": "orga_abc123", "removed_at": null, "removed_by": null, "thread_id": "comthr_abc123", "updated_at": "2024-03-27T18:57:02.770240+00:00", "updated_by": "user_abc123" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/comment/{id}/": { "get": { "operationId": "comments_get", "tags": [ "comments" ], "summary": "Fetch an individual comment", "description": "A `404` is returned both when the comment does not exist and when the requestor cannot see its lead.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "body": "

          Real nice comment you've got here.

          ", "created_at": "2024-03-27T18:57:02.770240+00:00", "created_by": "user_abc123", "id": "comm_abc123", "lead_id": "lead_abc123", "mentions": [], "organization_id": "orga_abc123", "removed_at": null, "removed_by": null, "thread_id": "comthr_abc123", "updated_at": "2024-03-27T18:57:02.770240+00:00", "updated_by": "user_abc123" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "comments_update", "tags": [ "comments" ], "summary": "Update a Comment", "description": "You can use this endpoint to edit a comment body. Note that users may only update their own comments.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "body": "

          Oops, wrong activity

          " }, "schema": { "$ref": "#/components/schemas/UpdateCommentThreads" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "body": "

          Oops, wrong activity

          ", "created_at": "2024-03-27T18:57:02.770240+00:00", "created_by": "user_abc123", "id": "comm_abc123", "lead_id": "lead_abc123", "mentions": [], "organization_id": "orga_abc123", "removed_at": null, "removed_by": null, "thread_id": "comthr_abc123", "updated_at": "2024-03-27T18:57:02.770240+00:00", "updated_by": "user_abc123" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "comments_delete", "tags": [ "comments" ], "summary": "Remove a comment", "description": "Note that contrary to the HTTP verb, this does not necessarily _delete_ a comment (but it will _remove_ it). Comments bodies are removed, but the comment object still exists until all comments in a thread are removed (at which point the entire thread is deleted).\n\nPermissions around removing comments inherit from the users permission to delete their own or other users' activities.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/comment_thread/": { "get": { "operationId": "comments_list_threads", "tags": [ "comments" ], "summary": "Fetch multiple comment threads", "description": "Users with restricted lead visibility cannot list comment threads across all leads, and must scope the request to specific threads or objects via the `ids` or `object_ids` filters. Unscoped requests from such users return a `403`.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "in": "query", "name": "ids", "required": false, "schema": { "title": "IDs", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } }, { "in": "query", "name": "object_ids", "required": false, "schema": { "title": "Object IDs", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_at": "2024-03-27T18:57:02.759492+00:00", "id": "comthr_abc123", "lead_id": "lead_abc123", "num_comments": 2, "object_id": "acti_abc123", "object_type": "activity.custom_activity", "organization_id": "orga_abc123", "participating": [ "user_abc123" ], "updated_at": "2024-03-27T21:24:20.379507+00:00" } ], "has_more": true } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "403": { "description": "The requestor has restricted lead visibility and did not scope the request by `ids` or `object_ids`." }, "404": { "description": "Not found" } } } }, "/comment_thread/{id}/": { "get": { "operationId": "comments_get_thread", "tags": [ "comments" ], "summary": "Fetch an individual comment thread", "description": "A `404` is returned both when the comment thread does not exist and when the requestor cannot see its lead.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "created_at": "2024-03-27T18:57:02.759492+00:00", "id": "comthr_abc123", "lead_id": "lead_abc123", "num_comments": 2, "object_id": "acti_abc123", "object_type": "activity.custom_activity", "organization_id": "orga_abc123", "participating": [ "user_abc123" ], "updated_at": "2024-03-27T21:24:20.379507+00:00" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/connected_account/": { "get": { "operationId": "connected_accounts_list", "tags": [ "connected_accounts" ], "summary": "List connected accounts", "description": "You can filter down to a specific user by passing the `?user_id` query parameter.", "parameters": [ { "in": "query", "name": "_fields", "required": false, "schema": { "title": "Fields", "default": [ "_type", "available_calendars", "available_features", "calendar_receive_status", "calendly", "date_created", "default_identity", "email", "email_receive_status", "enabled_features", "has_meeting_creation_scopes", "id", "identities", "imap", "is_imap_archive_sync_enabled", "latest_receive_error", "latest_send_error", "lead_suggestions_updated_at", "organization_id", "receive_status", "send_status", "smtp", "sync_all_calendars", "synced_calendars", "user_id", "zoom_account_plan" ], "type": "array", "items": { "type": "string" } } }, { "in": "query", "name": "user_id", "required": false, "schema": { "title": "User ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "google", "id": "emailacct_qG1RuJuy5baiXvVbIc2VelooJwGcKeIrQLNtTd9p6RO", "identities": [ { "email": "anthony@close.com", "name": "Anthony Nemitz" } ], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "synced_calendars": [ "anthony@close.com" ], "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "_type": "custom_email", "id": "emailacct_ngOT8utnZjBlZyXJBS7hM9HkDphGvtt8J21VJm1KSqe", "identities": [ { "email": "anthony@close.com", "name": "Anthony Nemitz" }, { "email": "support@close.com", "name": "Close CRM Support" } ], "imap": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "smtp": { "host": "smtp.mailgun.org", "port": 465, "use_ssl": true, "username": "anthony@close.com" }, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "_type": "zoom", "email": "anthony@close.com", "id": "emailacct_0WwZ19CuOSGOtT2RMOqTPIMyvNMuFbfEr3Iul2hrWYm", "identities": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/connected_account/{id}/": { "get": { "operationId": "connected_accounts_get", "tags": [ "connected_accounts" ], "summary": "Fetch a single connected account", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "_fields", "required": false, "schema": { "title": "Fields", "default": [ "_type", "available_calendars", "available_features", "calendar_receive_status", "calendly", "date_created", "default_identity", "email", "email_receive_status", "enabled_features", "has_meeting_creation_scopes", "id", "identities", "imap", "is_imap_archive_sync_enabled", "latest_receive_error", "latest_send_error", "lead_suggestions_updated_at", "organization_id", "receive_status", "send_status", "smtp", "sync_all_calendars", "synced_calendars", "user_id", "zoom_account_plan" ], "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "google", "id": "emailacct_qG1RuJuy5baiXvVbIc2VelooJwGcKeIrQLNtTd9p6RO", "identities": [ { "email": "anthony@close.com", "name": "Anthony Nemitz" } ], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "synced_calendars": [ "anthony@close.com" ], "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/contact/": { "get": { "operationId": "contacts_list", "tags": [ "contacts" ], "summary": "List contacts", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" }, { "in": "query", "name": "lead_id", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": null, "date_created": "2013-02-01T00:54:51.300000+00:00", "date_updated": "2013-02-06T20:53:09.334000+00:00", "display_name": "Tobias F\u00fcnke", "emails": [ { "email": "tobiasfunke@close.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_q4xYmlGhA3060dEl0NDJuHRxPMuVjqLn30AFSzh1fRk", "name": "Tobias F\u00fcnke", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [], "title": "Blue Man Group (Understudy)", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": null, "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "CEO", "date_created": "2013-02-01T00:54:51.331000+00:00", "date_updated": "2013-02-06T20:53:01.954000+00:00", "display_name": "Bruce Wayne", "emails": [ { "email": "thedarkknight@close.com", "is_unsubscribed": true, "type": "office" } ], "id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh", "name": "Bruce Wayne", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "country": "US", "phone": "+16503334444", "phone_formatted": "+1 650-333-4444", "type": "office" } ], "title": "The Dark Knight", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": null, "date_created": "2013-02-01T00:54:51.298000+00:00", "date_updated": "2013-02-06T20:48:55.240000+00:00", "display_name": "Gob Bluth", "emails": [ { "email": "bluth@close.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_E7dYM0ecRoFQosxiPFz8IxazhN4k11uW8Sh1UsXjNjo", "name": "Gob Bluth", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [], "title": "Magician", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": null, "date_created": "2013-02-01T00:54:51.203000+00:00", "date_updated": "2013-02-01T00:59:33.689000+00:00", "display_name": "Close Support", "emails": [ { "email": "support@close.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_uw6ONU4iBcQg4TyqOKAwl0F1amULG9ZZsY57kHHdJNE", "name": "Close Support", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "country": "US", "is_unsubscribed": false, "phone": "+18552567346", "phone_formatted": "+1 855-256-7346", "type": "office" } ], "title": null, "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-08T05:02:39.552000+00:00", "date_updated": "2013-02-08T05:02:39.552000+00:00", "display_name": "phil", "emails": [ { "email": "phil@close.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_eXZwc2SVL4G3xSR85jnfPny2ykvoAQndSyi1Doa2YLO", "name": "phil", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [], "title": "", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T05:30:24.844000+00:00", "date_updated": "2013-02-20T05:44:14.700000+00:00", "display_name": "Gob", "emails": [ { "email": "gob@example.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05", "name": "Gob", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "country": "US", "phone": "+18004445555", "phone_formatted": "+1 800-444-5555", "type": "office" } ], "title": "sr. vice president", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T05:44:31.929000+00:00", "date_updated": "2013-02-20T05:44:31.929000+00:00", "display_name": "Gob", "emails": [ { "email": "gob@example.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_kfaRMPzwQ9yAOn96gVGUxKRKqsYv6QJStoLhlDEpquY", "name": "Gob", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "country": "US", "phone": "+18004445555", "phone_formatted": "+1 800-444-5555", "type": "office" } ], "title": "sr. vice president", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T05:44:35.625000+00:00", "date_updated": "2013-02-20T05:44:35.625000+00:00", "display_name": "Gob", "emails": [ { "email": "gob@example.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_3lUrUYmceYjzeqrIqF5jpSppZemyxvgquE8Oq1kM6p0", "name": "Gob", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "country": "US", "phone": "+18004445555", "phone_formatted": "+1 800-444-5555", "type": "office" } ], "title": "sr. vice president", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/Contact" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "contacts_create", "tags": [ "contacts" ], "summary": "Create a new contact", "description": "Contacts belong to exactly one Lead (specified by `lead_id`). If you do not provide a `lead_id` then a new lead will be created, named after the contact.\n\nCustom field values can be set by including `custom.cf_*` keys in the request body, e.g. `\"custom.cf_abc123\": \"value\"`.", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "Account Executive", "emails": [ { "email": "john@example.com", "type": "office" } ], "lead_id": "lead_QyNaWw4fdSwxl5Mc5daMFf3Y27PpIcH0awPbC9l7uyo", "name": "John Smith", "phones": [ { "phone": "9045551234", "type": "mobile" } ], "title": "President", "urls": [ { "type": "url", "url": "http://twitter.com/google/" } ] }, "schema": { "$ref": "#/components/schemas/CreateContact" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "Account Executive", "date_created": "2013-03-07T23:23:21.495000+00:00", "date_updated": "2013-03-07T23:23:21.495000+00:00", "display_name": "John Smith", "emails": [ { "email": "john@example.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_sNIdBgngvbdTTEN1mspKgUqKAWfbul4IITvnWoRw1T7", "name": "John Smith", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "country": "US", "phone": "+19045551234", "phone_formatted": "+1 904-555-1234", "type": "mobile" } ], "title": "President", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "urls": [ { "type": "url", "url": "http://twitter.com/google/" } ] }, "schema": { "$ref": "#/components/schemas/Contact" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/contact/{id}/": { "get": { "operationId": "contacts_get", "tags": [ "contacts" ], "summary": "Fetch a single contact", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T05:44:35.625000+00:00", "date_updated": "2013-02-20T05:44:35.625000+00:00", "display_name": "Gob", "emails": [ { "email": "gob@example.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_3lUrUYmceYjzeqrIqF5jpSppZemyxvgquE8Oq1kM6p0", "lead_id": "lead_etYl6PwL12hkj14567kjolJwZuZehb9b85EDH9CKuAI", "name": "Gob", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "country": "US", "phone": "+18004445555", "phone_formatted": "+1 800-444-5555", "type": "office" } ], "title": "sr. vice president", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Contact" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "contacts_update", "tags": [ "contacts" ], "summary": "Update an existing contact", "description": "Update a contact's information. Custom field values can be set by including `custom.cf_*` keys in the request body, e.g. `\"custom.cf_abc123\": \"value\"`.\n\nFor custom fields that accept multiple values, you can use `.add` or `.remove` suffixes to modify the existing list without replacing it:\n\n```json\n{ \"custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add\": \"Wednesday\" }\n```", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "name": "Johnny Smith" }, "schema": { "$ref": "#/components/schemas/UpdateContact" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "Sales Rep", "date_created": "2013-03-07T23:23:21.495000+00:00", "date_updated": "2013-03-08T13:13:21.495000+00:00", "display_name": "Johnny Smith", "emails": [ { "email": "john@example.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_sNIdBgngvbdTTEN1mspKgUqKAWfbul4IITvnWoRw1T7", "lead_id": "lead_QyNaWw4fdSwxl5Mc5daMFf3Y27PpIcH0awPbC9l7uyo", "name": "Johnny Smith", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "country": "US", "phone": "+19045551234", "phone_formatted": "+1 904-555-1234", "type": "mobile" } ], "title": "President", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "urls": [ { "type": "url", "url": "http://twitter.com/google/" } ] }, "schema": { "$ref": "#/components/schemas/Contact" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "contacts_delete", "tags": [ "contacts" ], "summary": "Delete a contact", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_activity/": { "get": { "operationId": "custom_activity_types_list", "tags": [ "custom_activity_types" ], "summary": "List Custom Activity Types", "description": "List all custom activity types defined in the organization. The response includes all Custom Activity Types, including their Custom Field metadata.", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "api_create_only": true, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-09T15:36:16.795350", "date_updated": "2020-07-09T15:36:16.795350", "description": "An API event only, with no fields.", "editable_with_roles": [], "fields": [], "id": "actitype_33dpZWDiI0KoJsmQFCKbgi", "is_archived": false, "name": "API Event", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" }, { "api_create_only": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-27T21:28:39.765523", "date_updated": "2020-07-27T21:28:39.765523", "description": "Heppens when the lead signs up for the newsletter", "editable_with_roles": [], "fields": [ { "accepts_multiple_values": false, "converting_to_type": null, "description": "Email of the person who signed up for the newsletter", "editable_with_roles": [], "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S", "name": "Email Address", "required": true, "type": "text" }, { "accepts_multiple_values": true, "converting_to_type": null, "description": null, "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Wants Marketing Materials", "required": false, "type": "choices" } ], "id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "is_archived": false, "name": "Newsletter Signup", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_activity_types_create", "tags": [ "custom_activity_types" ], "summary": "Create new Custom Activity Type", "description": "The type must be created before activity custom fields can be added.", "requestBody": { "content": { "application/json": { "example": { "api_create_only": false, "description": "Lead requested a product demo.", "editable_with_roles": [ "admin" ], "name": "Demo Requested" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "api_create_only": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-08-07T15:18:33.797245", "date_updated": "2020-08-07T15:18:33.797245", "description": "Lead requested a product demo.", "editable_with_roles": [ "admin" ], "fields": [], "id": "actitype_4cvujO1jQQkVYGPCiMsqMW", "is_archived": false, "name": "Demo Requested", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_activity/{id}/": { "get": { "operationId": "custom_activity_types_get", "tags": [ "custom_activity_types" ], "summary": "Retrieve a single Custom Activity Type", "description": "The response contains the Custom Activity Type including most Custom Field metadata.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "api_create_only": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-27T21:28:39.765523", "date_updated": "2020-07-27T21:28:39.765523", "description": "Heppens when the lead signs up for the newsletter", "editable_with_roles": [], "fields": [ { "accepts_multiple_values": false, "converting_to_type": null, "description": "Email of the person who signed up for the newsletter", "editable_with_roles": [], "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S", "name": "Email Address", "required": true, "type": "text" }, { "accepts_multiple_values": true, "converting_to_type": null, "description": null, "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Wants Marketing Materials", "required": false, "type": "choices" } ], "id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "is_archived": false, "name": "Newsletter Signup", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_activity_types_update", "tags": [ "custom_activity_types" ], "summary": "Update existing Custom Activity Type", "description": "The type's `name`, `description`, `api_create_only`, `editable_with_roles` and `is_archived` may be updated here. These properties will be updated immediately in the Custom Activity API.\n\nField order can be set here, but adding, modifying or removing fields from a Custom Activity Type must be done using the Custom Field API. The field order is a display property only, and does not affect the request and response for the Custom Activity API.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "fields": [ { "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g" }, { "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S" } ], "is_archived": true, "name": "Newsletter Signup" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "api_create_only": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-27T21:28:39.765523", "date_updated": "2020-08-07T16:23:36.429990", "description": null, "editable_with_roles": [], "fields": [ { "accepts_multiple_values": true, "converting_to_type": null, "description": null, "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Wants Marketing Materials", "required": false, "type": "choices" }, { "accepts_multiple_values": false, "converting_to_type": null, "description": "Email of the person who signed up for the newsletter", "editable_with_roles": [], "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S", "name": "Email Address", "required": true, "type": "text" } ], "id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "is_archived": true, "name": "Newsletter Signup", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_activity_types_delete", "tags": [ "custom_activity_types" ], "summary": "Delete a Custom Activity Type", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/activity/": { "get": { "operationId": "custom_fields.activity_list", "tags": [ "custom_fields.activity" ], "summary": "List Activity Custom Fields", "description": "List all the activity custom fields for your organization.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "accepts_multiple_values": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T17:36:09.235000+00:00", "date_updated": "2020-08-04T17:36:09.235000+00:00", "description": "Email of the person who signed up for the newsletter", "editable_with_roles": [], "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S", "name": "Email Address", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "required": true, "type": "text", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" }, { "accepts_multiple_values": false, "choices": [ "No", "Yes" ], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-07-28T20:05:36.202000+00:00", "date_updated": "2020-07-28T20:05:36.202000+00:00", "description": null, "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Wants Marketing Materials", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "required": false, "type": "choices", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_fields.activity_create", "tags": [ "custom_fields.activity" ], "summary": "Create a new Activity Custom Field", "description": "Activity Custom Fields belong to Custom Activities, and have additional attributes:\n\n- `custom_activity_type_id` \u2013 the ID of the Custom Activity Type this Field\n should belong to.\n- `required` \u2013 whether the Field will be required to publish the activity.", "requestBody": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "editable_with_roles": [], "name": "Contact Name", "required": false, "type": "text" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-07T17:11:44.299904", "date_updated": "2020-08-07T17:11:44.299904", "description": null, "editable_with_roles": [], "id": "cf_1nkEcnaoAiTJBfYmTBsOQqFCuIkqc82Q f4yKUx01e0K", "name": "Contact Name", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "required": false, "type": "text", "updated_ by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/activity/{id}/": { "get": { "operationId": "custom_fields.activity_get", "tags": [ "custom_fields.activity" ], "summary": "Fetch Activity Custom Field's details", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": [ "No", "Yes" ], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-07-28T20:05:36.202000+00:00", "date_updated": "2020-07-28T20:05:36.202000+00:00", "description": null, "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Wants Marketing Materials", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "required": false, "type": "choices", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_fields.activity_update", "tags": [ "custom_fields.activity" ], "summary": "Update an Activity Custom Field", "description": "You can rename it, change whether it accepts multiple values or not, change the \"required\" flag, change whether editing its values is restricted to specific Roles, or update the options for a \"choices\" field type. The updated name will immediately appear in the Close UI and only valid values for the updated `type` will be returned by the Custom Activity API.\n\nThe `custom_activity_type_id` and `type` values cannot be changed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Free-form Notes" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_activity_type_id": "actitype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-07T17:11:44.299904", "date_updated": "2020-08-07T17:11:44.299904", "description": null, "editable_with_roles": [], "id": "cf_1nkEcnaoAiTJBfYmTBsOQqFCuIkqc82Q f4yKUx01e0K", "name": "Free-form Notes", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "required": false, "type": "text", "updated_ by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_fields.activity_delete", "tags": [ "custom_fields.activity" ], "summary": "Delete an Activity Custom Field", "description": "Delete an activity custom field. The field will immediately disappear from API responses and values on existing activities will be permanently removed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/contact/": { "get": { "operationId": "custom_fields.contact_list", "tags": [ "custom_fields.contact" ], "summary": "List Contact Custom Fields", "description": "List all the contact custom fields for your organization.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "accepts_multiple_values": false, "choices": [ "Account Executive", "CEO", "Sales Rep" ], "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2020-02-07T11:54:50.770000+00:00", "date_updated": "2020-02-07T11:54:50.770000+00:00", "description": null, "editable_with_roles": [], "id": "cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj", "name": "Role", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "choices", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_fields.contact_create", "tags": [ "custom_fields.contact" ], "summary": "Create a new Contact Custom Field", "requestBody": { "content": { "application/json": { "example": { "choices": [ "Account Executive", "CEO", "Sales Rep" ], "description": "What's this Contact's role within their organization", "name": "Role", "type": "choices" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": [ "Account Executive", "CEO", "Sales Rep" ], "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2020-02-07T11:54:50.770000+00:00", "date_updated": "2020-02-07T11:54:50.770000+00:00", "description": "What's this Contact's role within their organization", "editable_with_roles": [], "id": "cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj", "name": "Role", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "choices", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/contact/{id}/": { "get": { "operationId": "custom_fields.contact_get", "tags": [ "custom_fields.contact" ], "summary": "Fetch Contact Custom Field's details", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": [ "Account Executive", "CEO", "Sales Rep" ], "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2020-02-07T11:54:50.770000+00:00", "date_updated": "2020-02-07T11:54:50.770000+00:00", "description": null, "editable_with_roles": [], "id": "cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj", "name": "Role", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "choices", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_fields.contact_update", "tags": [ "custom_fields.contact" ], "summary": "Update a Contact Custom Field", "description": "You can rename it, change its type, change whether it accepts multiple values or not, change whether editing its values is restricted to specific Roles, or update the options for a \"choices\" field type. The updated name will immediately appear in the Close UI and only valid values for the updated `type` will be returned by the Contact API.\n\nSome of the type changes need to convert all of the existing values for a given Custom Field to the new type. When this is required, the response will include an additional `converting_to_type` field. When the conversion is done, `converting_to_type` will no longer be returned.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Role in Organization" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": [ "Account Executive", "CEO", "Sales Rep" ], "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2020-02-07T11:54:50.770000+00:00", "date_updated": "2020-02-07T12:03:53.995000+00:00", "description": "What's this Contact's role within their organization", "editable_with_roles": [], "id": "cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj", "name": "Role in Organization", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "choices", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_fields.contact_delete", "tags": [ "custom_fields.contact" ], "summary": "Delete a Contact Custom Field", "description": "Delete a contact custom field. The field will immediately disappear from API responses and values on existing contacts will be permanently removed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/custom_object_type/": { "get": { "operationId": "custom_fields.custom_object_list", "tags": [ "custom_fields.custom_object" ], "summary": "List Custom Object Custom Fields", "description": "List all the custom object custom fields for your organization.", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "accepts_multiple_values": true, "back_reference_is_visible": true, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T17:36:09.235000+00:00", "date_updated": "2020-08-04T17:36:09.235000+00:00", "description": "Account objects using this Resource.", "editable_with_roles": [], "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S", "name": "Linked Accounts", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "referenced_custom_type_id": "cotype_4hQsScWF3hnUOyngoaAV00", "required": true, "type": "custom_object", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" }, { "accepts_multiple_values": false, "back_reference_is_visible": null, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_object_type_id": "cotype_4hQsScWF3hnUOyngoaAV00", "date_created": "2020-07-28T20:05:36.202000+00:00", "date_updated": "2020-07-28T20:05:36.202000+00:00", "description": "ID from the external Account system.", "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Account ID", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "referenced_custom_type_id": null, "required": false, "type": "text", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_fields.custom_object_create", "tags": [ "custom_fields.custom_object" ], "summary": "Create a new Custom Object Custom Field", "description": "Custom Object Custom Fields belong to Custom Objects, and have additional attributes:\n\n- `custom_object_type_id` \u2013 the ID of the Custom Object Type this Field\n should belong to.\n- `required` \u2013 whether the Field will be required to save the object.", "requestBody": { "content": { "application/json": { "example": { "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "description": "Number of users belonging to this Account.", "name": "User Count", "required": true, "type": "number" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-07T17:11:44.299904", "date_updated": "2020-08-07T17:11:44.299904", "description": "Number of users belonging to this Account.", "editable_with_roles": [], "id": "cf_1nkEcnaoAiTJBfYmTBsOQqFCuIkqc82Q f4yKUx01e0K", "name": "User Count", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "required": true, "type": "number", "updated_ by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/custom_object_type/{id}/": { "get": { "operationId": "custom_fields.custom_object_get", "tags": [ "custom_fields.custom_object" ], "summary": "Fetch Custom Object Custom Field's details", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": [ "No", "Yes" ], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-07-28T20:05:36.202000+00:00", "date_updated": "2020-07-28T20:05:36.202000+00:00", "description": null, "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Wants Marketing Materials", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "required": false, "type": "choices", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_fields.custom_object_update", "tags": [ "custom_fields.custom_object" ], "summary": "Update a Custom Object Custom Field", "description": "You can rename it, change whether it accepts multiple values or not, change the \"required\" flag, change whether editing its values is restricted to specific Roles, or update the options for a \"choices\" field type. The updated name will immediately appear in the Close UI and only valid values for the updated `type` will be returned by the Custom Object API.\n\nThe `custom_object_type_id` and `type` values cannot be changed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Free-form Notes" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-07T17:11:44.299904", "date_updated": "2020-08-07T17:11:44.299904", "description": null, "editable_with_roles": [], "id": "cf_1nkEcnaoAiTJBfYmTBsOQqFCuIkqc82Q f4yKUx01e0K", "name": "Free-form Notes", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "required": false, "type": "text", "updated_ by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_fields.custom_object_delete", "tags": [ "custom_fields.custom_object" ], "summary": "Delete a Custom Object Custom Field", "description": "Delete a custom field from a custom object type. The field will immediately disappear from API responses and values on existing custom object instances will be permanently removed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/lead/": { "get": { "operationId": "custom_fields.lead_list", "tags": [ "custom_fields.lead" ], "summary": "List Lead Custom Fields", "description": "List all the lead custom fields for your organization.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.422000+00:00", "date_updated": "2014-11-10T20:56:16.784000+00:00", "description": "The number of users in the company", "editable_with_roles": [], "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c", "name": "# of users", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "number", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "accepts_multiple_values": true, "choices": [ "Apparel", "Cars", "Cosmetics", "IT" ], "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.423000+00:00", "date_updated": "2014-11-12T22:37:55.752000+00:00", "description": null, "editable_with_roles": [], "id": "cf_8wtBWsdRU2Fur7GDnEeXQ7ra2Vu7R4hG1SNYdiEhh0F", "name": "Industry", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "choices", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-10T23:38:14.535000+00:00", "date_updated": "2014-11-10T23:38:14.535000+00:00", "description": "ID in the company database", "editable_with_roles": [ "admin", "role_4zhUd9gDKwVv0Bbl2Nk0Ud" ], "id": "cf_vvHHPVktybLXXqKrUF88PLsGm8sh202oMq3XGy6RcBm", "name": "Internal Database ID", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "text", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-10T20:56:44.780000+00:00", "date_updated": "2014-11-10T20:56:44.780000+00:00", "description": null, "editable_with_roles": [], "id": "cf_xUDvptVqoPQYv5tmRFDxemYOWFT9nlLRqJyQhpcNh4z", "name": "Language Preference", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "text", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.413000+00:00", "date_updated": "2014-11-10T20:51:12.636000+00:00", "description": "The date the trial expires", "editable_with_roles": [], "id": "cf_MakiQgTzKXrcL8sDJbS2lkuUcA2FxZJAW8Q38ARgwWh", "name": "Trial Due", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "date", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.413000+00:00", "date_updated": "2014-11-10T20:51:12.636000+00:00", "description": "The AE in charge of this account", "editable_with_roles": [], "id": "cf_MakiQgTzKXrcL8sDJbS2lkuUcA2FxZJAW8Q38ARgwWh", "name": "Owner", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "user", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_fields.lead_create", "tags": [ "custom_fields.lead" ], "summary": "Create a new Lead Custom Field", "requestBody": { "content": { "application/json": { "example": { "name": "# of users", "type": "number" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.422000+00:00", "date_updated": "2014-11-10T20:56:16.784000+00:00", "description": "The number of users in the company", "editable_with_roles": [], "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c", "name": "# of users", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "number", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/lead/{id}/": { "get": { "operationId": "custom_fields.lead_get", "tags": [ "custom_fields.lead" ], "summary": "Fetch Lead Custom Field's details", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.422000+00:00", "date_updated": "2014-11-10T20:56:16.784000+00:00", "description": "The number of users in the company", "editable_with_roles": [], "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c", "name": "# of users", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "number", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_fields.lead_update", "tags": [ "custom_fields.lead" ], "summary": "Update a Lead Custom Field", "description": "You can rename it, change its type, change whether it accepts multiple values or not, change whether editing its values is restricted to specific Roles, or update the options for a \"choices\" field type. The updated name will immediately appear in the Close UI and only valid values for the updated `type` will be returned by the Lead API.\n\nSome of the type changes need to convert all of the existing values for a given Custom Field to the new type. When this is required, the response will include an additional `converting_to_type` field. When the conversion is done, `converting_to_type` will no longer be returned.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Number of users", "type": "text" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.422000+00:00", "date_updated": "2014-11-10T20:56:16.784000+00:00", "description": "The number of users in the company", "editable_with_roles": [], "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c", "name": "Number of users", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "text", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_fields.lead_delete", "tags": [ "custom_fields.lead" ], "summary": "Delete a Lead Custom Field", "description": "Delete a lead custom field. The field will immediately disappear from API responses and values on existing leads will be permanently removed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/opportunity/": { "get": { "operationId": "custom_fields.opportunity_list", "tags": [ "custom_fields.opportunity" ], "summary": "List Opportunity Custom Fields", "description": "List all the opportunity custom fields for your organization.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2020-02-07T11:54:50.770000+00:00", "date_updated": "2020-02-07T11:54:50.770000+00:00", "description": null, "editable_with_roles": [], "id": "cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj", "name": "Contract Link", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "text", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_fields.opportunity_create", "tags": [ "custom_fields.opportunity" ], "summary": "Create a new Opportunity Custom Field", "requestBody": { "content": { "application/json": { "example": { "description": "Link to the contract for this opportunity.", "name": "Contract Link", "type": "text" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2020-02-07T11:54:50.770000+00:00", "date_updated": "2020-02-07T11:54:50.770000+00:00", "description": "Link to the contract for this opportunity", "editable_with_roles": [], "id": "cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj", "name": "Contract Link", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "text", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/opportunity/{id}/": { "get": { "operationId": "custom_fields.opportunity_get", "tags": [ "custom_fields.opportunity" ], "summary": "Fetch Opportunity Custom Field's details", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2020-02-07T11:54:50.770000+00:00", "date_updated": "2020-02-07T11:54:50.770000+00:00", "description": null, "editable_with_roles": [], "id": "cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj", "name": "Contract Link", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "text", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_fields.opportunity_update", "tags": [ "custom_fields.opportunity" ], "summary": "Update an Opportunity Custom Field", "description": "You can rename it, change its type, change whether it accepts multiple values or not, change whether editing its values is restricted to specific Roles, or update the options for a \"choices\" field type. The updated name will immediately appear in the Close UI and only valid values for the updated `type` will be returned by the Contact API.\n\nSome of the type changes need to convert all of the existing values for a given Custom Field to the new type. When this is required, the response will include an additional `converting_to_type` field. When the conversion is done, `converting_to_type` will no longer be returned.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Contract" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2020-02-07T11:54:50.770000+00:00", "date_updated": "2020-02-07T12:03:53.995000+00:00", "description": "Link to the contract for this opportunity", "editable_with_roles": [], "id": "cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj", "name": "Contract", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "text", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_fields.opportunity_delete", "tags": [ "custom_fields.opportunity" ], "summary": "Delete an Opportunity Custom Field", "description": "Delete an opportunity custom field. The field will immediately disappear from API responses and values on existing opportunities will be permanently removed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/shared/": { "get": { "operationId": "custom_fields.shared_list", "tags": [ "custom_fields.shared" ], "summary": "List Shared Custom Fields", "description": "List all the shared custom fields for your organization.", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "accepts_multiple_values": false, "associations": [ { "editable_with_roles": [], "object_type": "lead", "required": false }, { "editable_with_roles": [], "object_type": "contact", "required": false }, { "custom_activity_type_id": "actitype_2FqdeKTAEfMTwD4SVWwXqX", "editable_with_roles": [], "object_type": "custom_activity_type", "required": true } ], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2021-04-10T17:36:09.235000+00:00", "date_updated": "2021-04-10T17:36:09.235000+00:00", "description": "User assigned to this Lead/Contact/Activity.", "id": "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "name": "Owner", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "user", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" }, { "accepts_multiple_values": false, "associations": [ { "editable_with_roles": [], "object_type": "lead", "required": false }, { "editable_with_roles": [], "object_type": "contact", "required": false } ], "choices": [ "No", "Yes" ], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-28T20:05:36.202000+00:00", "date_updated": "2020-07-28T20:05:36.202000+00:00", "description": "They requested not to be contacted again.", "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Do Not Contact", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "choices", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_fields.shared_create", "tags": [ "custom_fields.shared" ], "summary": "Create a new Shared Custom Field", "requestBody": { "content": { "application/json": { "example": { "description": "User assigned to this Lead/Contact/Activity.", "name": "Owner", "type": "user" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "associations": [], "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2021-04-10T05:06:09.422000+00:00", "date_updated": "2021-04-10T20:56:16.784000+00:00", "description": "User assigned to this Lead/Contact/Activity.", "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c", "name": "Owner", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "user", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/shared/{id}/": { "get": { "operationId": "custom_fields.shared_get", "tags": [ "custom_fields.shared" ], "summary": "Fetch Shared Custom Field's details", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_fields.shared_update", "tags": [ "custom_fields.shared" ], "summary": "Update a Shared Custom Field", "description": "You can rename it or update the options for a \"choices\" field type. The updated name will immediately appear in the Close UI and only valid values for the updated `choices` will be returned by the Lead/Contact/Custom Activity APIs.\n\nThe `type` value cannot be changed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Free-form Notes" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "accepts_multiple_values": false, "associations": [ { "custom_activity_type_id": "actitype_2FqdeKTAEfMTwD4SVWwXqX", "editable_with_roles": [], "object_type": "custom_activity_type", "required": true }, { "custom_activity_type_id": "actitype_9ab3QuzEAmFTvd56kByOMn", "editable_with_roles": [], "object_type": "custom_activity_type", "required": true } ], "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2021-04-10T05:06:09.422000+00:00", "date_updated": "2021-04-10T20:56:16.784000+00:00", "description": null, "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c", "name": "Free-form Notes", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "text", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_fields.shared_delete", "tags": [ "custom_fields.shared" ], "summary": "Delete a Shared Custom Field", "description": "Delete a shared custom field and all its associations. The field will immediately disappear from API responses and values on all associated object types will be permanently removed.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/shared/{scf_id}/association/": { "post": { "operationId": "custom_fields.shared_create_association", "tags": [ "custom_fields.shared" ], "summary": "Associate a Shared Custom Field with an object type", "description": "Associates a Shared Custom Field with an object type such as Lead, Contact, or Custom Activity Type. Once associated, the Shared Custom Field can be set on objects of that type.\n\nThis endpoint accepts the following attributes:\n\n- `object_type` \u2013\u00a0can be one of: `lead`, `contact`, `opportunity`, `custom_activity_type`,\n `custom_object_type`.\n- `custom_activity_type_id` \u2013 ID of the Custom Activity Type that you want to\n associate this Shared Field with. Only relevant if you chose the `object_type` of `custom_activity_type`.\n- `custom_object_type_id` \u2013 ID of the Custom Object Type that you want to\n associate this Shared Field with. Only relevant if you chose the `object_type` of `custom_object_type`.\n- `editable_with_roles` \u2013 list of [Roles](https://developer.close.com/api/resources/roles) that can edit the values of\n this Field on the given object. Note that this is a per-association setting, meaning that editing of the Shared Custom Field can be restricted on one object and not restricted on another.\n- `required` \u2013 whether a value *must* be provided for this Field on the given\n object. Only relevant if you chose the `object_type` of `custom_activity_type` or `custom_object_type`. Note that this is a per-association setting, meaning that this Shared Custom Field can be required on one object and not required on another.", "parameters": [ { "in": "path", "name": "scf_id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "editable_with_roles": [], "object_type": "lead", "required": false } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "editable_with_roles": [], "object_type": "lead", "required": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field/shared/{scf_id}/association/{object_type}/": { "get": { "operationId": "custom_fields.shared_get_association", "tags": [ "custom_fields.shared" ], "summary": "Fetch a Shared Custom Field Association", "parameters": [ { "in": "path", "name": "scf_id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "object_type", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_fields.shared_update_association", "tags": [ "custom_fields.shared" ], "summary": "Update an existing Shared Custom Field Association", "description": "You can change the `required` or the `editable_with_roles` attributes. Everything else cannot be changed.\n\nThe `object_type` in the URL can be either:\n\n- `lead` when editing the association with the Lead object.\n- `contact` when editing the association with the Contact object.\n- `opportunity` when editing the association with the Opportunity object.\n- `custom_activity_type/` when editing the association with a specific\n Custom Activity Type.\n- `custom_object_type/` when editing the association with a specific\n Custom Object Type.", "parameters": [ { "in": "path", "name": "scf_id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "object_type", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "editable_with_roles": [ "admin", "role_4zhUd9gDKwVv0Bbl2Nk0Ud" ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "editable_with_roles": [ "admin", "role_4zhUd9gDKwVv0Bbl2Nk0Ud" ], "object_type": "lead", "required": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_fields.shared_delete_association", "tags": [ "custom_fields.shared" ], "summary": "Disassociate a Shared Custom Field from an object type", "description": "Remove the association between a shared custom field and an object type. The field will immediately disappear from API responses for that object type and all stored values will be permanently deleted.\n\nThe `object_type` in the URL can be `lead`, `contact`, `opportunity`, `custom_activity_type/`, or `custom_object_type/`.\n\nIf the field was `required` on the associated type, removing the association also removes that requirement.", "parameters": [ { "in": "path", "name": "scf_id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "object_type", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_field_schema/{object_type}/": { "get": { "operationId": "custom_field_schemas_get", "tags": [ "custom_field_schemas" ], "summary": "Retrieve a custom field schema", "parameters": [ { "in": "path", "name": "object_type", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "fields": [ { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.422000+00:00", "date_updated": "2014-11-10T20:56:16.784000+00:00", "description": "The number of users in the company", "editable_with_roles": [], "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c", "name": "# of users", "organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X", "type": "number", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "accepts_multiple_values": false, "associations": [ { "editable_with_roles": [], "object_type": "lead", "required": false }, { "editable_with_roles": [], "object_type": "contact", "required": false }, { "custom_activity_type_id": "actitype_2FqdeKTAEfMTwD4SVWwXqX", "editable_with_roles": [], "object_type": "custom_activity_type", "required": true } ], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2021-04-10T17:36:09.235000+00:00", "date_updated": "2021-04-10T17:36:09.235000+00:00", "description": "User responsible for this Lead/Contact/Activity.", "id": "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "name": "Owner", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "user", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "name": "Lead", "object_type": "lead", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_field_schemas_update", "tags": [ "custom_field_schemas" ], "summary": "Update a custom field schema", "description": "To reorder Custom Fields (and thus change the order in which they are displayed in the Close UI), you simply need to supply a `fields` list with `{\"id\": ...}` items corresponding to the IDs of the Custom Fields belonging to the given Schema. Note that any IDs that are omitted from the list with be automatically appended to the end of the list. If you want to remove some Fields from the Schema, then delete the Custom Field or \u2013 in case of Shared Custom Fields \u2013 disassociate the Field from the given object.", "parameters": [ { "in": "path", "name": "object_type", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "fields": [ { "id": "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq" }, { "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c" } ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "fields": [ { "accepts_multiple_values": false, "associations": [ { "editable_with_roles": [], "object_type": "lead", "required": false }, { "editable_with_roles": [], "object_type": "contact", "required": false }, { "custom_activity_type_id": "actitype_2FqdeKTAEfMTwD4SVWwXqX", "editable_with_roles": [], "object_type": "custom_activity_type", "required": true } ], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2021-04-10T17:36:09.235000+00:00", "date_updated": "2021-04-10T17:36:09.235000+00:00", "description": "User responsible for this Lead/Contact/Activity.", "id": "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "name": "Owner", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "user", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" }, { "accepts_multiple_values": false, "choices": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-11-07T05:06:09.422000+00:00", "date_updated": "2014-11-10T20:56:16.784000+00:00", "description": "The number of users in the company", "editable_with_roles": [], "id": "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c", "name": "# of users", "organization_id": "orga_vfvFDAKGLybddKDJn8n7ElZZ3qyRF3QI8fJxTSAYr5X", "type": "number", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "name": "Lead", "object_type": "lead", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_object/": { "get": { "operationId": "custom_objects_list", "tags": [ "custom_objects" ], "summary": "List Custom Object instances", "description": "The `lead_id` parameter is required. If you want to retrieve all Custom Object instances regardless of the lead, you will need to use [Advanced Filtering](https://developer.close.com/api/resources/advanced-filtering).\n\nCustom Fields values appear in the format: `custom.{custom_field_id}`. See [Custom Fields](https://developer.close.com/api/resources/custom-fields/custom-fields-custom-object).\n\nBack references to each Custom Object are not collected in this response. If you need to access this information, please use the `back_reference_fields` on the Custom Object Type and [Advanced Filtering](https://developer.close.com/api/resources/advanced-filtering) to search for objects that reference the Custom Object Instance.", "parameters": [ { "in": "query", "name": "lead_id", "required": true, "schema": { "title": "Lead ID", "type": "string" } }, { "in": "query", "name": "custom_object_type_id", "required": false, "schema": { "title": "Custom Object Type ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom.cf_jnxTQDKnSxCEBtD5dvZdNgTzC3CqeyWUyU349PBA9Wf": "custobj_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T16:45:35.367000+00:00", "date_updated": "2020-08-04T17:37:56.439000+00:00", "id": "custobj_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "name": "Resource", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" }, { "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom.cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": "cont_aHtUny9tps9LjJ8Cc5SP1NY3826j6PdNML9ZfkSUHyc", "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Potential", "custom_object_type_id": "cotype_4hQsScWF3hnUOyngoaAV00", "date_created": "2020-08-04T16:45:29.612000+00:00", "date_updated": "2020-08-04T16:46:02.705000+00:00", "id": "custobj_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "name": "Primary Account", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_objects_create", "tags": [ "custom_objects" ], "summary": "Create a new Custom Object instance", "description": "Custom Field values can be set using the format: `custom.{custom_field_id}`. See [Custom Fields](https://developer.close.com/api/resources/custom-fields/custom-fields-custom-object).\n\nThe following fields are required:\n - `custom_object_type_id`: The type of Custom Object you are creating determines the Custom Fields that can be used.\n - `lead_id`: The Lead that this Custom Object instance will belong to.\n - `name`: Each Custom Object has a name, used for display.", "requestBody": { "content": { "application/json": { "example": { "custom.cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": [ "Conference", "Meeting" ], "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Software", "custom.cf_jnxTQDKnSxCEBtD5dvZdNgTzC3CqeyWUyU349PBA9Wf": "custobj_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "name": "Resource" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom.cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S": [ "Conference", "Meeting" ], "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Software", "custom.cf_jnxTQDKnSxCEBtD5dvZdNgTzC3CqeyWUyU349PBA9Wf": "custobj_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T16:45:35.367000+00:00", "date_updated": "2020-08-04T17:37:56.439000+00:00", "id": "custobj_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "name": "Resource", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_object/{id}/": { "get": { "operationId": "custom_objects_get", "tags": [ "custom_objects" ], "summary": "Retrieve a single Custom Object instance", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom.cf_jnxTQDKnSxCEBtD5dvZdNgTzC3CqeyWUyU349PBA9Wf": "custobj_v0VS1AZAg8LjnpBm1hZz83UZ3yWK0n9SdVV5i8yC6he", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T16:45:35.367000+00:00", "date_updated": "2020-08-04T17:37:56.439000+00:00", "id": "custobj_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "name": "Resource", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_objects_update", "tags": [ "custom_objects" ], "summary": "Updating a Custom Object instance", "description": "A Custom Object can be updated to add, change or remove any Custom Fields, and to change the `name` property.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Potential", "custom.cf_jnxTQDKnSxCEBtD5dvZdNgTzC3CqeyWUyU349PBA9Wf": null, "name": "Updated Resource" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "custom.cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g": "Potential", "custom_object_type_id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "date_created": "2020-08-04T16:45:35.367000+00:00", "date_updated": "2020-08-04T17:37:56.439000+00:00", "id": "custobj_5J7mimiIKB1tQ3gVduP0c4UhXbNj5ptMLteAWRJu7Sf", "lead_id": "lead_hwnL36A2iEMSLIlmGhsdrcmOJzTUzqEHwr66wrA1K2T", "name": "Updated Resource", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_objects_delete", "tags": [ "custom_objects" ], "summary": "Delete a Custom Object instance", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_object_type/": { "get": { "operationId": "custom_object_types_list", "tags": [ "custom_object_types" ], "summary": "List Custom Object Types", "description": "The response will include all Custom Object Types, including Custom Field metadata for your organization.\n\nEach Custom Object Type has two lists of Custom Fields. The `fields` property contains the list of fields that belong to the Custom Object Type. The `back_reference_fields` property contains the list of any objects (Leads, Contacts, Opportunities, Custom Activities, Custom Objects) that reference the Custom Object Type.", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "api_create_only": true, "back_reference_fields": [], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-09T15:36:16.795350", "date_updated": "2020-07-09T15:36:16.795350", "description": "A Resource tracked by an external system.", "editable_with_roles": [], "fields": [ { "accepts_multiple_values": true, "back_reference_is_visible": true, "description": "Account objects using this Resource.", "editable_with_roles": [], "id": "cf_jnxTQDKnSxCEBtD5dvZdNgTzC3CqeyWUyU349PBA9Wf", "name": "Linked Accounts", "referenced_custom_type_id": "cotype_4hQsScWF3hnUOyngoaAV00", "required": true, "type": "custom_object" } ], "id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "name": "Resource", "name_plural": "Resources", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" }, { "api_create_only": false, "back_reference_fields": [ { "accepts_multiple_values": true, "back_reference_is_visible": true, "description": "Account objects using this Resource.", "editable_with_roles": [], "id": "cf_jnxTQDKnSxCEBtD5dvZdNgTzC3CqeyWUyU349PBA9Wf", "name": "Linked Accounts", "referenced_custom_type_id": "cotype_4hQsScWF3hnUOyngoaAV00", "required": true, "type": "custom_object" } ], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-27T21:28:39.765523", "date_updated": "2020-07-27T21:28:39.765523", "description": "An Account managed by this client.", "editable_with_roles": [], "fields": [ { "accepts_multiple_values": false, "description": "ID from the external Account system.", "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Account ID", "required": false, "type": "text" }, { "accepts_multiple_values": false, "description": "Main point of contact for this account.", "editable_with_roles": [], "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S", "name": "Point of Contact", "required": true, "type": "contact" }, { "accepts_multiple_values": false, "choices": [ "Active", "Cancelled", "Potential" ], "description": null, "editable_with_roles": [], "id": "cf_cSh3fWT3rEJ1BFSezme2YAG6bPrZV5wUWKKrW4iN19g", "name": "Status", "required": false, "type": "choices" } ], "id": "cotype_4hQsScWF3hnUOyngoaAV00", "name": "Account", "name_plural": "Accounts", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "custom_object_types_create", "tags": [ "custom_object_types" ], "summary": "Create new Custom Object Type", "description": "The type must be created before Custom Fields can be added.\n\nThe following fields are required:\n - `name`: The name of the Custom Object Type\n - `name_plural`: A pluralized version of the name, for some UI display.\n\nThe following fields are optional:\n - `description`: A longer description of the Custom Object Type.\n - `api_create_only`: If `true`, instances can only be created by API clients. Defaults to `false`.\n - `editable_with_roles`: Only users with the given roles can edit instances of this type. By default, any user in your organization can make changes to the instances of this type.", "requestBody": { "content": { "application/json": { "example": { "api_create_only": false, "description": "An account managed by this client", "editable_with_roles": [ "admin" ], "name": "Account", "name_plural": "Accounts" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "api_create_only": false, "back_reference_fields": [], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-08-07T15:18:33.797245", "date_updated": "2020-08-07T15:18:33.797245", "description": "An account managed by this client", "editable_with_roles": [ "admin" ], "fields": [], "id": "cotype_4hQsScWF3hnUOyngoaAV00", "name": "Account", "name_plural": "Accounts", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/custom_object_type/{id}/": { "get": { "operationId": "custom_object_types_get", "tags": [ "custom_object_types" ], "summary": "Retrieve a single Custom Object Type", "description": "Retrieve a single custom object type by ID. The response contains the Custom Object Type including most Custom Field metadata.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "api_create_only": true, "back_reference_fields": [], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-09T15:36:16.795350", "date_updated": "2020-07-09T15:36:16.795350", "description": "A Resource tracked by an external system.", "editable_with_roles": [], "fields": [ { "accepts_multiple_values": true, "back_reference_is_visible": true, "description": "Account objects using this Resource.", "editable_with_roles": [], "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S", "name": "Linked Accounts", "referenced_custom_type_id": "cotype_4hQsScWF3hnUOyngoaAV00", "required": true, "type": "custom_object" } ], "id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "name": "Resource", "name_plural": "Resources", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "custom_object_types_update", "tags": [ "custom_object_types" ], "summary": "Update existing Custom Object Type", "description": "The type's `name`, `name_plural`, `description`, `api_create_only` and `editable_with_roles` properties may be updated here. These properties will be updated immediately in the Custom Object API. You cannot add, modify, remove or reorder fields from a Custom Object Type using this resource. See [Custom Object Custom Fields](https://developer.close.com/api/resources/custom-fields/custom-fields-custom-object) and [Custom Field Schema API](https://developer.close.com/api/resources/custom-fields/custom-field-schemas) for these features.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Managed Resource", "name_plural": "Managed Resources" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "api_create_only": true, "back_reference_fields": [], "created_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "date_created": "2020-07-09T15:36:16.795350", "date_updated": "2020-07-09T15:36:16.795350", "description": "A Resource tracked by an external system.", "editable_with_roles": [], "fields": [ { "accepts_multiple_values": true, "back_reference_is_visible": true, "description": "Account objects using this Resource.", "editable_with_roles": [], "id": "cf_UpyNBvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jg64S", "name": "Linked Accounts", "referenced_custom_type_id": "cotype_4hQsScWF3hnUOyngoaAV00", "required": true, "type": "custom_object" } ], "id": "cotype_1h5m6uHM9BZOpwVhyRJb4Y", "name": "Managed Resource", "name_plural": "Managed Resources", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "custom_object_types_delete", "tags": [ "custom_object_types" ], "summary": "Delete a Custom Object Type", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/dialer/": { "get": { "operationId": "dialers_list", "tags": [ "dialers" ], "summary": "List or filter all dialer sessions", "parameters": [ { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "in": "query", "name": "source_type", "required": false, "schema": { "title": "Source Type", "default": null, "anyOf": [ { "type": "string", "enum": [ "saved-search", "shared-entry" ] }, { "type": "null" } ] } }, { "in": "query", "name": "source_value", "required": false, "schema": { "title": "Source Value", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status", "required": false, "schema": { "title": "Status", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status__in", "required": false, "schema": { "title": "Status (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "user_id", "required": false, "schema": { "title": "User ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "caller_id": "", "date_created": "2018-07-17T12:35:01.230707", "date_updated": "2018-07-31T14:15:11.496227", "id": "dial_23eLaYZDjeL8tzFQMW5sto", "is_user_dependent": false, "music_preference": "tone1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "ring_mode": "more-voicemails", "source_type": "saved-search", "source_value": "save_lch8hNQFbD9MgvMZbprURV715VVs1DEXSUl1xOA74p0", "status": "inactive", "type": "power", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [ { "is_active": false, "state": "inactive", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ] }, { "caller_id": "+14356128874", "date_created": "2018-07-31T13:45:07.444155", "date_updated": "2018-07-31T13:45:42.875237", "id": "dial_4DejEkNkJOWj1jvqf5f6LO", "is_user_dependent": false, "music_preference": "tone1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "ring_mode": "more-voicemails", "source_type": "saved-search", "source_value": "save_iKY1BB4HsI5Zzbgz3J20ycs8aPZK3Z9fq7rArkA85Gi", "status": "inactive", "type": "predictive", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [ { "is_active": false, "state": "inactive", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ] } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/dialer/{id}/": { "get": { "operationId": "dialers_get", "tags": [ "dialers" ], "summary": "Get a single dialer session", "description": "Once you have a `source_value` for a dialer session and `source_type=saved-search`, you can use the [saved_search endpoint](https://developer.close.com/api/resources/smart-views/get) to find out more information about the Smart View being used.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "caller_id": "+14356128874", "date_created": "2018-07-31T13:45:07.444155", "date_updated": "2018-07-31T13:45:42.875237", "id": "dial_4DejEkNkJOWj1jvqf5f6LO", "is_user_dependent": false, "music_preference": "tone1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "ring_mode": "more-voicemails", "source_type": "saved-search", "source_value": "save_iKY1BB4HsI5Zzbgz3J20ycs8aPZK3Z9fq7rArkA85Gi", "status": "inactive", "type": "predictive", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "users": [ { "is_active": false, "state": "inactive", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/email_template/": { "get": { "operationId": "email_templates_list", "tags": [ "email_templates" ], "summary": "List email templates", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "in": "query", "name": "is_archived", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "name": "is_shared", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "attachments": [], "body": "You should try Close.", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T09:20:14.229000+00:00", "date_updated": "2013-02-20T09:20:14.229000+00:00", "id": "tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq", "is_archived": false, "is_shared": true, "name": "Cold 1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "subject": "I bet using other sales tool sucks", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "email_templates_create", "tags": [ "email_templates" ], "summary": "Create an email template", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "attachments": [ { "content_type": "image/jpeg", "filename": "image.jpg", "size": 1108447, "url": "https://app.close.com/go/file/temporary/user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk/1Zx0AlY1DwBXzKKrVwpAoj/image.jpg/" } ], "body": "test inbound body of an email.", "is_shared": false, "name": "inbound 1", "subject": "test inbound subject" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "attachments": [ { "content_id": null, "content_type": "image/jpeg", "filename": "image.jpg", "inline_only": false, "size": 1108447, "url": "https://app.close.com/go/file/persisted/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/email_template/tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq/1Zx0AlY1DwBXzKKrVwpAoj/image.jpg/" } ], "body": "test inbound body of an email.", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T09:20:14.229000+00:00", "date_updated": "2013-02-20T09:20:14.229000+00:00", "id": "tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq", "is_archived": false, "is_shared": false, "name": "inbound 1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "subject": "test inbound subject", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "used_by_sequences": [] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/email_template/{id}/": { "get": { "operationId": "email_templates_get", "tags": [ "email_templates" ], "summary": "Fetch an email template", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" }, { "in": "query", "name": "include_embedded", "required": false, "description": "Include embedded templates used by Workflows.", "schema": { "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "example": { "attachments": [], "body": "You should try Close.", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T09:20:14.229000+00:00", "date_updated": "2013-02-20T09:20:14.229000+00:00", "id": "tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq", "is_archived": false, "is_shared": true, "name": "Cold 1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "subject": "I bet using other sales tool sucks", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "used_by_sequences": [ { "id": "seq_1BTljGuCooX0nbFoPihl07", "name": "My Sequence" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "email_templates_update", "tags": [ "email_templates" ], "summary": "Update an email template", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "is_shared": true } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "attachments": [], "body": "test inbound body of an email.", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T09:20:14.229000+00:00", "date_updated": "2013-02-20T09:20:14.229000+00:00", "id": "tmpl_bTl0wRVLuzCpYkJnLX76KcbuYFpa4YEJVKNE19RGHUq", "is_archived": false, "is_shared": true, "name": "inbound 1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "subject": "test inbound subject", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "used_by_sequences": [] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "email_templates_delete", "tags": [ "email_templates" ], "summary": "Delete an email template", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/email_template/{id}/render/": { "get": { "operationId": "email_templates_render", "tags": [ "email_templates" ], "summary": "Render an email template", "description": "Render an email template for the given lead/contact using the current user context.\n\nAccepts two forms of usage:\n\n- Single lead/contact:\n - `lead_id` and `contact_id` is supplied (both required)\n- Preview results from a search query\n - `query` (required) contains a search query\n - `entry` (optional, ranges from 0 to 99) specifies the index of the lead/contact that should be rendered.\n - `mode` (optional), which can have a value of:\n - `lead` (default), the first contact of the lead with the index given by `entry` will be rendered (excluding leads that have no email addresses).\n - `contact`, then `entry` refers to the index of the contact (excluding contacts that have no emails). Will return an empty dict if there are no more entries.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "email_account_id", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "bulk_object_type", "required": false, "schema": { "type": "string", "enum": [ "lead", "contact" ] } }, { "in": "query", "name": "contact_id", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "contact_preference", "required": false, "schema": { "type": "string", "enum": [ "lead", "contact", "all" ] } }, { "in": "query", "name": "entry", "required": false, "schema": { "type": "integer", "minimum": 0, "maximum": 100 } }, { "in": "query", "name": "lead_id", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "limit", "required": false, "schema": { "type": "integer" } }, { "in": "query", "name": "query", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "results_limit", "required": false, "schema": { "type": "integer" } }, { "in": "query", "name": "s_query", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "sender", "required": false, "schema": { "type": "string", "format": "email" } }, { "in": "query", "name": "sort", "required": false, "schema": { "type": "array", "maxItems": 3, "items": { "type": "object", "properties": { "direction": { "type": "string", "enum": [ "asc", "desc" ] }, "field": { "type": "string" } }, "required": [ "direction", "field" ] } } }, { "in": "query", "name": "mode", "required": false, "schema": { "type": "string", "enum": [ "lead", "contact" ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "body": "Hi John,\n\nI hope you are having a great day.\n\nFrom,\nPhil\nphil@close.com", "contact_display_name": "John Smith", "contact_id": "cont_NdKMSOuamgB8ZlbNJW2WP17hfL3jQmf0hW6X8ichwQk", "email": "john@example.com", "lead_display_name": "Bluth Company", "lead_id": "lead_vYaUG0D39KdBeqVHbPkmvqaYopsdCBmDXW3tvJgwc2L", "subject": "Checking In" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/enrich_field/": { "post": { "operationId": "field_enrichment_create", "tags": [ "field_enrichment" ], "summary": "Enrich a specific field on a lead or contact using AI", "description": "This endpoint uses AI to enrich (populate or enhance) a specific field on a lead or contact. The enrichment process analyzes existing data and external sources to provide intelligent field values.\n\n**Parameters:**\n- `organization_id` (required): The organization ID\n- `object_type` (required): Either \"lead\" or \"contact\"\n- `object_id` (required): The ID of the lead or contact to enrich\n- `field_id` (required): The ID of the custom field to enrich\n- `set_new_value` (optional): Whether to update the field with the enriched value (default: true)\n- `overwrite_existing_value` (optional): Whether to overwrite existing field values (default: false)", "requestBody": { "content": { "application/json": { "example": { "field_id": "cf_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "object_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "object_type": "lead", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "overwrite_existing_value": false, "set_new_value": true }, "schema": { "$ref": "#/components/schemas/RunFieldEnrichment" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "confidence": "high", "field_id": "cf_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "object_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "object_type": "lead", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "reasoning": "Based on the company's website content and existing lead information, this appears to be a software development company specializing in CRM solutions.", "value": "Software Development" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/event/": { "get": { "operationId": "events_list", "tags": [ "events" ], "summary": "Retrieve a list of events", "description": "The list of available object types and actions is available [here](https://developer.close.com/api/resources/events/list-of-event-types). The event log can be filtered by the following parameters:\n\n- `date_updated`: The date/time of when the event was last updated, in ISO format. Can be filtered by range (`date_updated__gte=X&date_updated__lte=Y`). Note: For pagination, it is recommended to use cursors instead of this filter (see below).\n- `object_type`: If specified, only events for objects of a given type are returned. Example: `object_type=lead`\n- `object_id`: If specified, only events for the given object are returned. No related object events are returned. Example: `object_id=lead_123`\n- `action`: Only events of specified actions are returned. Example: `action=deleted`\n- `lead_id`: If specified, events for the given lead, including any of its related objects (contacts, activities, opportunities, tasks) are returned.\n- `user_id`: Only return events of the given user.\n- `request_id`: Only events emitted while processing this specific API request.\n\nOnly certain combinations of filters are supported. `date_updated` can be optionally used with any allowed filter combination. Supported combinations are:\n\n- `object_type` and `object_id`\n- `object_type` and `action`\n- `object_id` and `action`\n- `lead_id` and `object_type`\n- `lead_id`, `object_type` and `action`\n- `lead_id`, `user_id` and `object_type`\n- `lead_id`, `user_id`, `object_type` and `action`\n- `lead_id` and `user_id`\n- `user_id` and `object_id`\n- `user_id`, `object_id` and `action`\n- `user_id` and `object_type`\n- `user_id`, `object_type` and `action`\n- Just `lead_id`\n- Just `user_id`\n- Just `request_id`\n\nThe response is a dictionary with the following fields:\n\n- `data`: A list of events (dictionaries), using the format outlined in \u201cEvent format\u201d.\n- `cursor_next`: Cursor string to retrieve the next page of events, i.e. events before the given ID (earlier date), or `null` if no more objects are available.\n- `cursor_previous`: Cursor string to retrieve the previous page of events, i.e. events after the given ID (later date), or `null` if no more objects are available.\n\nEvents are always ordered by date (latest first), i.e. the `date_updated` field. Note that even though `date_created` and `date_updated` may only have millisecond-precision, two or more events for the same object are guaranteed to be returned in the proper order.\n\nThe endpoint supports the following parameters for pagination, and does *not* support `_skip`:\n\n- `_cursor`: Pagination using a cursor string (`cursor_next` or `cursor_previous` from a previous response). Note that you still need to supply any other filters (except for `date_updated`) that were used in the previous query.\n- `_limit`: Maximum number of events to return (capped at and defaulting to 50).\n\nCursors are a reliable way to go to the next or previous page of events (unlike filtering by `date_updated`, where you may need to account for and filter out multiple events happening in the same millisecond). However, cursors are not designed to stream new events: Events may be visible through the API in a different order than they were triggered (but the ordering returned by the API is correct). Also, event consolidation of multiple recent events to the same object may occur. To avoid missing recent events when paginating, we recommend to scan the latest five minutes of events.\n\nIn the example response, to retrieve the next older batch of events, specify `_cursor=cursor2`.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "in": "query", "name": "object_type", "required": false, "schema": { "title": "Object Type", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "object_id", "required": false, "schema": { "title": "Object ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "lead_id", "required": false, "schema": { "title": "Lead ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "action", "required": false, "schema": { "title": "Action", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "user_id", "required": false, "schema": { "title": "User ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__gt", "required": false, "schema": { "title": "Date Updated (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__gte", "required": false, "schema": { "title": "Date Updated (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__lt", "required": false, "schema": { "title": "Date Updated (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__lte", "required": false, "schema": { "title": "Date Updated (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "cursor_next": "cursor2", "cursor_previous": "cursor1", "data": [] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/event/{id}/": { "get": { "operationId": "events_get", "tags": [ "events" ], "summary": "Retrieve a single event by ID", "description": "The response contains a dictionary with a single event, using the format outlined in \u201cEvent format\u201d.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "action": "created", "changed_fields": [], "data": { "_type": "Note", "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Gob Bluth", "date_created": "2016-10-19T12:22:10.433000+00:00", "date_updated": "2016-10-19T12:22:10.433000+00:00", "id": "acti_4LNDQk2uhg7t8fGUWPyHX7cpCVH9PJtCyCssXFcao3e", "lead_id": "lead_sHR5sxie4dKOBkODA2flGciHen2c91YEpvTPt8x1NU0", "note": "My note.", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "Gob Bluth", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Gob Bluth", "users": [] }, "date_created": "2016-10-19T12:22:10.434000", "date_updated": "2016-10-19T12:22:10.434000", "id": "ev_17VaZdcdnsMNyWY9ZJnjph", "lead_id": "lead_sHR5sxie4dKOBkODA2flGciHen2c91YEpvTPt8x1NU0", "meta": { "request_method": "POST", "request_path": "/api/v1/activity/note/" }, "object_id": "acti_4LNDQk2uhg7t8fGUWPyHX7cpCVH9PJtCyCssXFcao3e", "object_type": "note", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "previous_data": {}, "request_id": "req_2skaL7v81TflDfovw8A1CC", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/export/": { "get": { "operationId": "exports_list", "tags": [ "exports" ], "summary": "List all the exports", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-02T15:00:05.190000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T23:36:30.719000+00:00", "download_url": "https://url-to-generated-leads.csv", "fields": [ "addresses", "contacts", "created_by", "created_by_name", "custom", "date_created", "date_updated", "description", "display_name", "id", "name", "status_id", "status_label", "updated_by", "updated_by_name", "url" ], "format": "csv", "id": "expo_yasd512lkhIhxrvLG8iVupzjoJVRPgrGhJ0A0b3bae", "n_docs": 100000, "n_docs_processed": 100000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "done", "type": "leads", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-02T15:32:54.774000+00:00", "date_updated": "2014-04-02T23:35:59.704000+00:00", "download_url": "https://url-to-generated-contacts.json", "fields": [ "created_by", "date_created", "date_updated", "emails", "id", "name", "phones", "title", "updated_by", "urls" ], "format": "json", "id": "expo_9lHXk6sbASDKFJNZ59arhUCdS2CqNm9OTv6yb", "n_docs": 100000, "n_docs_processed": 100000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "done", "type": "contacts", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-02T15:32:54.774000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T23:35:59.704000+00:00", "download_url": null, "fields": [ "created_by", "date_created", "date_updated", "emails", "id", "name", "phones", "title", "updated_by", "urls" ], "format": "csv", "id": "expo_9lHXk6sbznxcuQOEASDF59arhUCdS2CqNm9OTv6yb", "n_docs": 100000, "n_docs_processed": 5000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "in_progress", "type": "lead_opps", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-01T16:50:22.256000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T00:55:34.967000+00:00", "download_url": "https://url-to-generated-opps.csv", "fields": [ "confidence", "contact_id", "created_by", "created_by_name", "date_created", "date_updated", "date_won", "id", "lead_id", "lead_name", "note", "status_id", "status_label", "status_type", "updated_by", "updated_by_name", "user_id", "user_name", "value", "value_period" ], "format": "csv", "id": "expo_ASFasdfasdAY8VZhRiSn5UG2wNGRUrRurHdaN7kQp6", "n_docs": 100000, "n_docs_processed": 100000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "params": { "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_id": "stat_laksdjfxOOHx2JnhqtovutN3zeuARGfzB21x5t1W88G" }, "send_done_email": false, "status": "done", "type": "opps", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/export/lead/": { "get": { "operationId": "exports_list_lead", "tags": [ "exports" ], "summary": "List Lead Exports", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-02T15:00:05.190000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T23:36:30.719000+00:00", "download_url": "https://close-exports.s3.amazonaws.com/expo_yasd512lkhIhxrvLG8iVupzjoJVRPgrGhJ0A0b3bae.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=60&X-Amz-Signature=EXAMPLE", "fields": [ "addresses", "contacts", "created_by", "created_by_name", "custom", "date_created", "date_updated", "description", "display_name", "id", "name", "status_id", "status_label", "updated_by", "updated_by_name", "url" ], "format": "csv", "id": "expo_yasd512lkhIhxrvLG8iVupzjoJVRPgrGhJ0A0b3bae", "n_docs": 100000, "n_docs_processed": 100000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "done", "type": "leads", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "exports_create_lead", "tags": [ "exports" ], "summary": "Export leads based on a search query", "description": "You will receive a link to the generated file via email once the export is done.\n\nThe exported file is GZIP compressed to make your download and our upload faster. The `content-encoding` HTTP header will be set to `gzip` and the `content-type` HTTP header will be set to `text/csv` for CSV exports or `application/json` for JSON exports.\n\nParameters:\n - `s_query/results_limit/sort` (optional) - The [Advanced Filtering API](https://developer.close.com/api/resources/advanced-filtering) parameters used to narrow the exported results down. By default, all leads are exported.\n - `format` - Format of the exported file. The choices are: `csv`, `json`. JSON is recommended for raw backups or data migrations.\n - `type` - Type of the export.\n - `leads` - For CSV exports, it results in one row per lead. For JSON exports, this is the recommended type and is a superset of the other two types.\n - `contacts` - For CSV exports, it results in one row per contact.\n - `lead_opps` - For CSV exports, it results in one row per opportunity.\n - `date_format` (optional) - Controls the format of date objects. Note: this only works with the `csv` format.\n - `original` (default) - A date format that includes microseconds and timezone information.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD] [hh]:[mm]:[ss.sssss]\u00b1[hh]:[mm]`\n - `iso8601` (recommended) - An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compatible date representation that does not include microseconds.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]\u00b1[hh]:[mm]`\n - `excel` - An Excel compatible date format. Dates are always in UTC, do not include timezone information or microseconds, and use a 12 hour clock with an AM or PM designation.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD] [hh]:[mm]:[ss] [AM|PM]`\n - `fields` (optional) - By default we return all the data fields in each export type. If you only need specific fields exported, you can explicitly list them in `fields` to get smaller exports.\n - `include_activities` (optional) - Activities aren't included in any exports by default. If you want all your Activities exported as well, pass `\"include_activities\": true`. Note: this only works for `leads` type with `json` format.\n - `include_smart_fields` (optional) - Smart Fields aren't included in any exports by default. If you want all of them exported as well, pass `\"include_smart_fields\": true`. Note: this only works for `leads` type with `json` format or any type formatted as `csv`. Smart fields are calculated fields, like number of emails on a lead.\n - `send_done_email` - Set to `false` if you don't want to get a confirmation email after the bulk action is done.", "requestBody": { "content": { "application/json": { "example": { "date_format": "iso8601", "format": "csv", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ], "type": "leads" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-02T15:00:05.190000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T23:36:30.719000+00:00", "download_url": null, "fields": [ "addresses", "contacts", "created_by", "created_by_name", "custom", "date_created", "date_updated", "description", "display_name", "id", "name", "status_id", "status_label", "updated_by", "updated_by_name", "url" ], "format": "csv", "id": "expo_yasdalskdjjflkahxrvLG8iVupzjoJVRPgrGhJ0A0b3bae", "n_docs": null, "n_docs_processed": 0, "organization_id": "orga_alksdjdfjasdfkljasdlkfjfaklsdjf", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [ { "direction": "desc", "field": { "field_name": "date_created", "object_type": "lead", "type": "regular_field" } } ], "status": "created", "type": "leads", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/export/lead/{id}/": { "get": { "operationId": "exports_get_lead", "tags": [ "exports" ], "summary": "Get a single Lead Export", "description": "Get a single lead export to do things like check its `status` or get a `download_url`.\n\n`status` can have one of these values: `created`, `started`, `in_progress`, `done`, `error`.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-02T15:00:05.190000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T23:36:30.719000+00:00", "download_url": "https://close-exports.s3.amazonaws.com/expo_yasd512lkhIhxrvLG8iVupzjoJVRPgrGhJ0A0b3bae.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=60&X-Amz-Signature=EXAMPLE", "fields": [ "addresses", "contacts", "created_by", "created_by_name", "custom", "date_created", "date_updated", "description", "display_name", "id", "name", "status_id", "status_label", "updated_by", "updated_by_name", "url" ], "format": "csv", "id": "expo_yasd512lkhIhxrvLG8iVupzjoJVRPgrGhJ0A0b3bae", "n_docs": 100000, "n_docs_processed": 100000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "done", "type": "leads", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/export/opportunity/": { "get": { "operationId": "exports_list_opportunity", "tags": [ "exports" ], "summary": "List Opportunity Exports", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-01T16:50:22.256000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T00:55:34.967000+00:00", "download_url": "https://close-exports.s3.amazonaws.com/expo_ASFasdfasdAY8VZhRiSn5UG2wNGRUrRurHdaN7kQp6.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=60&X-Amz-Signature=EXAMPLE", "fields": [ "confidence", "contact_id", "created_by", "created_by_name", "date_created", "date_updated", "date_won", "id", "lead_id", "lead_name", "note", "status_id", "status_label", "status_type", "updated_by", "updated_by_name", "user_id", "user_name", "value", "value_period" ], "format": "csv", "id": "expo_ASFasdfasdAY8VZhRiSn5UG2wNGRUrRurHdaN7kQp6", "n_docs": 100000, "n_docs_processed": 100000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "params": { "status_id": "st_id", "user_id__in": "id_1,id_2" }, "send_done_email": false, "status": "done", "type": "opps", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "exports_create_opportunity", "tags": [ "exports" ], "summary": "Export opportunities, based on opportunity filters", "description": "Parameters:\n - `params` (optional) - A dictionary of filters, which would be used for the `/opportunity/` endpoint.\n - `format` - Format of the exported file. The choices are: `csv`, `json`\n - `date_format` (optional) - Controls the format of date objects. Note: this only works with the `csv` format.\n - `original` (default) - A date format that includes microseconds and timezone information.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD] [hh]:[mm]:[ss.sssss]\u00b1[hh]:[mm]`\n - `iso8601` (recommended) - An [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compatible date representation that does not include microseconds.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss]\u00b1[hh]:[mm]`\n - `excel` - An Excel compatible date format. Dates are always in UTC, do not include timezone information or microseconds, and use a 12 hour clock with an AM or PM designation.\n - Date: `[YYYY]-[MM]-[DD]`\n - Date w/ time: `[YYYY]-[MM]-[DD] [hh]:[mm]:[ss] [AM|PM]`\n - `fields` (optional) - By default we return all the data fields. If you only need specific fields exported, you can explicitly list them in fields to get smaller exports.\n - `send_done_email` - Set to `false` if you don't want to get a confirmation email after the bulk action is done.", "requestBody": { "content": { "application/json": { "example": { "date_format": "iso8601", "format": "csv", "params": { "status_id": "st_id", "user_id__in": "id_1,id_2" }, "send_done_email": false } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-01T16:50:22.256000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T00:55:34.967000+00:00", "download_url": null, "fields": [ "confidence", "contact_id", "created_by", "created_by_name", "date_created", "date_updated", "date_won", "id", "lead_id", "lead_name", "note", "status_id", "status_label", "status_type", "updated_by", "updated_by_name", "user_id", "user_name", "value", "value_period" ], "format": "csv", "id": "expo_ASFasdfasdAY8VZhRiSn5UG2wNGRUrRurHdaN7kQp6", "n_docs": null, "n_docs_processed": 0, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "params": { "status_id": "st_id", "user_id__in": "id_1,id_2" }, "send_done_email": false, "status": "created", "type": "opps", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/export/opportunity/{id}/": { "get": { "operationId": "exports_get_opportunity", "tags": [ "exports" ], "summary": "Get a single Opportunity Export", "description": "Get a single opportunity export to do things like check its `status` or get a `download_url`.\n\n`status` can have one of these values: `created`, `started`, `in_progress`, `done`, `error`.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-01T16:50:22.256000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T00:55:34.967000+00:00", "download_url": "https://close-exports.s3.amazonaws.com/expo_ASFasdfasdAY8VZhRiSn5UG2wNGRUrRurHdaN7kQp6.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=60&X-Amz-Signature=EXAMPLE", "fields": [ "confidence", "contact_id", "created_by", "created_by_name", "date_created", "date_updated", "date_won", "id", "lead_id", "lead_name", "note", "status_id", "status_label", "status_type", "updated_by", "updated_by_name", "user_id", "user_name", "value", "value_period" ], "format": "csv", "id": "expo_ASFasdfasdAY8VZhRiSn5UG2wNGRUrRurHdaN7kQp6", "n_docs": 100000, "n_docs_processed": 100000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "params": { "status_id": "st_id", "user_id__in": "id_1,id_2" }, "send_done_email": false, "status": "done", "type": "opps", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/export/{id}/": { "get": { "operationId": "exports_get", "tags": [ "exports" ], "summary": "Get a single Export", "description": "You can get a single export to do things like check its `status` or get a `download_url`\n\n - `status` can have one of these values: `created`, `started`, `in_progress`, `done`, `error`.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2014-04-02T15:32:54.774000+00:00", "date_format": "iso8601", "date_updated": "2014-04-02T23:35:59.704000+00:00", "download_url": null, "fields": [ "created_by", "date_created", "date_updated", "emails", "id", "name", "phones", "title", "updated_by", "urls" ], "format": "csv", "id": "expo_9lHXk6sbznxcuQOEASDF59arhUCdS2CqNm9OTv6yb", "n_docs": 100000, "n_docs_processed": 5000, "organization_id": "orga_klasjd123vxiEY58eTGQmFNG3LPlEVQ4V7Nk", "results_limit": null, "s_query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "ACME Inc." }, "field": { "field_name": "name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" }, "send_done_email": false, "sort": [], "status": "in_progress", "type": "lead_opps", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/files/upload/": { "post": { "operationId": "files_create", "tags": [ "files" ], "summary": "Generate a signed S3 POST", "description": "Get the data needed to make a request to S3 to store your file.", "requestBody": { "content": { "application/json": { "example": { "content_type": "image/jpeg", "filename": "image.jpg" }, "schema": { "$ref": "#/components/schemas/UploadFile" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "download": { "url": "https://app.close.com/go/file/temporary/user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk/1Zx0AlY1DwBXzKKrVwpAoj/image.jpg/" }, "upload": { "fields": { "AWSAccessKeyId": "AKIAACCESSKEYHERE", "Content-Disposition": "inline; filename=\"image.jpg\"", "Content-Type": "image/jpeg", "key": "temporary/user/user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk/1Zx0AlY1DwBXzKKrVwpAoj/image.jpg", "policy": "eyJleHBpcmF0aW9uIjogIjIwMjQtMDItMjJ...", "signature": "ePInTgHEBsj0hzMeif/d0U2FQQk=", "success_action_status": "201" }, "url": "https://close-prd-files.s3.amazonaws.com/" } } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/form/": { "get": { "operationId": "forms_list", "tags": [ "forms" ], "summary": "List Forms", "description": "List all forms and their published field definitions for your organization.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "in": "query", "name": "is_archived", "required": false, "description": "Filter by archive status.", "schema": { "type": "boolean" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "date_created": "2024-01-15T10:00:00+00:00", "date_updated": "2024-03-01T12:30:00+00:00", "field_definitions": [ { "choices": null, "id": "formfld_def456", "name": "name", "type": "text" }, { "choices": null, "id": "formfld_def789", "name": "email", "type": "email" }, { "choices": [ { "label": "Sales", "value": "sales" }, { "label": "Support", "value": "support" } ], "id": "formfld_defabc", "name": "interest", "type": "select" } ], "id": "form_abc123", "is_archived": false, "name": "Contact Us", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/Form" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/form/{id}/": { "get": { "operationId": "forms_fetch", "tags": [ "forms" ], "summary": "Retrieve a Form", "description": "Retrieve a single form and its published field definitions by ID.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "date_created": "2024-01-15T10:00:00+00:00", "date_updated": "2024-03-01T12:30:00+00:00", "field_definitions": [ { "choices": null, "id": "formfld_def456", "name": "name", "type": "text" }, { "choices": null, "id": "formfld_def789", "name": "email", "type": "email" }, { "choices": [ { "label": "Sales", "value": "sales" }, { "label": "Support", "value": "support" } ], "id": "formfld_defabc", "name": "interest", "type": "select" } ], "id": "form_abc123", "is_archived": false, "name": "Contact Us", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" }, "schema": { "$ref": "#/components/schemas/Form" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/group/": { "get": { "operationId": "groups_list", "tags": [ "groups" ], "summary": "List Groups for your organization", "description": "Note that list endpoint does not support retrieving members for all groups. Use individual group endpoint instead.", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "id": "group_57P6QUf8b4BlepZJYgRj5W", "name": "Support", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/Group" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "groups_create", "tags": [ "groups" ], "summary": "Create a Group", "description": "Create a new group. The `name` is required and must be unique within the organization. The group is created with no members. Use the member endpoint to add users.", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "name": "Support" }, "schema": { "$ref": "#/components/schemas/CreateGroup" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "id": "group_57P6QUf8b4BlepZJYgRj5W", "members": [], "name": "Support", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" }, "schema": { "$ref": "#/components/schemas/Group" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/group/{group_id}/member/": { "post": { "operationId": "groups_add_member", "tags": [ "groups" ], "summary": "Add a User to a Group", "description": "Add a user to a group by providing the `user_id`. If the user is already a member, nothing changes.", "parameters": [ { "in": "path", "name": "group_id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/CreateGroupMember" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/GroupMember" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/group/{group_id}/member/{user_id}/": { "delete": { "operationId": "groups_remove_member", "tags": [ "groups" ], "summary": "Remove a User from a Group", "description": "If the user is not a member of the group, nothing changes.", "parameters": [ { "in": "path", "name": "group_id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "user_id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/group/{id}/": { "get": { "operationId": "groups_get", "tags": [ "groups" ], "summary": "Fetch an individual Group", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "id": "group_57P6QUf8b4BlepZJYgRj5W", "members": [ { "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "name": "Support", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" }, "schema": { "$ref": "#/components/schemas/Group" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "groups_update", "tags": [ "groups" ], "summary": "Update a Group", "description": "You can use this endpoint to rename a Group. If a name is not unique, an error will be returned.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "name": "Sales" }, "schema": { "$ref": "#/components/schemas/CreateGroup" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "id": "group_57P6QUf8b4BlepZJYgRj5W", "members": [ { "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "name": "Sales", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" }, "schema": { "$ref": "#/components/schemas/Group" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "groups_delete", "tags": [ "groups" ], "summary": "Delete a Group", "description": "Delete a group. Members will be removed from the group but not from the organization. Deletion is only allowed if the group is not referenced by saved reports or smart views.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/integration_link/": { "get": { "operationId": "integration_links_list", "tags": [ "integration_links" ], "summary": "Get all integration links for your organization", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2023-01-01T00:00:00+00:00", "date_updated": "2023-01-01T00:00:00+00:00", "id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb", "name": "Google Search", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "lead", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "http://google.com/search?q={{lead.display_name}}" }, { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2023-01-01T00:00:00+00:00", "date_updated": "2023-01-01T00:00:00+00:00", "id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehz", "name": "LinkedIn", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "contact", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "https://www.linkedin.com/vsearch/p?keywords={{contact.name}}" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/IntegrationLink" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "integration_links_create", "tags": [ "integration_links" ], "summary": "Create an integration link", "requestBody": { "content": { "application/json": { "example": { "name": "Google Search", "type": "lead", "url": "http://google.com/search?q={{lead.display_name}}" }, "schema": { "$ref": "#/components/schemas/CreateIntegrationLink" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2023-01-01T00:00:00+00:00", "date_updated": "2023-01-01T00:00:00+00:00", "id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb", "name": "Google Search", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "lead", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "http://google.com/search?q={{lead.display_name}}" }, "schema": { "$ref": "#/components/schemas/IntegrationLink" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/integration_link/{id}/": { "get": { "operationId": "integration_links_get", "tags": [ "integration_links" ], "summary": "Get a single integration link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2023-01-01T00:00:00+00:00", "date_updated": "2023-01-01T00:00:00+00:00", "id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb", "name": "Google Search", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "lead", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "http://google.com/search?q={{lead.display_name}}" }, "schema": { "$ref": "#/components/schemas/IntegrationLink" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "integration_links_update", "tags": [ "integration_links" ], "summary": "Update an integration link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Google Lookup" }, "schema": { "$ref": "#/components/schemas/UpdateIntegrationLink" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2023-01-01T00:00:00+00:00", "date_updated": "2023-01-01T00:00:00+00:00", "id": "ilink_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb", "name": "Google Lookup", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "lead", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "http://google.com/search?q={{lead.display_name}}" }, "schema": { "$ref": "#/components/schemas/IntegrationLink" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "integration_links_delete", "tags": [ "integration_links" ], "summary": "Delete an integration link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/lead/": { "get": { "operationId": "leads_list", "tags": [ "leads" ], "summary": "List Leads", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "addresses": [], "contact_ids": [ "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh" ], "contacts": [ { "created_by": null, "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "CEO", "date_created": "2013-02-01T00:54:51.331000+00:00", "date_updated": "2013-02-06T20:53:01.954000+00:00", "display_name": "Bruce Wayne", "emails": [ { "email": "thedarkknight@close.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh", "name": "Bruce Wayne", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "phone": "+16503334444", "phone_formatted": "+1 650-333-4444", "type": "office" } ], "title": "The Dark Knight", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "created_by": null, "custom.cf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form", "custom.cf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks": [ "Choice 1", "Choice 2" ], "date_created": "2013-02-01T00:54:51.333000+00:00", "date_updated": "2013-02-06T20:53:01.977000+00:00", "description": "", "display_name": "Wayne Enterprises (Sample Lead)", "html_url": "https://app.close.com/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/", "id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "name": "Wayne Enterprises (Sample Lead)", "opportunities": [ { "annualized_expected_value": 37500, "annualized_value": 50000, "confidence": 75, "contact_id": null, "created_by": null, "date_created": "2013-02-01T00:54:51.337000+00:00", "date_lost": null, "date_updated": "2013-02-01T00:54:51.337000+00:00", "date_won": null, "expected_value": 37500, "id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "Bruce needs new software for the Bat Cave.", "note_html": "

          Bruce needs new software for the Bat Cave.

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 50000, "value_currency": "USD", "value_formatted": "$500", "value_period": "one_time" }, { "annualized_expected_value": 45000, "annualized_value": 60000, "confidence": 75, "contact_id": null, "created_by": null, "date_created": "2013-02-01T00:54:51.337000+00:00", "date_lost": null, "date_updated": "2013-02-01T00:54:51.337000+00:00", "date_won": null, "expected_value": 3750, "id": "oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "Bat Cave monthly maintenance cost", "note_html": "

          Bat Cave monthly maintenance cost

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 5000, "value_currency": "USD", "value_formatted": "$50 monthly", "value_period": "monthly" } ], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Potential", "tasks": [], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": null } ], "has_more": false, "total_results": 1 }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/Lead" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "leads_create", "tags": [ "leads" ], "summary": "Create a new lead", "description": "Contacts, addresses, and custom fields can all be nested in the lead. Activities, tasks, and opportunities must be posted separately.\n\n**status / status_id** (optional): Post either `status` or `status_id` (but not both). If neither is provided, the organization's default (first) status will be used. Using `status_id` is recommended so that users can rename statuses in the UI without breaking your implementation.\n\n**custom.FIELD_ID** (optional): Set custom fields by setting `custom.FIELD_ID` to the field value, where FIELD_ID is the ID of the custom field, e.g.:\n\n```json\n{ \"custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c\": \"value\", \"custom.cf_8wtBWsdRU2Fur7GDnEeXQ7ra2Vu7R4hG1SNYdiEhh0F\": \"other value\" }\n```\n\nIf a custom field has `accepts_multiple_values: true`, the entire value will be replaced. For example, given a Lead has a Custom Choice Field with value `[\"A\", \"B\"]`, adding choice `\"C\"` would mean setting the value to `[\"A\", \"B\", \"C\"]`.\n\nNote that using the `custom` field dict or the `custom.FIELD_NAME` syntax (instead of custom field IDs) is deprecated and will be removed from the API. See [Custom Fields](https://developer.close.com/api/resources/custom-fields) for more details.", "requestBody": { "content": { "application/json": { "example": { "addresses": [ { "address_1": "747 Howard St", "address_2": "Room 3", "city": "San Francisco", "country": "US", "label": "business", "state": "CA", "zipcode": "94103" } ], "contacts": [ { "emails": [ { "email": "gob@example.com", "type": "office" } ], "name": "Gob", "phones": [ { "phone": "8004445555", "type": "office" } ], "title": "Sr. Vice President" } ], "custom.cf_FSYEbxYJFsnY9tN1OTAPIF33j7Sw5Lb7Eawll7JzoNh": "Segway", "custom.cf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form", "custom.cf_bA7SU4vqaefQLuK5UjZMVpbfHK4SVujTJ9unKCIlTvI": "Real Estate", "custom.cf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks": [ "Choice 1", "Choice 2" ], "description": "Best. Show. Ever.", "name": "Bluth Company", "status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "url": "http://thebluthcompany.tumblr.com/" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "addresses": [ { "address_1": "747 Howard St", "address_2": "Room 3", "city": "San Francisco", "country": "US", "label": "business", "state": "CA", "zipcode": "94103" } ], "contact_ids": [ "cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05" ], "contacts": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T05:30:24.844000+00:00", "date_updated": "2013-02-20T05:30:24.844000+00:00", "display_name": "Gob", "emails": [ { "email": "gob@example.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05", "name": "Gob", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "phone": "+18004445555", "phone_formatted": "+1 800-444-5555", "type": "office" } ], "title": "sr. vice president", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom.cf_FSYEbxYJFsnY9tN1OTAPIF33j7Sw5Lb7Eawll7JzoNh": "Segway", "custom.cf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form", "custom.cf_bA7SU4vqaefQLuK5UjZMVpbfHK4SVujTJ9unKCIlTvI": "Real Estate", "custom.cf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks": [ "Choice 1", "Choice 2" ], "date_created": "2013-02-20T05:30:24.854000+00:00", "date_updated": "2013-02-20T05:30:24.854000+00:00", "description": "Best. Show. Ever.", "display_name": "Bluth Company", "html_url": "https://app.close.com/lead/lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty/", "id": "lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty", "name": "Bluth Company", "opportunities": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Potential", "tasks": [], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "http://thebluthcompany.tumblr.com/" }, "schema": { "$ref": "#/components/schemas/Lead" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/lead/merge/": { "post": { "operationId": "leads_merge", "tags": [ "leads" ], "summary": "Merge two leads", "description": "For details and definitions of 'source' and 'destination', see the Merge Leads feature in the UI.", "requestBody": { "content": { "application/json": { "example": { "destination": "lead_6ivpsIOFYDEwCUz8sdftdoWqlKpLSNOAg9glZSLvZEG", "source": "lead_JCTqyXSXD42eGO6PlWOe5ase8VRDCpE7ITYti8Th2Ei" } } }, "required": true }, "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/lead/{id}/": { "get": { "operationId": "leads_get", "tags": [ "leads" ], "summary": "Get a single Lead", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "addresses": [], "contact_ids": [ "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh" ], "contacts": [ { "created_by": null, "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "CEO", "date_created": "2013-02-01T00:54:51.331000+00:00", "date_updated": "2013-02-06T20:53:01.954000+00:00", "display_name": "Bruce Wayne", "emails": [ { "email": "thedarkknight@close.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_o0kP3Nqyq0wxr5DLWIEm8mVr6ZpI0AhonKLDG0V5Qjh", "name": "Bruce Wayne", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "phone": "+16503334444", "phone_formatted": "+1 650-333-4444", "type": "office" } ], "title": "The Dark Knight", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "created_by": null, "custom.cf_ORxgoOQ5YH1p7lDQzFJ88b4z0j7PLLTRaG66m8bmcKv": "Website contact form", "custom.cf_nenE344jkwrjyRRezwsf8b4V1MCoXWIDHIStmFavZks": [ "Choice 1", "Choice 2" ], "date_created": "2013-02-01T00:54:51.333000+00:00", "date_updated": "2013-02-06T20:53:01.977000+00:00", "description": "", "display_name": "Wayne Enterprises (Sample Lead)", "html_url": "https://app.close.com/lead/lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O/", "id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "name": "Wayne Enterprises (Sample Lead)", "opportunities": [ { "annualized_expected_value": 37500, "annualized_value": 50000, "confidence": 75, "contact_id": null, "created_by": null, "date_created": "2013-02-01T00:54:51.337000+00:00", "date_lost": null, "date_updated": "2013-02-01T00:54:51.337000+00:00", "date_won": null, "expected_value": 37500, "id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "Bruce needs new software for the Bat Cave.", "note_html": "

          Bruce needs new software for the Bat Cave.

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 50000, "value_currency": "USD", "value_formatted": "$500", "value_period": "one_time" }, { "annualized_expected_value": 45000, "annualized_value": 60000, "confidence": 75, "contact_id": null, "created_by": null, "date_created": "2013-02-01T00:54:51.337000+00:00", "date_lost": null, "date_updated": "2013-02-01T00:54:51.337000+00:00", "date_won": null, "expected_value": 3750, "id": "oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "Bat Cave monthly maintenance cost", "note_html": "

          Bat Cave monthly maintenance cost

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 5000, "value_currency": "USD", "value_formatted": "$50 monthly", "value_period": "monthly" } ], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Potential", "tasks": [], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": null }, "schema": { "$ref": "#/components/schemas/Lead" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "leads_update", "tags": [ "leads" ], "summary": "Update an existing lead", "description": "Supports non-destructive patches. Nested `contacts` cannot be updated through this endpoint -- use the Contacts API instead.\n\n**status**: See `status` and `status_id` guidance on the create endpoint.\n\n**custom.FIELD_ID** (optional): See `custom.FIELD_ID` guidance on the create endpoint. You can also unset a single field, e.g.:\n\n```json\n{ \"custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c\": null }\n```\n\nIf the custom field accepts multiple values, you can specify `.add` or `.remove` as part of the field key to add/remove a single value to/from a list of values, e.g.:\n\n```json\n{ \"custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add\": \"Wednesday\" }\n```\n\nadds \"Wednesday\" to the list of values which already exist on the given lead.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "description": "Best show ever canceled. Sad." } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "addresses": [], "contact_ids": [ "cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05" ], "contacts": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T05:30:24.844000+00:00", "date_updated": "2013-02-20T05:43:41.611000+00:00", "display_name": "Gob", "emails": [ { "email": "gob@example.com", "is_unsubscribed": false, "type": "office" } ], "id": "cont_qpjDKxbN3WWsuhaJjg2Qr9pkqHqe1yviZ5BS0dEyz05", "name": "Gob", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phones": [ { "phone": "+18004445555", "phone_formatted": "+1 800-444-5555", "type": "office" } ], "title": "sr. vice president", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-20T05:30:24.854000+00:00", "date_updated": "2013-02-20T05:43:41.622000+00:00", "description": "Best show ever canceled. Sad.", "display_name": "Bluth Company", "html_url": "https://app.close.com/lead/lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty/", "id": "lead_70jZ5hiVt5X31MZ3vJ0R0GJMqJEihkoF7TtSVFbN2ty", "name": "Bluth Company", "opportunities": [], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "status_id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Potential", "tasks": [], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "http://thebluthcompany.tumblr.com/" }, "schema": { "$ref": "#/components/schemas/Lead" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "leads_delete", "tags": [ "leads" ], "summary": "Delete a lead", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/me/": { "get": { "operationId": "users_get_me", "tags": [ "users" ], "summary": "Fetch information about yourself", "description": "A special instance of the Users endpoint for the current user. Useful for determining your own `id` and `organization_id`.", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "date_created": "2012-08-29T13:46:31.870000+00:00", "date_updated": "2013-02-08T06:17:00.583000+00:00", "email": "anthony@close.com", "email_accounts": [ { "_type": "google", "id": "emailacct_qG1RuJuy5baiXvVbIc2VelooJwGcKeIrQLNtTd9p6RO", "identities": [ { "email": "anthony@close.com", "name": "Anthony Nemitz" } ], "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "first_name": "Anthony", "id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "image": "https://secure.gravatar.com/avatar/0ff7116c35caeba6d174affd45730cfd", "last_name": "Nemitz", "last_used_timezone": "America/Denver", "memberships": [ { "auto_record_calls": "disabled", "id": "memb_I4Tx9tZwz5npqdGtd0baWtjjlpeFf45OBlkAAKcF3Gc", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "permissions_granted": [ "bulk_edit", "export" ], "role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "track_email_opens": true, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "organizations": [ { "created_by": null, "date_created": "2013-02-01T00:54:51.097000+00:00", "date_updated": "2013-02-20T04:38:01.961000+00:00", "id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "lead_statuses": [ { "id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Potential" }, { "id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Bad Fit" }, { "id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Qualified" } ], "name": "Sample Data", "pipelines": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2019-11-04T11:04:13.014979", "date_updated": "2019-11-13T14:12:13.051542", "id": "pipe_6gV01if4wo7r2YTVQDWP2j", "name": "Sales", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "statuses": [ { "id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp", "label": "Active", "type": "active" }, { "id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8", "label": "Won", "type": "won" }, { "id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2", "label": "Lost", "type": "lost" } ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "updated_by": null } ], "phone_numbers": [ { "date_created": "2013-02-01T01:09:43.539000+00:00", "date_updated": "2013-02-01T01:09:43.539000+00:00", "id": "phon_wvZIxqZic5rqu14gnYjKXbPtj0Spj4mRGwII17IZCkQ", "number": "+16502822249", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/membership/": { "post": { "operationId": "memberships_create", "tags": [ "memberships" ], "summary": "Create a membership", "description": "Ensures an active membership for the given email will be provisioned.\n\n- If the user already exists, they will be added to the requestor's organization.\n- If it doesn't exist, a new user will be provisioned.\n\nThis request requires \"Manage Organization\" permissions.\n\nAs a security precaution, this operation requires the organization to have the\n\"Restrict new users to emails from these domains\" setting enabled, and the new\nmember's email address must belong to one of its verified domains.", "requestBody": { "content": { "application/json": { "example": { "email": "john@salesteam.com", "role_id": "user" }, "schema": { "$ref": "#/components/schemas/CreateMembership" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "auto_record_calls": "unset", "default_caller_id": null, "hangup_recording_url": null, "id": "memb_JPCqDJq0AmoZFhemXAWrWk9327DqfJgUF2VGPMOL4Lp", "is_free": false, "may_workflows_impersonate": false, "onboarding_status": "in-progress", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "permissions_granted": [ "bulk_email", "bulk_import", "bulk_sequence_subscriptions", "calling", "delete_leads", "delete_own_activities", "delete_own_opportunities", "delete_own_tasks", "manage_others_activities", "manage_others_opportunities", "manage_others_tasks", "merge_leads", "view_all_leads" ], "primary_personal_number": null, "role": "user", "role_id": "user", "track_email_opens": true, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Invalid membership data, including an email address that does not belong to one of the organization's verified domains." }, "401": { "description": "Unauthorized" }, "403": { "description": "Membership creation is not permitted because the requestor cannot manage the organization, the verified domain restriction is disabled, or the requested role grants the `manage_organization` permission." }, "404": { "description": "Not found" } } }, "put": { "operationId": "memberships_bulk_update", "tags": [ "memberships" ], "summary": "Bulk update memberships", "description": "Any field that can be updated on a membership individually can also be used to bulk update multiple memberships. Pass the comma-separated ids of the memberships to update into `id__in` in `_params`. For example:\n\n```json\n{\"_params\": {\"id__in\": \"memb_A,memb_B\"}, \"role_id\": \"role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p\"}\n```", "requestBody": { "content": { "application/json": { "example": { "role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p" }, "schema": { "$ref": "#/components/schemas/Membership" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "count": 2 } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/membership/{id}/": { "put": { "operationId": "memberships_update", "tags": [ "memberships" ], "summary": "Update a membership", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "auto_record_calls": "enabled", "role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p" }, "schema": { "$ref": "#/components/schemas/Membership" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "auto_record_calls": "enabled", "id": "memb_SLfZq4IU5E2nBA3PBzHFsi1HUv98cPmGUIZGlWK7Z3y", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "permissions_granted": [ "bulk_delete", "bulk_edit", "export", "manage_customizations", "manage_group_numbers", "manage_organization", "manage_team_smart_views" ], "plan_type": "enterprise", "primary_personal_number": "phon_nm67bxYRTJUZNOXflc1I3bBadd0PbQvvui1byxCwK7k", "role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "user_id": "user_A3HwmEOcDLL8ilFx8QKcYEuKDtRPtBuQ68PctqwMqtP" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "memberships_delete", "tags": [ "memberships" ], "summary": "Delete a membership", "description": "Deactivates a membership, removing the user from the associated organization.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/membership/{id}/pinned_views/": { "get": { "operationId": "memberships_get_pinned_views", "tags": [ "memberships" ], "summary": "Get pinned views for a membership", "description": "Get the ordered list of pinned views for the given membership.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "saved_view_ids": [ "save_LCt6QxYsDbdJfMiIkLjBFJBkJTwS9TufXu3nSkHopXM", "save_Ova4RKAzzFWejVEMUpDBFzB4YV3ObgCJUY1TpDK0ZGa", "save_Ova689zHHpAVwvHthafS1NOatGFYsBGtyKxFt7Ujg7t" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "memberships_update_pinned_views", "tags": [ "memberships" ], "summary": "Update pinned views for a membership", "description": "Set the pinned views for the given membership. Provide an ordered list that will overwrite the entire current list.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "saved_view_ids": [ "save_LCt6QxYsDbdJfMiIkLjBFJBkJTwS9TufXu3nSkHopXM", "save_Ova4RKAzzFWejVEMUpDBFzB4YV3ObgCJUY1TpDK0ZGa", "save_Ova689zHHpAVwvHthafS1NOatGFYsBGtyKxFt7Ujg7t" ] }, "schema": { "$ref": "#/components/schemas/SetPinnedSavedView" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "saved_view_ids": [ "save_LCt6QxYsDbdJfMiIkLjBFJBkJTwS9TufXu3nSkHopXM", "save_Ova4RKAzzFWejVEMUpDBFzB4YV3ObgCJUY1TpDK0ZGa", "save_Ova689zHHpAVwvHthafS1NOatGFYsBGtyKxFt7Ujg7t" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/opportunity/": { "get": { "operationId": "opportunities_list", "tags": [ "opportunities" ], "summary": "List or filter opportunities", "description": "* All opportunity list responses contain the following aggregate values about all the matching objects (regardless of pagination / limits):\n * `total_results`: the total number of objects,\n * `count_by_value_period`: a dictionary containing the number of opportunities by value period, e.g. `{ 'one_time': 2, 'annual': 1, 'monthly': 1 }`,\n * `total_value_one_time`: the sum of the values of all one time opportunities,\n * `total_value_monthly`: the sum of the values of all monthly opportunities,\n * `total_value_annual`: the sum of the values of all annual opportunities,\n * `total_value_annualized`: the sum of the values of all opportunities where monthly opportunity values are multiplied by 12,\n * `expected_value_one_time`: the sum of the values of all one time opportunities multiplied by their confidence,\n * `expected_value_monthly`: the sum of the values of all monthly opportunities multiplied by their confidence,\n * `expected_value_annual`: the sum of the values of all annual opportunities multiplied by their confidence,\n * `expected_value_annualized`: the sum of the values of all opportunities multiplied by their confidence where monthly opportunity values are multiplied by 12,\n* `query` is an optional search query filter. Only opportunity properties may be used in the filter. For example, `note:important` will only show opportunities which contain the text `important` in their note. Or, `status_change(old_status:active new_status:won date:yesterday)` will only show opportunities that transitioned from status `active` to status `won` on the previous day.\n* `_order_by` allows: `date_won`, `date_updated`, `date_created`, `confidence`, `user_name`, `value`, `annualized_value`, `annualized_expected_value` (each of them allows descending order by prepending a minus, e.g. `_order_by=-date_won`).\n* `value_period` allows: `one_time`, `monthly`, `annual`.\n* Multiple values for `user_id`, `status_id`, `status_label`, `status_type` and `value_period` can be specified using the *in* operator, e.g. `status_type__in=active,won`.\n* `_group_by` allows: `user_id`, `date_won__week`, `date_won__month`, `date_won__quarter` `date_won__year` to group results by the given criteria.\n\n When grouping results, the `data` array contains a list of groups instead of objects. A group consists of the following fields:\n * `key` containing a unique group key,\n * `objects` containing the list of objects for the given group,\n * `total_results` containing the number of total objects for the given group,\n * all aggregate values for the given group,\n * if grouping by year: `year`, containing the year for the given group,\n * if grouping by month: `year` and `month`, containing the year and month (1-12) for the given group,\n * if grouping by quarter: `year` and `quarter`, containing the year and quarter (1-4) for the given group,\n * if grouping by week: `weekyear` and `week`, containing the ISO week year and ISO week number for the given group,\n * if grouping by user: `user_id` and `user_name`, containing the user ID and full name of the user for the given group.\n\n Note that pagination still applies to objects and not groups. The last or first group may be cut off during pagination, therefore `total_results` may not match the length of `objects`. When paginating, the `key` value may be used to combine groups across multiple pages. Sorting using `_order_by` may be applied and sorts the items within each of the groups. Group order can be reversed by prepending a minus. For example, `_group_by=-date_won__week` will show the most recent weeks first. When grouping by `user_id`, results are ordered by the user's full name.\n* `lead_saved_search_id` is an optional lead Smart View filter.\n* (deprecated) `lead_query` is an optional lead search text-based query filter. This parameter is now deprecated in favor of using the `lead_saved_search_id` Smart View ID parameter.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" }, { "in": "query", "name": "lead_id", "required": false, "schema": { "title": "Lead ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "in": "query", "name": "user_id", "required": false, "schema": { "title": "User ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "user_id__in", "required": false, "schema": { "title": "User ID (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status_id", "required": false, "schema": { "title": "Status ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status_id__in", "required": false, "schema": { "title": "Status ID (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status_type", "required": false, "schema": { "title": "Status Type", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status_type__in", "required": false, "schema": { "title": "Status Type (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status_label", "required": false, "schema": { "title": "Status Label", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status_label__in", "required": false, "schema": { "title": "Status Label (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status", "required": false, "schema": { "title": "Status", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "status__in", "required": false, "schema": { "title": "Status (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_won", "required": false, "schema": { "title": "Date Won", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_won__gte", "required": false, "schema": { "title": "Date Won (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_won__gt", "required": false, "schema": { "title": "Date Won (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_won__lte", "required": false, "schema": { "title": "Date Won (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_won__lt", "required": false, "schema": { "title": "Date Won (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created", "required": false, "schema": { "title": "Date Created", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__gte", "required": false, "schema": { "title": "Date Created (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__gt", "required": false, "schema": { "title": "Date Created (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__lte", "required": false, "schema": { "title": "Date Created (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__lt", "required": false, "schema": { "title": "Date Created (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated", "required": false, "schema": { "title": "Date Updated", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__gte", "required": false, "schema": { "title": "Date Updated (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__gt", "required": false, "schema": { "title": "Date Updated (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__lte", "required": false, "schema": { "title": "Date Updated (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__lt", "required": false, "schema": { "title": "Date Updated (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "value_period", "required": false, "schema": { "title": "Value Period", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "value_period__in", "required": false, "schema": { "title": "Value Period (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "query", "required": false, "schema": { "title": "Query", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "lead_query", "required": false, "schema": { "title": "Lead Query", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "lead_saved_search_id", "required": false, "schema": { "title": "Lead Saved Search ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "is_stalled", "required": false, "schema": { "title": "Is Stalled", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "_order_by", "required": false, "schema": { "title": "Order By", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "_group_by", "required": false, "schema": { "title": "Group By", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "count_by_value_period": { "annual": 1, "monthly": 1, "one_time": 1 }, "data": [ { "annualized_expected_value": 225000, "annualized_value": 300000, "confidence": 75, "contact_id": null, "created_by": null, "date_created": "2013-02-01T00:54:51.321000+00:00", "date_lost": null, "date_updated": "2013-02-01T00:54:51.321000+00:00", "date_won": null, "expected_value": 225000, "id": "oppo_KXyJj2PT74U1wOPvhBDO37jCC89mmrnoW0DylcDDWrL", "lead_id": "lead_s6vHFTK1TSRoH6otXOexWDO9jM4xyb1kELHDoU7Fdsp", "lead_name": "Bluth Company (Sample Lead)", "note": "Gob's ready to buy a $3,000 suit.", "note_html": "

          Gob's ready to buy a $3,000 suit.

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 300000, "value_currency": "USD", "value_formatted": "$3,000", "value_period": "one_time" }, { "annualized_expected_value": 37500, "annualized_value": 50000, "confidence": 75, "contact_id": null, "created_by": null, "date_created": "2013-02-01T00:54:51.337000+00:00", "date_lost": null, "date_updated": "2013-02-01T00:54:51.337000+00:00", "date_won": null, "expected_value": 37500, "id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "Bruce needs new software for the Bat Cave.", "note_html": "

          Bruce needs new software for the Bat Cave.

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 50000, "value_currency": "USD", "value_formatted": "$500", "value_period": "annual" }, { "annualized_expected_value": 30000, "annualized_value": 60000, "confidence": 50, "contact_id": null, "created_by": null, "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "https://www.example.com/contract.pdf", "date_created": "2013-02-01T00:54:51.337000+00:00", "date_lost": null, "date_updated": "2013-02-01T00:54:51.337000+00:00", "date_won": null, "expected_value": 2500, "id": "oppo_klajsdflf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "Bat Cave monthly maintenance cost", "note_html": "

          Bat Cave monthly maintenance cost

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 5000, "value_currency": "USD", "value_formatted": "$50 monthly", "value_period": "monthly" } ], "expected_value_annual": 37500, "expected_value_annual_formatted": "$375", "expected_value_annualized": 292500, "expected_value_annualized_formatted": "$2,925", "expected_value_monthly": 2500, "expected_value_monthly_formatted": "$25", "expected_value_one_time": 225000, "expected_value_one_time_formatted": "$2,250", "has_more": false, "total_results": 3, "total_value_annual": 50000, "total_value_annual_formatted": "$500", "total_value_annualized": 410000, "total_value_annualized_formatted": "$4,100", "total_value_monthly": 5000, "total_value_monthly_formatted": "$50", "total_value_one_time": 300000, "total_value_one_time_formatted": "$3,000" }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/Opportunity" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "opportunities_create", "tags": [ "opportunities" ], "summary": "Create an opportunity", "description": "Create an opportunity, optionally linked to an existing lead.\n\n**custom.FIELD_ID** (optional): Set custom fields by setting `custom.FIELD_ID` to the field value, where FIELD_ID is the ID of the custom field, e.g.:\n\n```json\n{ \"custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c\": \"value\", \"custom.cf_8wtBWsdRU2Fur7GDnEeXQ7ra2Vu7R4hG1SNYdiEhh0F\": \"other value\" }\n```\n\nIf a custom field has `accepts_multiple_values: true`, the entire value will be replaced. For example, given an Opportunity has a Custom Choice Field with value `[\"A\", \"B\"]`, adding choice `\"C\"` would mean setting the value to `[\"A\", \"B\", \"C\"]`.\n\nNote that using the `custom` field dict or the `custom.FIELD_NAME` syntax (instead of custom field IDs) is deprecated and will be removed from the API. See [Custom Fields](https://developer.close.com/api/resources/custom-fields) for more details.", "requestBody": { "content": { "application/json": { "example": { "confidence": 90, "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "https://www.example.com/contract.pdf", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "note_html": "

          i hope this deal closes...

          ", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "value": 500, "value_period": "monthly" }, "schema": { "$ref": "#/components/schemas/CreateOpportunity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "annualized_expected_value": 540000, "annualized_value": 600000, "confidence": 90, "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "https://www.example.com/contract.pdf", "date_created": "2013-02-20T10:11:50.520000+00:00", "date_lost": null, "date_updated": "2013-02-20T10:11:50.520000+00:00", "date_won": null, "expected_value": 45000, "id": "oppo_bJoqD4QX21AfA2fAGX5HmPQ1EgGoWBannvLj4khIfPH", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "i hope this deal closes...", "note_html": "

          i hope this deal closes...

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "Anthony Nemitz", "value": 50000, "value_currency": "USD", "value_formatted": "$50 monthly", "value_period": "monthly" }, "schema": { "$ref": "#/components/schemas/Opportunity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/opportunity/{id}/": { "get": { "operationId": "opportunities_get", "tags": [ "opportunities" ], "summary": "Retrieve an opportunity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "annualized_expected_value": 37500, "annualized_value": 50000, "confidence": 75, "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom.cf_j0P7kHmgFTZZnYBFtyPSZ3uQw4dpW8xKcW7Krps8atj": "https://www.example.com/contract.pdf", "date_created": "2013-02-01T00:54:51.337000+00:00", "date_lost": null, "date_updated": "2013-02-01T00:54:51.337000+00:00", "date_won": null, "expected_value": 37500, "id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "Bruce needs new software for the Bat Cave.", "note_html": "

          Bruce needs new software for the Bat Cave.

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Active", "status_type": "active", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 50000, "value_currency": "USD", "value_formatted": "$500", "value_period": "one_time" }, "schema": { "$ref": "#/components/schemas/Opportunity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "opportunities_update", "tags": [ "opportunities" ], "summary": "Update an opportunity", "description": "**custom.FIELD_ID** (optional)\n\n- See description for `custom.FIELD_ID` in `POST /opportunity/` above.\n- Additionally, you can unset a single field by using `{ \"custom.FIELD_ID\": null }`, e.g.:\n```\n{ \"custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c\": null }\n```\nIf you're trying to update a custom field and that custom field accepts multiple values, you can also specify `.add` or `.remove` as part of the field key to add/remove a single value to/from a list of values, e.g.:\n```\n{ \"custom.cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c.add\": \"Wednesday\" }\n```", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "status_id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk" }, "schema": { "$ref": "#/components/schemas/UpdateOpportunity" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "annualized_expected_value": 37500, "annualized_value": 50000, "confidence": 75, "contact_id": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2013-02-01T00:54:51.337000+00:00", "date_lost": null, "date_updated": "2013-02-20T10:06:25.248000+00:00", "date_won": "2013-02-20", "expected_value": 37500, "id": "oppo_8eB77gAdf8FMy6GsNHEy84f7uoeEWv55slvUjKQZpJt", "lead_id": "lead_IIDHIStmFcFQZZP0BRe99V1MCoXWz2PGCm6EDmR9v2O", "lead_name": "Wayne Enterprises (Sample Lead)", "note": "Bruce needs new software for the Bat Cave.", "note_html": "

          Bruce needs new software for the Bat Cave.

          ", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_04fC628PVB0HjK2Qq5EqEf", "pipeline_name": "Sales", "status_id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "status_label": "Won", "status_type": "won", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_name": "John Doe", "value": 50000, "value_currency": "USD", "value_formatted": "$500", "value_period": "one_time" }, "schema": { "$ref": "#/components/schemas/Opportunity" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "opportunities_delete", "tags": [ "opportunities" ], "summary": "Delete an opportunity", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/organization/{id}/": { "get": { "operationId": "organizations_get", "tags": [ "organizations" ], "summary": "Get an organization's details", "description": "By default, `memberships` and `inactive_memberships` are populated with user data prefixed with `user_`. If you'd rather have a nested `user` field, use a query string like `?_expand=memberships__user,inactive_memberships__user`.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "_expand", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": null, "date_created": "2013-02-01T00:54:51.097000+00:00", "date_updated": "2013-02-20T04:38:01.961000+00:00", "id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "inactive_memberships": [], "lead_statuses": [ { "id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Potential" }, { "id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Bad Fit" }, { "id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Qualified" } ], "memberships": [ { "auto_record_calls": "unset", "id": "memb_wLKueFux8M2u2jshQPichvA5V44hpECtoljWbJS1PeY", "permissions_granted": [ "bulk_edit", "export" ], "role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "track_email_opens": true, "user_email": "phil+sample@close.com", "user_first_name": "P", "user_full_name": "John Doe", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_last_name": "F", "user_phone": "16502822245" }, { "auto_record_calls": "unset", "id": "memb_hLHF3LsUI6N7twH1derRHiHEKeE843ttSYmsun4xkCn", "permissions_granted": [ "bulk_edit", "export" ], "role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "track_email_opens": true, "user_email": "phil@close.com", "user_first_name": "Phil", "user_full_name": "Phil Freo", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_last_name": "Freo", "user_phone": "16502822248" }, { "auto_record_calls": "unset", "id": "memb_I4Tx9tZwz5npqdGtd0baWtjjlpeFf45OBlkAAKcF3Gc", "permissions_granted": [ "bulk_edit", "export" ], "role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "track_email_opens": true, "user_email": "anthony@close.com", "user_first_name": "Anthony", "user_full_name": "Anthony Nemitz", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_last_name": "Nemitz", "user_phone": "16502822249" } ], "name": "Sample Data", "pipelines": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2019-11-04T11:04:13.014979", "date_updated": "2019-11-13T14:12:13.051542", "id": "pipe_6gV01if4wo7r2YTVQDWP2j", "name": "Sales", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "statuses": [ { "id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp", "label": "Active", "type": "active" }, { "id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8", "label": "Won", "type": "won" }, { "id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2", "label": "Lost", "type": "lost" } ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "plan_type": "lite", "updated_by": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "organizations_update", "tags": [ "organizations" ], "summary": "Update an organization", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "_expand", "required": false, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "currency": "USD", "lead_statuses": [ { "id": "stat_8ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk" }, { "id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk" }, { "id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk" }, { "id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk" } ], "name": "New Name" }, "schema": { "$ref": "#/components/schemas/Organization" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": null, "currency": "USD", "currency_symbol": "$", "date_created": "2013-02-01T00:54:51.097000+00:00", "date_updated": "2013-02-20T04:38:01.961000+00:00", "id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "lead_statuses": [ { "id": "stat_8ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Not Serious" }, { "id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Qualified" }, { "id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Bad Fit" }, { "id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Potential" } ], "memberships": [ { "auto_record_calls": "unset", "id": "memb_wLKueFux8M2u2jshQPichvA5V44hpECtoljWbJS1PeY", "permissions_granted": [ "bulk_edit", "export" ], "role_id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "track_email_opens": true, "user_email": "phil+sample@close.com", "user_first_name": "P", "user_full_name": "John Doe", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_last_name": "F", "user_phone": "16502822245" } ], "name": "New Name", "pipelines": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2019-11-04T11:04:13.014979", "date_updated": "2019-11-13T14:12:13.051542", "id": "pipe_6gV01if4wo7r2YTVQDWP2j", "name": "Sales", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "statuses": [ { "id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp", "label": "Active", "type": "active" }, { "id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8", "label": "Won", "type": "won" }, { "id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2", "label": "Lost", "type": "lost" } ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "plan_type": "lite", "updated_by": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/outcome/": { "get": { "operationId": "outcomes_list", "tags": [ "outcomes" ], "summary": "List or filter outcomes", "description": "Fetch a list of outcomes.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "applies_to": [ "calls", "meetings" ], "created_by": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2025-07-29T10:30:00.000000+00:00", "date_updated": "2025-07-29T10:30:00.000000+00:00", "description": "Prospect is qualified and booked a demo of our software.", "id": "outcome_03oUxZfoO6e2vHmcz1DiHR", "name": "Demo Booked", "organization_id": "orga_AbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "custom", "updated_by": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "applies_to": [ "calls" ], "created_by": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2025-07-29T10:30:00.000000+00:00", "date_updated": "2025-07-29T10:30:00.000000+00:00", "description": "Call went to voicemail and a pre-recorded voicemail message was dropped.", "id": "outcome_030Xl5QwKi7tPRLRtnuef3", "name": "Left Pre-Recorded Voicemail", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "vm-dropped", "updated_by": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/Outcome" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "outcomes_create", "tags": [ "outcomes" ], "summary": "Create an outcome", "description": "Create a new outcome for the organization.", "requestBody": { "content": { "application/json": { "example": { "description": "Prospect declined our offer", "name": "Not Interested", "type": "custom" }, "schema": { "$ref": "#/components/schemas/CreateOutcome" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "applies_to": [ "calls", "meetings" ], "created_by": "user_a6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2025-07-29T10:30:00.000000+00:00", "date_updated": "2025-07-29T10:30:00.000000+00:00", "description": "Prospect declined our offer", "id": "outcome_03oUxZfoO6e2vHmcz1DiHR", "name": "Not Interested", "organization_id": "orga_rbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "custom", "updated_by": "user_a6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Outcome" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/outcome/{id}/": { "get": { "operationId": "outcomes_get", "tags": [ "outcomes" ], "summary": "Fetch a single outcome", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "applies_to": [ "calls" ], "created_by": "user_a6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2025-07-29T10:30:00.000000+00:00", "date_updated": "2025-07-29T10:30:00.000000+00:00", "description": "We reached a gatekeeper and couldn't get past them.", "id": "outcome_03oUxZfoO6e2vHmcz1DiHR", "name": "Gatekeeper Reached", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "custom", "updated_by": "user_a6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Outcome" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "outcomes_update", "tags": [ "outcomes" ], "summary": "Update an outcome", "description": "Update an existing outcome.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Very Interested", "description": "Prospect is very interested and wants to proceed." }, "schema": { "$ref": "#/components/schemas/UpdateOutcome" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "applies_to": [ "calls", "meetings" ], "created_by": "user_a6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2025-07-29T10:30:00.000000+00:00", "date_updated": "2025-07-29T11:45:00.000000+00:00", "description": "Prospect is very interested and wants to proceed", "id": "outcome_03oUxZfoO6e2vHmcz1DiHR", "name": "Very Interested", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "type": "custom", "updated_by": "user_a6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Outcome" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "outcomes_delete", "tags": [ "outcomes" ], "summary": "Delete an outcome", "description": "Delete an existing outcome.\n\nAll of the calls and/or meetings associated with this outcome will still retain that reference, but you won't be able to set that outcome on any new calls & meetings nor find its definition in the API.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/phone_number/": { "get": { "operationId": "phone_numbers_list", "tags": [ "phone_numbers" ], "summary": "List or search for phone numbers", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "$ref": "#/components/parameters/FieldsParam" }, { "in": "query", "name": "number", "required": false, "schema": { "title": "Number", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "user_id", "required": false, "description": "Deprecated. Use `participant_user_id` instead. The distinction between personal and group numbers is being removed, and `user_id` will be removed in a future update.", "schema": { "title": "User ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ], "deprecated": true } }, { "in": "query", "name": "is_group_number", "required": false, "description": "Deprecated. Use `participant_user_id` instead. The distinction between personal and group numbers is being removed, and `is_group_number` will be removed in a future update.", "schema": { "title": "Is Group Number", "default": null, "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "deprecated": true } }, { "in": "query", "name": "participant_user_id", "required": false, "description": "Return numbers the given user participates in, including both personal and group numbers they belong to.", "schema": { "title": "Participant User ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "address_id": null, "bundle_id": null, "carrier": null, "carrier_type": null, "country": "US", "date_created": "2016-07-18T22:54:24.787000+00:00", "date_updated": "2016-07-18T22:55:55.938000+00:00", "forward_to": null, "forward_to_enabled": false, "forward_to_formatted": null, "id": "phon_asdjkfev50ZKOqTVndOFN4effzv99vDvpDxrks9XLU3", "inbound_ring_duration": null, "is_group_number": false, "is_premium": false, "is_verified": true, "label": "Primary Number", "last_billed_price": null, "mms_enabled": true, "next_billing_on": null, "number": "+16503335555", "number_formatted": "+1 650-333-5555", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "participants": [], "phone_numbers": [ "+16508889898" ], "phone_numbers_formatted": [ "+1 650-888-9898" ], "press_1_to_accept": false, "sms_enabled": true, "supports_mms_to_countries": [ "CA", "US" ], "supports_sms_to_countries": [ "CA", "US" ], "type": "internal", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "voicemail_greeting_url": null, "was_ported": false }, { "address_id": null, "bundle_id": null, "carrier": null, "carrier_type": null, "country": "US", "date_created": "2016-07-18T22:54:24.787000+00:00", "date_updated": "2016-07-18T22:55:55.938000+00:00", "forward_to": null, "forward_to_enabled": false, "forward_to_formatted": null, "id": "phon_973589ev50ZKOqTVndOFN4effz092753608234569U3", "is_group_number": false, "is_premium": false, "is_verified": true, "label": "My Personal Cell", "last_billed_price": null, "mms_enabled": true, "next_billing_on": null, "number": "+14151231234", "number_formatted": "+1 415-123-1234", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "participants": [], "phone_numbers": [], "phone_numbers_formatted": [], "press_1_to_accept": false, "sms_enabled": false, "supports_mms_to_countries": [ "CA", "US" ], "supports_sms_to_countries": [], "type": "external", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "voicemail_greeting_url": null, "was_ported": false }, { "address_id": null, "bundle_id": null, "carrier": null, "carrier_type": null, "country": "US", "date_created": "2016-07-14T20:37:23.022000+00:00", "date_updated": "2016-07-18T22:54:41.548000+00:00", "forward_to": null, "forward_to_enabled": false, "forward_to_formatted": null, "id": "phon_324230958beOjoa6F42w5Hlkdjfg8p3wmIPnTuvNbaX", "inbound_ring_duration": null, "is_group_number": true, "is_premium": false, "is_verified": true, "label": "Group Number", "last_billed_price": null, "mms_enabled": true, "next_billing_on": null, "number": "+16508881234", "number_formatted": "+1 650-888-1234", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "participants": [ "user_OWiN4rEbBR04K2AKXe3jq5j1JWQqmTguuuZa1dG7qQr", "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "user_SJMF1fEyZGdtl2RPzCm9zVQ7qhd33VajdGDREhbsxjF" ], "phone_numbers": [], "phone_numbers_formatted": [], "press_1_to_accept": false, "sms_enabled": true, "supports_mms_to_countries": [ "CA", "US" ], "supports_sms_to_countries": [ "CA", "US" ], "type": "internal", "user_id": null, "voicemail_greeting_url": null } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/PhoneNumber" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/phone_number/request/internal/": { "post": { "operationId": "phone_numbers_create", "tags": [ "phone_numbers" ], "summary": "Request an internal phone number", "description": "Renting a phone number incurs a cost. You need the \"Manage Team Phone Numbers\" permission to rent group numbers.\n\nIf a number was rented, a 201 response is returned with the new number. If no number was rented (4xx response code), the response contains a `status` field which may contain one of the values below. New statuses may be added in the future.\n\n* `has-voice-only`: This country/prefix combination only has non-SMS-capable\n numbers. You can attempt renting the number by passing `with_sms` as `false`.\n* `needs-more-info`: More information (such as proof of address) is needed to\n rent this number. This number can only be rented by contacting Close support.\n* `billing-error`: An error related to billing has occurred. For example, the\n telephony budget has been reached, or there are not enough funds and recharging failed.\n* `error`: An error has occurred while renting this number. A human-readable\n message is returned in the `error` field.", "requestBody": { "content": { "application/json": { "example": { "country": "US", "prefix": "650", "sharing": "personal" }, "schema": { "$ref": "#/components/schemas/CreatePhoneNumberRequest" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "address_id": null, "bundle_id": null, "carrier": null, "carrier_type": null, "country": "US", "date_created": "2021-03-17T11:45:56.651057", "date_updated": "2021-03-17T11:45:56.651057", "forward_to": null, "forward_to_enabled": false, "forward_to_formatted": null, "id": "phon_MiLNdBqo8utNOf1U78RaZgQB1Iq6rRGftiDW5C8B9uL", "inbound_ring_duration": null, "is_group_number": false, "is_premium": false, "is_verified": true, "label": null, "last_billed_price": null, "mms_enabled": true, "next_billing_on": null, "number": "+16503335555", "number_formatted": "+1 650-333-5555", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "press_1_to_accept": false, "sms_enabled": true, "supports_mms_to_countries": [ "CA", "US" ], "supports_sms_to_countries": [ "CA", "PR", "US" ], "type": "internal", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "voicemail_greeting_url": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/phone_number/{id}/": { "get": { "operationId": "phone_numbers_get", "tags": [ "phone_numbers" ], "summary": "Retrieve a single phone number", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "address_id": null, "bundle_id": null, "carrier": null, "carrier_type": null, "country": "US", "date_created": "2016-07-18T22:54:24.787000+00:00", "date_updated": "2016-07-18T22:55:55.938000+00:00", "forward_to": null, "forward_to_enabled": false, "forward_to_formatted": null, "id": "phon_asdjkfev50ZKOqTVndOFN4effzv99vDvpDxrks9XLU3", "inbound_ring_duration": null, "is_group_number": false, "is_premium": false, "is_verified": true, "label": "Primary Number", "last_billed_price": null, "mms_enabled": true, "next_billing_on": null, "number": "+16503335555", "number_formatted": "+1 650-333-5555", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "press_1_to_accept": false, "sms_enabled": true, "supports_mms_to_countries": [ "CA", "US" ], "supports_sms_to_countries": [ "CA", "US" ], "type": "internal", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "voicemail_greeting_url": null }, "schema": { "$ref": "#/components/schemas/PhoneNumber" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "phone_numbers_update", "tags": [ "phone_numbers" ], "summary": "Update a phone number", "description": "You need the \"Manage Team Phone Numbers\" permission to update a group number. You can only update your own personal numbers.\n\nYou can:\n\n- Change a `label` of your number.\n- Set up call forwarding via `forward_to` and `forward_to_enabled`.\n- Set up a voicemail greeting by including a URL of an mp3 recording in `voicemail_greeting_url`. We require the URL to be secure (i.e. starting with https://).\n- Modify which team members are part of a group number via `participants`. This should be a list of user IDs.\n- Modify which external phone numbers are part of a group number via `phone_numbers`. This should be a list of phone numbers in E.164 international format, e.g. \"+16503334444\".\n- Change how long (in seconds, 15-90) the number rings on inbound calls before moving on (e.g. to voicemail) via `inbound_ring_duration`.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "forward_to": "+16502221111", "forward_to_enabled": true, "inbound_ring_duration": 45, "label": "My number w/ forwarding", "voicemail_greeting_url": "https://s3.amazonaws.com/bucket/aaa-bbb-ccc.mp3" }, "schema": { "$ref": "#/components/schemas/UpdatePhoneNumber" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "address_id": null, "bundle_id": null, "carrier": null, "carrier_type": null, "country": "US", "date_created": "2016-07-18T22:54:24.787000+00:00", "date_updated": "2016-07-22T22:55:55.938000+00:00", "forward_to": "+16502221111", "forward_to_enabled": true, "forward_to_formatted": "+1 650-222-1111", "id": "phon_asdjkfev50ZKOqTVndOFN4effzv99vDvpDxrks9XLU3", "inbound_ring_duration": 45, "is_group_number": false, "is_premium": false, "is_verified": true, "label": "My number w/ forwarding", "last_billed_price": null, "mms_enabled": true, "next_billing_on": null, "number": "+16503335555", "number_formatted": "+1 650-333-5555", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "press_1_to_accept": false, "sms_enabled": true, "supports_mms_to_countries": [ "CA", "US" ], "supports_sms_to_countries": [ "CA", "US" ], "type": "internal", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "voicemail_greeting_url": "https://s3.amazonaws.com/bucket/aaa-bbb-ccc.mp3" }, "schema": { "$ref": "#/components/schemas/PhoneNumber" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "phone_numbers_delete", "tags": [ "phone_numbers" ], "summary": "Delete a phone number", "description": "You need the \"Manage Team Phone Numbers\" permission to delete a group number. You can only delete your own personal numbers.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/pipeline/": { "get": { "operationId": "pipelines_list", "tags": [ "pipelines" ], "summary": "List Pipelines for your organization", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2019-11-04T11:04:13.014979", "date_updated": "2019-11-13T14:12:13.051542", "id": "pipe_6gV01if4wo7r2YTVQDWP2j", "name": "Sales", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "statuses": [ { "id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp", "label": "Active", "type": "active" }, { "id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8", "label": "Won", "type": "won" }, { "id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2", "label": "Lost", "type": "lost" } ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "pipelines_create", "tags": [ "pipelines" ], "summary": "Create a Pipeline", "requestBody": { "content": { "application/json": { "example": { "name": "Success" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2019-11-04T11:04:13.014979", "date_updated": "2019-11-13T14:12:13.051542", "id": "pipe_6gV01if4wo7r2YTVQDWP2j", "name": "Success", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "statuses": [], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/pipeline/{id}/": { "get": { "operationId": "pipelines_get", "tags": [ "pipelines" ], "summary": "Fetch a single Pipeline", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2019-11-04T11:04:13.014979", "date_updated": "2019-11-13T14:12:13.051542", "id": "pipe_6gV01if4wo7r2YTVQDWP2j", "name": "Sales", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "statuses": [ { "id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp", "label": "Active", "type": "active" }, { "id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8", "label": "Won", "type": "won" }, { "id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2", "label": "Lost", "type": "lost" } ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "pipelines_update", "tags": [ "pipelines" ], "summary": "Update a Pipeline", "description": "You can use this endpoint to:\n\n* Rename a Pipeline.\n* Reorder Opportunity Statuses within a Pipeline.\n* Move an Opportunity Status from a different Pipeline into this one.\n * To do so, include `{\"id\": \"id_of_the_status_from_another_pipeline\"}` in the `statuses` list.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Updated Name", "statuses": [ { "id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2" }, { "id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8" }, { "id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp" } ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2019-11-04T11:04:13.014979", "date_updated": "2019-11-15T14:12:13.051542", "id": "pipe_6gV01if4wo7r2YTVQDWP2j", "name": "Updated Name", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "statuses": [ { "id": "stat_3mmBOyMmaG8yc4DmAPp9WmgbjhVctVLlnd9gmvWxBe2", "label": "Lost", "type": "lost" }, { "id": "stat_IOCtLYbAclJ8XAcb3yLUhQA3zlmjtXz8JMBLyXnNMF8", "label": "Won", "type": "won" }, { "id": "stat_3PB2sedHBCjwuBImAEwgHOo858f2j41lpROkcl51Fzp", "label": "Active", "type": "active" } ], "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "pipelines_delete", "tags": [ "pipelines" ], "summary": "Delete a Pipeline", "description": "Deletion is only allowed if the Pipeline doesn't contain any Opportunity Statuses. Delete all statuses first or move them to another pipeline.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/playbook/": { "get": { "operationId": "playbooks_list", "tags": [ "playbooks" ], "summary": "List or filter playbooks", "description": "Fetch a list of playbooks for the organization. Results are sorted by position ascending.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "in": "query", "name": "is_archived", "required": false, "description": "Filter for archived or not-archived playbooks. When not provided, both archived and not-archived playbooks will be returned.", "schema": { "title": "Is Archived", "default": null, "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, { "in": "query", "name": "position__gt", "required": false, "description": "Filters for where the playbook's `position` is greater than the given value.", "schema": { "title": "Position greater than", "default": null, "anyOf": [ { "type": "integer" }, { "type": "null" } ] } }, { "in": "query", "name": "created_at__lt", "required": false, "description": "Filters for where the playbook's `created_at` (creation date) is before the given value.", "schema": { "title": "Created At less than", "default": null, "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "archived_at": null, "archived_by_id": null, "created_at": "2025-07-29T10:30:00.000000+00:00", "created_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_ids": [ "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c" ], "description": "Initial discovery call with prospect.", "id": "convtyp_03oUxZfoO6e2vHmcz1DiHR", "name": "Discovery Call", "organization_id": "orga_AbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_ids": [ "outcome_030Xl5QwKi7tPRLRtnuef3", "outcome_03oUxZfoO6e2vHmcz1DiHR" ], "position": 0, "summary_guidance": "Summarize the prospect's pain points and next steps.", "updated_at": "2025-07-29T10:30:00.000000+00:00", "updated_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/Playbook" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "playbooks_create", "tags": [ "playbooks" ], "summary": "Create a playbook", "description": "Create a new playbook for the organization.", "requestBody": { "content": { "application/json": { "example": { "custom_field_ids": [ "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c" ], "description": "Initial discovery call with prospect.", "name": "Discovery Call", "outcome_ids": [ "outcome_030Xl5QwKi7tPRLRtnuef3", "outcome_03oUxZfoO6e2vHmcz1DiHR" ], "summary_guidance": "Summarize the prospect's pain points and next steps." }, "schema": { "$ref": "#/components/schemas/CreatePlaybook" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "archived_at": null, "archived_by_id": null, "created_at": "2025-07-29T10:30:00.000000+00:00", "created_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_ids": [ "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c" ], "description": "Initial discovery call with prospect.", "id": "convtyp_03oUxZfoO6e2vHmcz1DiHR", "name": "Discovery Call", "organization_id": "orga_AbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_ids": [ "outcome_030Xl5QwKi7tPRLRtnuef3", "outcome_03oUxZfoO6e2vHmcz1DiHR" ], "position": 0, "summary_guidance": "Summarize the prospect's pain points and next steps.", "updated_at": "2025-07-29T10:30:00.000000+00:00", "updated_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Playbook" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/playbook/{id}/": { "get": { "operationId": "playbooks_get", "tags": [ "playbooks" ], "summary": "Fetch a single playbook", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "archived_at": null, "archived_by_id": null, "created_at": "2025-07-29T10:30:00.000000+00:00", "created_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_ids": [ "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c" ], "description": "Initial discovery call with prospect.", "id": "convtyp_03oUxZfoO6e2vHmcz1DiHR", "name": "Discovery Call", "organization_id": "orga_AbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_ids": [ "outcome_030Xl5QwKi7tPRLRtnuef3", "outcome_03oUxZfoO6e2vHmcz1DiHR" ], "position": 0, "summary_guidance": "Summarize the prospect's pain points and next steps.", "updated_at": "2025-07-29T10:30:00.000000+00:00", "updated_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Playbook" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "playbooks_update", "tags": [ "playbooks" ], "summary": "Update a playbook", "description": "Update an existing playbook.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "Renamed Discovery Call" }, "schema": { "$ref": "#/components/schemas/UpdatePlaybook" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "archived_at": null, "archived_by_id": null, "created_at": "2025-07-29T10:30:00.000000+00:00", "created_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_ids": [ "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c" ], "description": "Initial discovery call with prospect.", "id": "convtyp_03oUxZfoO6e2vHmcz1DiHR", "name": "Renamed Discovery Call", "organization_id": "orga_AbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_ids": [ "outcome_030Xl5QwKi7tPRLRtnuef3", "outcome_03oUxZfoO6e2vHmcz1DiHR" ], "position": 0, "summary_guidance": "Summarize the prospect's pain points and next steps.", "updated_at": "2025-07-29T10:30:00.000000+00:00", "updated_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Playbook" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "playbooks_delete", "tags": [ "playbooks" ], "summary": "Delete a playbook", "description": "Delete an existing playbook.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/playbook/{id}/archive/": { "post": { "operationId": "playbooks_archive", "tags": [ "playbooks" ], "summary": "Archive a playbook", "description": "Archive an existing playbook. Archived playbooks are hidden from active listings but retain their associated history.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "archived_at": "2025-07-29T11:00:00.000000+00:00", "archived_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_at": "2025-07-29T10:30:00.000000+00:00", "created_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_ids": [ "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c" ], "description": "Initial discovery call with prospect.", "id": "convtyp_03oUxZfoO6e2vHmcz1DiHR", "name": "Discovery Call", "organization_id": "orga_AbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_ids": [ "outcome_030Xl5QwKi7tPRLRtnuef3", "outcome_03oUxZfoO6e2vHmcz1DiHR" ], "position": null, "summary_guidance": "Summarize the prospect's pain points and next steps.", "updated_at": "2025-07-29T10:30:00.000000+00:00", "updated_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Playbook" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/playbook/{id}/unarchive/": { "post": { "operationId": "playbooks_unarchive", "tags": [ "playbooks" ], "summary": "Unarchive a playbook", "description": "Restore a previously archived playbook to active status.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "archived_at": null, "archived_by_id": null, "created_at": "2025-07-29T10:30:00.000000+00:00", "created_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "custom_field_ids": [ "cf_aU54Bvr6Rw8UBHh7zRboL3PYhbOVJl3XvwgPm3jgaKq", "cf_v6S011I6MqcbVvB2FA5Nk8dr5MkL8sWuCiG8cUleO9c" ], "description": "Initial discovery call with prospect.", "id": "convtyp_03oUxZfoO6e2vHmcz1DiHR", "name": "Discovery Call", "organization_id": "orga_AbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "outcome_ids": [ "outcome_030Xl5QwKi7tPRLRtnuef3", "outcome_03oUxZfoO6e2vHmcz1DiHR" ], "position": 0, "summary_guidance": "Summarize the prospect's pain points and next steps.", "updated_at": "2025-07-29T10:30:00.000000+00:00", "updated_by_id": "user_A6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/Playbook" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/report/activity/": { "post": { "operationId": "reporting_get_activity", "tags": [ "reporting" ], "summary": "Get an activity report", "description": "The activity report returns the organization's metrics per time period (**overview** report) or user (**comparison** report).\n\nEvery report accepts the following parameters:\n\n* `datetime_range`: a time range to fetch data for. Either this field or `relative_range` needs to be specified.\n* `relative_range`: a relative time range to fetch data for. The allowed values are: `today`, `this-week`, `this-month`, `this-quarter`, `this-year`, `yesterday`, `last-week`, `last-month`, `last-quarter`, `last-year`, and `all-time`. Either this field or `datetime_range` needs to be specified.\n* `query`: a query to apply to the report to filter out data.\n The value of the field is a dictionary with the key `type` and any type-specific keys. For now only the type `saved_search` is allowed which takes the extra key `saved_search_id` to specify the ID of a saved search. This parameter is *optional*.\n* `users`: a list of user IDs to limit the report results to. This parameter is *optional*.\n* `type`: the type of the report. The available values are `overview` and `comparison`.\n This parameter is *mandatory*.\n* `metrics`: a list of metrics (see [List Activity Metrics](/api/resources/reporting/list-activity-metrics)) to fetch for the report. This parameter is *mandatory*.\n\nThe report can be requested either in a JSON format or in a CSV file. The format can be specified with the `accept` header.", "requestBody": { "content": { "application/json": { "example": { "datetime_range": { "end": "2019-01-08T00:00:00Z", "start": "2019-01-01T00:00:00Z" }, "metrics": [ "calls.outbound.all.count", "emails.sent.all.count" ], "query": { "saved_search_id": "save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239", "type": "saved_search" }, "type": "overview", "users": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "aggregations": { "totals": { "calls.outbound.all.count": 0, "emails.sent.all.count": 0 } }, "data": [ { "calls.outbound.all.count": 0, "datetime": "2019-01-01T00:00:00+00:00", "emails.sent.all.count": 0 }, { "calls.outbound.all.count": 0, "datetime": "2019-01-02T00:00:00+00:00", "emails.sent.all.count": 0 }, { "calls.outbound.all.count": 0, "datetime": "2019-01-03T00:00:00+00:00", "emails.sent.all.count": 0 }, { "calls.outbound.all.count": 0, "datetime": "2019-01-04T00:00:00+00:00", "emails.sent.all.count": 0 }, { "calls.outbound.all.count": 0, "datetime": "2019-01-05T00:00:00+00:00", "emails.sent.all.count": 0 }, { "calls.outbound.all.count": 0, "datetime": "2019-01-06T00:00:00+00:00", "emails.sent.all.count": 0 }, { "calls.outbound.all.count": 0, "datetime": "2019-01-07T00:00:00+00:00", "emails.sent.all.count": 0 } ], "queries": { "leads": { "calls.outbound.all.count": [ "call(direction: \"outbound\" and outgoing_call_date >= \"2019-01-01T00:00:00.000+0000\" and outgoing_call_date < \"2019-01-08T00:00:00.000+0000\" and user in (\"user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA\", \"user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk\")) and in:\"save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239\"" ], "emails.sent.all.count": [ "email(direction: \"outgoing\" and sent >= \"2019-01-01T00:00:00.000+0000\" and sent < \"2019-01-08T00:00:00.000+0000\" and status: \"sent\" and user in (\"user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA\", \"user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk\")) and in:\"save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239\"" ] } } } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/report/activity/metrics/": { "get": { "operationId": "reporting_list_activity_metrics", "tags": [ "reporting" ], "summary": "List the predefined metrics used in activity reports", "description": "List available metrics that can be used in activity reports.", "responses": { "200": { "content": { "application/json": { "example": { "metrics": [ { "description": "The average duration of outbound calls made via the Predictive Dialer.", "key": "calls.outbound.predictive_dialer.avg_duration", "name": "Outbound Calls - Predictive Dialer Average Duration" }, { "description": "The number of lost opportunities created for/assigned to a user.", "key": "opportunities.lost.all.count", "name": "Opportunities - Lost" }, { "description": "The annualized value of won opportunities created for/assigned to a user.", "key": "opportunities.won.all.sum_annualized_value", "name": "Opportunities - Won - Annualized" }, { "description": "The number of all sent emails.", "key": "emails.sent.all.count", "name": "Sent Emails - All Types" }, { "description": "The total duration of regular outbound calls made.", "key": "calls.outbound.regular.sum_duration", "name": "Outbound Calls - Regular Total Duration" }, { "description": "The number of all outbound calls made.", "key": "calls.outbound.all.count", "name": "Outbound Calls - All Types" }, { "description": "The total duration of all outbound calls made.", "key": "calls.outbound.all.sum_duration", "name": "Outbound Calls - Total Duration" }, { "description": "The number of external outbound calls.", "key": "calls.outbound.external.count", "name": "Outbound Calls - External" }, { "description": "The number of regular outbound calls made.", "key": "calls.outbound.regular.count", "name": "Outbound Calls - Regular" }, { "description": "The total duration of inbound calls made.", "key": "calls.inbound.all.sum_duration", "name": "Inbound Calls - Total Duration" }, { "description": "The number of all received SMS messages.", "key": "sms.received.all.count", "name": "Received SMS - All Types" }, { "description": "The average duration of inbound calls made.", "key": "calls.inbound.all.avg_duration", "name": "Inbound Calls - Average Duration" }, { "description": "The number of emails sent by a sequence.", "key": "emails.sent.sequences.count", "name": "Sent Emails - Sequences" }, { "description": "The average duration of outbound calls made via the Power Dialer.", "key": "calls.outbound.power_dialer.avg_duration", "name": "Outbound Calls - Power Dialer Average Duration" }, { "description": "The average duration of all calls made.", "key": "calls.all.all.avg_duration", "name": "All Calls - Average Duration" }, { "description": "The average duration of external outbound calls.", "key": "calls.outbound.external.avg_duration", "name": "Outbound Calls - External Average Duration" }, { "description": "The number of leads created.", "key": "leads.created.all.count", "name": "Created Leads" }, { "description": "The number of won opportunities created for/assigned to a user.", "key": "opportunities.won.all.count", "name": "Opportunities - Won" }, { "description": "The number of outbound calls made via the Power Dialer.", "key": "calls.outbound.power_dialer.count", "name": "Outbound Calls - Power Dialer" }, { "description": "The number of annual won opportunities created for/assigned to a user.", "key": "opportunities.value_won.annual.count", "name": "Opportunities - Won - Annual" }, { "description": "The number of all sent SMS messages.", "key": "sms.sent.all.count", "name": "Sent SMS - All Types" }, { "description": "The number of one-time lost opportunities created for/assigned to a user.", "key": "opportunities.value_lost.one_time.count", "name": "Opportunities - Lost - One Time" }, { "description": "The total value of monthly won opportunities created for/assigned to a user.", "key": "opportunities.value_won.monthly.sum_value", "name": "Opportunities - Value Won - Monthly" }, { "description": "The total value of annual lost opportunities created for/assigned to a user.", "key": "opportunities.value_lost.annual.sum_value", "name": "Opportunities - Value Lost - Annual" }, { "description": "The number of all incoming emails.", "key": "emails.received.all.count", "name": "Received Emails - All Types" }, { "description": "The leads that have been contacted via a call, email or SMS.", "key": "leads.contacted.all.count", "name": "Contacted Leads" }, { "description": "The number of emails sent by a sequence that have a reply.", "key": "emails.sent.sequences_with_reply.count", "name": "Sent Emails - Sequences with Reply" }, { "description": "The number of inbound calls made.", "key": "calls.inbound.all.count", "name": "Inbound Calls - All Types" }, { "description": "The number of outgoing emails of all types that have been opened by the recipient.", "key": "emails.opened.all.count", "name": "Opened Emails - All Types" }, { "description": "The number of opportunities created by a user.", "key": "opportunities.created.all.count", "name": "Opportunities - Created" }, { "description": "The average duration of regular outbound calls made.", "key": "calls.outbound.regular.avg_duration", "name": "Outbound Calls - Regular Average Duration" }, { "description": "The number of emails sent by a sequence that do not have a reply.", "key": "emails.sent.sequences_without_reply.count", "name": "Sent Emails - Sequences without Reply" }, { "description": "The number of outbound calls made via the Predictive Dialer.", "key": "calls.outbound.predictive_dialer.count", "name": "Outbound Calls - Predictive Dialer" }, { "description": "The annualized value of lost opportunities created for/assigned to a user.", "key": "opportunities.lost.all.sum_annualized_value", "name": "Opportunities - Lost - Annualized" }, { "description": "The number of monthly won opportunities created for/assigned to a user.", "key": "opportunities.value_won.monthly.count", "name": "Opportunities - Won - Monthly" }, { "description": "The number of annual lost opportunities created for/assigned to a user.", "key": "opportunities.value_lost.annual.count", "name": "Opportunities - Lost - Annual" }, { "description": "The number of opportunities created for/assigned to a user.", "key": "opportunities.created_for.all.count", "name": "Opportunities - Created For" }, { "description": "The total duration of outbound calls made via the Predictive Dialer.", "key": "calls.outbound.predictive_dialer.sum_duration", "name": "Outbound Calls - Predictive Dialer Total Duration" }, { "description": "The total duration of all calls made.", "key": "calls.all.all.sum_duration", "name": "All Calls - Total Duration" }, { "description": "The number of all calls made.", "key": "calls.all.all.count", "name": "All Calls - All Types" }, { "description": "The number of monthly lost opportunities created for/assigned to a user.", "key": "opportunities.value_lost.monthly.count", "name": "Opportunities - Lost - Monthly" }, { "description": "The total duration of outbound calls made via the Power Dialer.", "key": "calls.outbound.power_dialer.sum_duration", "name": "Outbound Calls - Power Dialer Total Duration" }, { "description": "The total value of one-time lost opportunities created for/assigned to a user.", "key": "opportunities.value_lost.one_time.sum_value", "name": "Opportunities - Value Lost - One Time" }, { "description": "The average duration of all outbound calls made.", "key": "calls.outbound.all.avg_duration", "name": "Outbound Calls - Average Duration" }, { "description": "The total value of monthly lost opportunities created for/assigned to a user.", "key": "opportunities.value_lost.monthly.sum_value", "name": "Opportunities - Value Lost - Monthly" }, { "description": "The total duration of external outbound calls.", "key": "calls.outbound.external.sum_duration", "name": "Outbound Calls - External Total Duration" }, { "description": "The number of one-time won opportunities created for/assigned to a user.", "key": "opportunities.value_won.one_time.count", "name": "Opportunities - Won - One Time" }, { "description": "The total value of annual won opportunities created for/assigned to a user.", "key": "opportunities.value_won.annual.sum_value", "name": "Opportunities - Value Won - Annual" }, { "description": "The total value of one-time won opportunities created for/assigned to a user.", "key": "opportunities.value_won.one_time.sum_value", "name": "Opportunities - Value Won - One Time" }, { "description": "The number of outgoing emails sent by a sequence that have been opened by the recipient.", "key": "emails.opened.sequences.count", "name": "Opened Emails - Sequences" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/report/custom/{org_id}/": { "get": { "operationId": "reporting_get_custom", "tags": [ "reporting" ], "summary": "Get custom report (Explorer)", "description": "This endpoint returns data that allows graphing of arbitrary metrics and is what powers \"Explorer\" in the UI.\n\n - `query` is an optional search query filter. When reporting on leads, any regular lead search query may be used. When reporting on activities or opportunities, only properties of the chosen object type may be used. For example, `direction:incoming` may be used if `x` starts with `email.`. Defaults to `*`, which includes all objects.\n - `y` is made up of the object type and field which is reported on the Y axis. For example the value `lead.count` (used by default) may be used to graph the number of leads, or a numeric field may be used. Examples: `call.duration` (for call length), `opportunity.value` (for value of opportunities).\n - `x` is the field which is reported on the X axis, for example \"lead.custom.MRR\" or \"opportunity.date_created\".\n - `interval`: Graph interval, i.e. the precision of the X axis. For time based graphs (`x` is a date field), one of `auto`, `hour`, `day`, `week`, `month`, `quarter`, `year` (defaults to `auto`, which is chosen based on `start` and `end`). For graphs with a numeric X axis, an integer number can be specified to indicate the histogram interval (`auto` by default).\n - `group_by`: Optional field name by which the report will be grouped. When grouping, a separate series will be returned for each group. By default no grouping is applied.\n - `transform_y`: Transformation function that gets applied to the `y` parameter. One of `sum` (default), `avg`, `min`, or `max`. Does not apply for `.count` `y` values if `x` is of the same object type.\n - `start`: Date or integer of the start of the X axis range. For dates, defaults to the date of creation of your organization.\n - `end`: Date or integer of the end of the X axis range. For dates, defaults to now.\n\n To get a full list of fields that can be used, do a GET to `/report/custom/fields/`. Only the `number` data type can be used for the `y` parameter.", "parameters": [ { "in": "path", "name": "org_id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "query", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "x", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "y", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "group_by", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "transform_y", "required": false, "schema": { "type": "string", "enum": [ "sum", "avg", "min", "max" ] } }, { "in": "query", "name": "interval", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "start", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "end", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/report/funnel/opportunity/stages/": { "post": { "operationId": "reporting_get_funnel_stages", "tags": [ "reporting" ], "summary": "Get a funnel report (stages)", "description": "The opportunity funnel \"stages\" report returns the pipeline funnel's metrics for the selected opportunities, aggregated (JSON format only) and per-user (JSON and CSV formats).\n\nEvery report accepts the following parameters:\n\n* `pipeline`: ID of the pipeline defining the funnel statuses.\n* `type`: the type of the report. The available values are `created-cohort` and `active-stage-cohort`.\n* `report_relative_range`: a relative time range to fetch data for. The allowed values are: `today`, `this-week`, `this-month`, `this-quarter`, `this-year`, `yesterday`, `last-week`, `last-month`, `last-quarter`, `last-year`, and `all-time`.\n* `report_datetime_range`: a time range to fetch data for.\n* `cohort_relative_range`: a relative time range defining the cohort of created opportunities to fetch data for, by date of creation of those opportunities. The allowed values are: `today`, `this-week`, `this-month`, `this-quarter`, `this-year`, `yesterday`, `last-week`, `last-month`, `last-quarter`, `last-year`, and `all-time`. Either this field or `cohort_datetime_range` needs to be specified for `created-cohort` reports. Its value will be ignored for `active-stage-cohort` reports.\n* `cohort_datetime_range`: a time range defining the cohort of created opportunities to fetch data for, by date of creation of those opportunities. Either this field or `cohort_relative_range` needs to be specified for `created-cohort` reports. Its value will be ignored for `active-stage-cohort` reports.\n* `compared_relative_range`: a relative time range to fetch comparison data for. Only allowed in combination with `report_relative_range` (for `active-stage-cohort` reports) or `cohort_relative_range` (for `created-cohort` reports). The allowed values are: `today`, `this-week`, `this-month`, `this-quarter`, `this-year`, `yesterday`, `last-week`, `last-month`, `last-quarter`, `last-year`, and `all-time`.\n* `compared_datetime_range`: a relative time range to fetch comparison data for. Only allowed in combination with `report_datetime_range` (for `active-stage-cohort` reports) or `cohort_datetime_range` (for `created-cohort` reports). The allowed values are: `same-days-last-week`, `same-days-last-month`, `same-days-last-quarter`, `same-days-last-year`.\n* `compared_custom_range`: a time range to fetch comparison data for.\n* `query`: a query to apply to the report to filter out data.\n The value of the field is a dictionary with the key `type` and any type-specific keys. For now only the type `saved_search` is allowed which takes the extra key `saved_search_id` to specify the ID of a saved search. This parameter is *optional*.\n* `users`: a list of user IDs or group IDs to limit the report results to. When it's empty, the report will include all the available users. This parameter is *optional*.\n\nThe report can be requested either in JSON format or in CSV format. The format can be specified with the `accept` header.\n\nIn JSON format, it includes aggregated and per-user data. When requested in CSV format, it includes only per-user data.\n\nWhen `compared_datetime_range`, `compared_relative_range`, or `compared_custom_range` are used, the report returned is the compared one, not the base one.", "requestBody": { "content": { "application/json": { "example": { "pipeline": "pipe_4vukv2FUlFh9FDiVYAop1U", "query": { "saved_search_id": "save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239", "type": "saved_search" }, "report_datetime_range": { "end": "2019-01-08T00:00:00Z", "start": "2019-01-01T00:00:00Z" }, "type": "active-stage-cohort", "users": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "aggregations": { "stages": [ { "average_time_to_advance": 3600, "count": 2, "count_conversion_rate": 0.5, "count_lost": 1, "count_lost_ratio": 0.5, "status": { "id": "stat_69GagUcJ0k0m4sg8YtLXzC3wiaQpvduPOncBmsyRc5Q", "label": "Initial", "type": "active" }, "value": 2000000, "value_conversion_rate": 0.5, "value_lost": 1000000, "value_lost_ratio": 0.5, "weighted_value": 1000000, "weighted_value_conversion_rate": 1 }, { "average_time_to_advance": null, "count": 1, "count_conversion_rate": 0, "count_lost": 0, "count_lost_ratio": 0, "status": { "id": "stat_6mrcy0uLx1wKGfvhBpwy1UXCzyoD5f2lVGKvBfEI45U", "label": "Won", "type": "won" }, "value": 1000000, "value_conversion_rate": 0, "value_lost": 0, "value_lost_ratio": 0, "weighted_value": 1000000, "weighted_value_conversion_rate": 0 } ] }, "data": [ { "stages": [ { "average_time_to_advance": 3600, "count": 1, "count_conversion_rate": 1, "count_lost": 0, "count_lost_ratio": 0, "status": { "id": "stat_69GagUcJ0k0m4sg8YtLXzC3wiaQpvduPOncBmsyRc5Q", "label": "Initial", "type": "active" }, "value": 1000000, "value_conversion_rate": 1, "value_lost": 0, "value_lost_ratio": 0, "weighted_value": 1000000, "weighted_value_conversion_rate": 1 }, { "average_time_to_advance": null, "count": 1, "count_conversion_rate": 0, "count_lost": 0, "count_lost_ratio": 0, "status": { "id": "stat_6mrcy0uLx1wKGfvhBpwy1UXCzyoD5f2lVGKvBfEI45U", "label": "Won", "type": "won" }, "value": 1000000, "value_conversion_rate": 0, "value_lost": 0, "value_lost_ratio": 0, "weighted_value": 1000000, "weighted_value_conversion_rate": 0 } ], "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "stages": [ { "average_time_to_advance": null, "count": 1, "count_conversion_rate": 0, "count_lost": 1, "count_lost_ratio": 1, "status": { "id": "stat_69GagUcJ0k0m4sg8YtLXzC3wiaQpvduPOncBmsyRc5Q", "label": "Initial", "type": "active" }, "value": 1000000, "value_conversion_rate": 0, "value_lost": 1000000, "value_lost_ratio": 1, "weighted_value": 0, "weighted_value_conversion_rate": 0 }, { "average_time_to_advance": null, "count": 0, "count_conversion_rate": null, "count_lost": 0, "count_lost_ratio": null, "status": { "id": "stat_6mrcy0uLx1wKGfvhBpwy1UXCzyoD5f2lVGKvBfEI45U", "label": "Won", "type": "won" }, "value": 0, "value_conversion_rate": null, "value_lost": 0, "value_lost_ratio": null, "weighted_value": 0, "weighted_value_conversion_rate": null } ], "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/report/funnel/opportunity/totals/": { "post": { "operationId": "reporting_get_funnel_totals", "tags": [ "reporting" ], "summary": "Get a funnel report (totals)", "description": "The opportunity funnel \"totals\" report returns the pipeline funnel's metrics for the selected opportunities, aggregated (JSON format only) and per-user (JSON and CSV formats).\n\nEvery report accepts the following parameters:\n\n* `pipeline`: ID of the pipeline defining the funnel statuses.\n* `type`: the type of the report. The available values are `created-cohort` and `active-stage-cohort`.\n* `report_relative_range`: a relative time range to fetch data for. The allowed values are: `today`, `this-week`, `this-month`, `this-quarter`, `this-year`, `yesterday`, `last-week`, `last-month`, `last-quarter`, `last-year`, and `all-time`.\n* `report_datetime_range`: a time range to fetch data for.\n* `cohort_relative_range`: a relative time range defining the cohort of created opportunities to fetch data for, by date of creation of those opportunities. The allowed values are: `today`, `this-week`, `this-month`, `this-quarter`, `this-year`, `yesterday`, `last-week`, `last-month`, `last-quarter`, `last-year`, and `all-time`. Either this field or `cohort_datetime_range` needs to be specified for `created-cohort` reports. Its value will be ignored for `active-stage-cohort` reports.\n* `cohort_datetime_range`: a time range defining the cohort of created opportunities to fetch data for, by date of creation of those opportunities. Either this field or `cohort_relative_range` needs to be specified for `created-cohort` reports. Its value will be ignored for `active-stage-cohort` reports.\n* `compared_relative_range`: a relative time range to fetch comparison data for. Only allowed in combination with `report_relative_range` (for `active-stage-cohort` reports) or `cohort_relative_range` (for `created-cohort` reports). The allowed values are: `today`, `this-week`, `this-month`, `this-quarter`, `this-year`, `yesterday`, `last-week`, `last-month`, `last-quarter`, `last-year`, and `all-time`.\n* `compared_datetime_range`: a relative time range to fetch comparison data for. Only allowed in combination with `report_datetime_range` (for `active-stage-cohort` reports) or `cohort_datetime_range` (for `created-cohort` reports). The allowed values are: `same-days-last-week`, `same-days-last-month`, `same-days-last-quarter`, `same-days-last-year`.\n* `compared_custom_range`: a time range to fetch comparison data for.\n* `query`: a query to apply to the report to filter out data.\n The value of the field is a dictionary with the key `type` and any type-specific keys. For now only the type `saved_search` is allowed which takes the extra key `saved_search_id` to specify the ID of a saved search. This parameter is *optional*.\n* `users`: a list of user IDs or group IDs to limit the report results to. When it's empty, the report will include all the available users. This parameter is *optional*.\n\nThe report can be requested either in JSON format or in CSV format. The format can be specified with the `accept` header.\n\nIn JSON format, it includes aggregated and per-user data. When requested in CSV format, it includes only per-user data.\n\nWhen `compared_datetime_range`, `compared_relative_range`, or `compared_custom_range` are used, the report returned is the compared one, not the base one.", "requestBody": { "content": { "application/json": { "example": { "pipeline": "pipe_4vukv2FUlFh9FDiVYAop1U", "query": { "saved_search_id": "save_ZVc26G33JTNiDNEFdZhBQAONg9cJHleAAHqBJakf239", "type": "saved_search" }, "report_datetime_range": { "end": "2019-01-08T00:00:00Z", "start": "2019-01-01T00:00:00Z" }, "type": "active-stage-cohort", "users": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "aggregations": { "average_time_to_win": 3600, "average_value_annualized_per_won_opportunity": 1000000, "count": 2, "count_total_complete": 2, "count_total_won": 1, "count_win_rate": 0.5, "sales_velocity": 1000000, "value_total_complete": 2000000, "value_total_won": 1000000, "value_win_rate": 0.5 }, "data": [ { "average_time_to_win": 3600, "average_value_annualized_per_won_opportunity": 1000000, "count": 1, "count_total_complete": 1, "count_total_won": 1, "count_win_rate": 1, "sales_velocity": 1000000, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "value_total_complete": 1000000, "value_total_won": 1000000, "value_win_rate": 1 }, { "average_time_to_win": null, "average_value_annualized_per_won_opportunity": 0, "count": 1, "count_total_complete": 1, "count_total_won": 0, "count_win_rate": 0, "sales_velocity": 0, "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "value_total_complete": 1000000, "value_total_won": 0, "value_win_rate": 0 } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/report/sent_emails/{org_id}/": { "get": { "operationId": "reporting_get_sent_emails", "tags": [ "reporting" ], "summary": "Get sent emails report", "parameters": [ { "in": "path", "name": "org_id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "date_start", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "date_end", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "user_id", "required": false, "schema": { "title": "User ID", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "sent_email_stats": [ { "_queries": { "opened": "email(direction:sent opened:yes)", "responded": "email(direction:sent has_reply:yes)", "total": "email(direction:sent)" }, "is_shared": true, "name": "All Emails", "opened": 3474546, "percentage_opened": 21, "percentage_responded": 10, "responded": 348741, "template_id": null, "template_url": null, "total": 735434 }, { "_queries": { "opened": "email(direction:sent template:\"Promo Email\" opened:yes)", "responded": "email(direction:sent template:\"Promo Email\" has_reply:yes)", "total": "email(direction:sent template:\"Promo Email\")" }, "is_shared": true, "name": "Promo Email", "opened": 40, "percentage_opened": 40, "percentage_responded": 9, "responded": 9, "template_id": "tmpl_vB0Ql8Npgkq84jly82lqFn331D2tFfA2QXcRUvzcCOt", "template_url": "/organization/orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH/email_templates/tmpl_vB0Ql8Npgkq84jly82lqFn331D2tFfA2QXcRUvzcCOt/", "total": 101 } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/report/statuses/lead/{org_id}/": { "get": { "operationId": "reporting_get_lead_statuses", "tags": [ "reporting" ], "summary": "Get lead status change report", "description": "Get a lead status change report.\n\nThe date range is optional. A report may be requested\nfor a specific time period or overall. You can specify\neither a `query` or `smart_view_id` (but not both) to\nfilter leads included in the report.\n\nThe following fields are returned (when requesting an\noverall report, some inapplicable fields will not be\nreturned):\n\n* `status_overview`: A list of all statuses with:\n * `status_id`, `status_label`,\n `status_is_deleted`: The ID and label of the\n status, and whether it was deleted.\n * `started`: Number of leads in this status at\n the start of the period.\n * `ended`: Number in this status at the end.\n * `change`: Net change during the period\n (`ended` minus `started`).\n * `change_percent`: Net change in percent.\n * `gained`: Number that were not in this status\n at the beginning but were at the end.\n * `lost`: Number that were in this status at the\n beginning but were not at the end.\n * `entered`: Number that entered this status at\n some point during the period.\n * `left`: Number that left this status at some\n point during the period.\n * `_queries`: A dictionary containing search\n queries for the different states (`started`,\n `ended`, `gained`, `lost`, `entered`, `left`).\n * `_leads_page_urls`: A dictionary containing\n paths to the lead search UI page.\n* `status_transitions`: A list of all status\n transitions (aggregated by start/end status) for\n the given period with:\n * `from_status_id`, `from_status_label`,\n `from_status_is_deleted`: Starting status\n (null for created leads).\n * `to_status_id`, `to_status_label`,\n `to_status_is_deleted`: Ending status.\n * `count`: The number that transitioned.\n * `_query`: The search query for those records.\n * `_leads_page_url`: Path to the search UI page.\n* `status_transitions_summary`: Status transitions\n summarized for the period. E.g. a lead that went\n A\u2192B\u2192C is counted as A\u2192C.", "parameters": [ { "in": "path", "name": "org_id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "date_start", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "date_end", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "query", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "smart_view_id", "required": false, "schema": { "title": "Smart View ID", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "status_overview": [ { "_leads_page_urls": { "ended": "/search/lead_status%28status%3A%22Potential%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "entered": "/search/%28original_lead_status%3A%22Potential%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20lead_status_change%28new_status%3A%22Potential%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/", "gained": "/search/not%20lead_status%28status%3A%22Potential%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20lead_status%28status%3A%22Potential%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "left": "/search/lead_status_change%28old_status%3A%22Potential%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/", "lost": "/search/lead_status%28status%3A%22Potential%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20lead_status%28status%3A%22Potential%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "started": "/search/lead_status%28status%3A%22Potential%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29/" }, "_queries": { "ended": "lead_status(status:\"Potential\" on:\"2014-06-01 06:59:59\")", "entered": "(original_lead_status:\"Potential\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or lead_status_change(new_status:\"Potential\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")", "gained": "not lead_status(status:\"Potential\" on:\"2014-01-01 08:00:00\") and lead_status(status:\"Potential\" on:\"2014-06-01 06:59:59\")", "left": "lead_status_change(old_status:\"Potential\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")", "lost": "lead_status(status:\"Potential\" on:\"2014-01-01 08:00:00\") and not lead_status(status:\"Potential\" on:\"2014-06-01 06:59:59\")", "started": "lead_status(status:\"Potential\" on:\"2014-01-01 08:00:00\")" }, "change": 1268, "change_percent": 3, "ended": 49997, "entered": 1270, "gained": 1269, "left": 2, "lost": 1, "started": 48729, "status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX", "status_is_deleted": false, "status_label": "Potential" }, { "_leads_page_urls": { "ended": "/search/lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "entered": "/search/%28original_lead_status%3A%22Bad%20Fit%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20lead_status_change%28new_status%3A%22Bad%20Fit%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/", "gained": "/search/not%20lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "left": "/search/lead_status_change%28old_status%3A%22Bad%20Fit%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/", "lost": "/search/lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "started": "/search/lead_status%28status%3A%22Bad%20Fit%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29/" }, "_queries": { "ended": "lead_status(status:\"Bad Fit\" on:\"2014-06-01 06:59:59\")", "entered": "(original_lead_status:\"Bad Fit\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or lead_status_change(new_status:\"Bad Fit\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")", "gained": "not lead_status(status:\"Bad Fit\" on:\"2014-01-01 08:00:00\") and lead_status(status:\"Bad Fit\" on:\"2014-06-01 06:59:59\")", "left": "lead_status_change(old_status:\"Bad Fit\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")", "lost": "lead_status(status:\"Bad Fit\" on:\"2014-01-01 08:00:00\") and not lead_status(status:\"Bad Fit\" on:\"2014-06-01 06:59:59\")", "started": "lead_status(status:\"Bad Fit\" on:\"2014-01-01 08:00:00\")" }, "change": 0, "change_percent": 0, "ended": 35, "entered": 0, "gained": 0, "left": 0, "lost": 0, "started": 35, "status_id": "stat_7a4mksScaP453DJeur2wdn8qXg3zcN3IQbbDeFZywNw", "status_is_deleted": false, "status_label": "Bad Fit" }, { "_leads_page_urls": { "ended": "/search/lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "entered": "/search/%28original_lead_status%3A%22Qualified%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20lead_status_change%28new_status%3A%22Qualified%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/", "gained": "/search/not%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "left": "/search/lead_status_change%28old_status%3A%22Qualified%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/", "lost": "/search/lead_status%28status%3A%22Qualified%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "started": "/search/lead_status%28status%3A%22Qualified%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29/" }, "_queries": { "ended": "lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")", "entered": "(original_lead_status:\"Qualified\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or lead_status_change(new_status:\"Qualified\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")", "gained": "not lead_status(status:\"Qualified\" on:\"2014-01-01 08:00:00\") and lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")", "left": "lead_status_change(old_status:\"Qualified\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")", "lost": "lead_status(status:\"Qualified\" on:\"2014-01-01 08:00:00\") and not lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")", "started": "lead_status(status:\"Qualified\" on:\"2014-01-01 08:00:00\")" }, "change": 2, "change_percent": 8, "ended": 28, "entered": 2, "gained": 2, "left": 0, "lost": 0, "started": 26, "status_id": "stat_eQ5KZbBVePlxF7sUdiV7s0mDNBkUxGv7k4i0c7XsoqL", "status_is_deleted": false, "status_label": "Qualified" } ], "status_transitions": [ { "_leads_page_url": "/search/original_lead_status%3A%22Potential%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22/", "_query": "original_lead_status:\"Potential\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\"", "count": 1270, "from_status_id": null, "from_status_is_deleted": null, "from_status_label": null, "to_status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX", "to_status_is_deleted": false, "to_status_label": "Potential" }, { "_leads_page_url": "/search/lead_status_change%28old_status%3A%22Potential%22%20new_status%3A%22Qualified%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29/", "_query": "lead_status_change(old_status:\"Potential\" new_status:\"Qualified\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\")", "count": 2, "from_status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX", "from_status_is_deleted": false, "from_status_label": "Potential", "to_status_id": "stat_eQ5KZbBVePlxF7sUdiV7s0mDNBkUxGv7k4i0c7XsoqL", "to_status_is_deleted": false, "to_status_label": "Qualified" } ], "status_transitions_summary": [ { "_leads_page_url": "/search/created%20%3E%20%222014-01-01%2008%3A00%3A00%22%20and%20lead_status%28status%3A%22Potential%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "_query": "created > \"2014-01-01 08:00:00\" and lead_status(status:\"Potential\" on:\"2014-06-01 06:59:59\")", "count": 1269, "from_status_id": null, "from_status_is_deleted": null, "from_status_label": null, "to_status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX", "to_status_is_deleted": false, "to_status_label": "Potential" }, { "_leads_page_url": "/search/created%20%3E%20%222014-01-01%2008%3A00%3A00%22%20and%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "_query": "created > \"2014-01-01 08:00:00\" and lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")", "count": 1, "from_status_id": null, "from_status_is_deleted": null, "from_status_label": null, "to_status_id": "stat_eQ5KZbBVePlxF7sUdiV7s0mDNBkUxGv7k4i0c7XsoqL", "to_status_is_deleted": false, "to_status_label": "Qualified" }, { "_leads_page_url": "/search/lead_status%28status%3A%22Potential%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20lead_status%28status%3A%22Qualified%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29/", "_query": "lead_status(status:\"Potential\" on:\"2014-01-01 08:00:00\") and lead_status(status:\"Qualified\" on:\"2014-06-01 06:59:59\")", "count": 1, "from_status_id": "stat_a2RZn3jTsAA11zmBPpqQQ4ug8NqgUawkjyMdCu8yybX", "from_status_is_deleted": false, "from_status_label": "Potential", "to_status_id": "stat_eQ5KZbBVePlxF7sUdiV7s0mDNBkUxGv7k4i0c7XsoqL", "to_status_is_deleted": false, "to_status_label": "Qualified" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/report/statuses/opportunity/{org_id}/": { "get": { "operationId": "reporting_get_opportunity_statuses", "tags": [ "reporting" ], "summary": "Get opportunity status change report", "description": "Get an opportunity status change report.\n\nThe date range is optional. A report may be requested\nfor a specific time period or overall. You can specify\neither a `query` or `smart_view_id` (but not both) to\nfilter opportunities included in the report. The\nreport may optionally be filtered by the opportunity\nuser.\n\nThe following fields are returned (when requesting an\noverall report, some inapplicable fields will not be\nreturned):\n\n* `status_overview`: A list of all statuses with:\n * `status_id`, `status_label`,\n `status_is_deleted`: The ID and label of the\n status, and whether it was deleted.\n * `started`: Number of opportunities in this\n status at the start of the period.\n * `ended`: Number in this status at the end.\n * `change`: Net change during the period\n (`ended` minus `started`).\n * `change_percent`: Net change in percent.\n * `gained`: Number that were not in this status\n at the beginning but were at the end.\n * `lost`: Number that were in this status at the\n beginning but were not at the end.\n * `entered`: Number that entered this status at\n some point during the period.\n * `left`: Number that left this status at some\n point during the period.\n * `_queries`: A dictionary containing search\n queries for the different states (`started`,\n `ended`, `gained`, `lost`, `entered`, `left`).\n Search queries are wrapped in a nested\n `opportunity(...)` clause. To pass the query\n to the opportunities API endpoint, use only\n the query within the parentheses.\n * `_leads_page_urls`: A dictionary containing\n paths to the lead search UI page.\n * `_opportunities_page_urls`: A dictionary\n containing paths to the opportunity UI page.\n* `status_transitions`: A list of all status\n transitions (aggregated by start/end status) for\n the given period with:\n * `from_status_id`, `from_status_label`,\n `from_status_is_deleted`: Starting status\n (null for created opportunities).\n * `to_status_id`, `to_status_label`,\n `to_status_is_deleted`: Ending status.\n * `count`: The number that transitioned.\n * `_query`: The search query for those records.\n * `_leads_page_url`: Path to the search UI page.\n * `_opportunities_page_url`: Path to the\n opportunity UI page.\n* `status_transitions_summary`: Status transitions\n summarized for the period. E.g. an opportunity\n that went A\u2192B\u2192C is counted as A\u2192C.", "parameters": [ { "in": "path", "name": "org_id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "date_start", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "date_end", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "query", "required": false, "schema": { "type": "string" } }, { "in": "query", "name": "smart_view_id", "required": false, "schema": { "title": "Smart View ID", "type": "string" } }, { "in": "query", "name": "user_id", "required": false, "schema": { "title": "User ID", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "status_overview": [ { "_leads_page_urls": { "ended": "/search/opportunity%28status%28status%3A%22Active%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "entered": "/search/opportunity%28%28original_status%3A%22Active%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20status_change%28new_status%3A%22Active%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "gained": "/search/opportunity%28not%20status%28status%3A%22Active%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22Active%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "left": "/search/opportunity%28status_change%28old_status%3A%22Active%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "lost": "/search/opportunity%28status%28status%3A%22Active%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20status%28status%3A%22Active%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "started": "/search/opportunity%28status%28status%3A%22Active%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%29/" }, "_opportunities_page_urls": { "ended": "/opportunities/custom_filter_end_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Active%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=ended&custom_filter_end_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH/", "entered": "/opportunities/custom_filter_end_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=%28original_status%3A%22Active%22+and+created+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+created+%3C%3D+%222014-06-01+06%3A59%3A59%22%29+or+status_change%28new_status%3A%22Active%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=entered&custom_filter_end_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH/", "gained": "/opportunities/custom_filter_end_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=not+status%28status%3A%22Active%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22Active%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=gained&custom_filter_end_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH/", "left": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22Active%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=left/", "lost": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Active%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+not+status%28status%3A%22Active%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=lost/", "started": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Active%22+on%3A%222014-01-01+08%3A00%3A00%22%29&custom_filter_type=started/" }, "_queries": { "ended": "opportunity(status(status:\"Active\" on:\"2014-06-01 06:59:59\"))", "entered": "opportunity((original_status:\"Active\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or status_change(new_status:\"Active\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "gained": "opportunity(not status(status:\"Active\" on:\"2014-01-01 08:00:00\") and status(status:\"Active\" on:\"2014-06-01 06:59:59\"))", "left": "opportunity(status_change(old_status:\"Active\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "lost": "opportunity(status(status:\"Active\" on:\"2014-01-01 08:00:00\") and not status(status:\"Active\" on:\"2014-06-01 06:59:59\"))", "started": "opportunity(status(status:\"Active\" on:\"2014-01-01 08:00:00\"))" }, "change": -1, "change_percent": -6, "ended": 16, "entered": 0, "gained": 0, "left": 1, "lost": 1, "started": 17, "status_id": "stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH", "status_is_deleted": false, "status_label": "Active" }, { "_leads_page_urls": { "ended": "/search/opportunity%28status%28status%3A%22Won%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "entered": "/search/opportunity%28%28original_status%3A%22Won%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20status_change%28new_status%3A%22Won%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "gained": "/search/opportunity%28not%20status%28status%3A%22Won%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22Won%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "left": "/search/opportunity%28status_change%28old_status%3A%22Won%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "lost": "/search/opportunity%28status%28status%3A%22Won%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20status%28status%3A%22Won%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "started": "/search/opportunity%28status%28status%3A%22Won%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%29/" }, "_opportunities_page_urls": { "ended": "/opportunities/custom_filter_end_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Won%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=ended&custom_filter_end_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2/", "entered": "/opportunities/custom_filter_end_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=%28original_status%3A%22Won%22+and+created+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+created+%3C%3D+%222014-06-01+06%3A59%3A59%22%29+or+status_change%28new_status%3A%22Won%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=entered&custom_filter_end_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2/", "gained": "/opportunities/custom_filter_end_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=not+status%28status%3A%22Won%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22Won%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=gained&custom_filter_end_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2/", "left": "/opportunities/custom_filter_start_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2&custom_filter_start_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22Won%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=left/", "lost": "/opportunities/custom_filter_start_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2&custom_filter_start_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Won%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+not+status%28status%3A%22Won%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=lost/", "started": "/opportunities/custom_filter_start_status_id=stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2&custom_filter_start_status_label=Won&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Won%22+on%3A%222014-01-01+08%3A00%3A00%22%29&custom_filter_type=started/" }, "_queries": { "ended": "opportunity(status(status:\"Won\" on:\"2014-06-01 06:59:59\"))", "entered": "opportunity((original_status:\"Won\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or status_change(new_status:\"Won\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "gained": "opportunity(not status(status:\"Won\" on:\"2014-01-01 08:00:00\") and status(status:\"Won\" on:\"2014-06-01 06:59:59\"))", "left": "opportunity(status_change(old_status:\"Won\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "lost": "opportunity(status(status:\"Won\" on:\"2014-01-01 08:00:00\") and not status(status:\"Won\" on:\"2014-06-01 06:59:59\"))", "started": "opportunity(status(status:\"Won\" on:\"2014-01-01 08:00:00\"))" }, "change": 0, "change_percent": 0, "ended": 8, "entered": 0, "gained": 0, "left": 0, "lost": 0, "started": 8, "status_id": "stat_wMS9M6HC2O3CSEOzF5g2vEGt6RM5R3RfhIQixdnmjf2", "status_is_deleted": false, "status_label": "Won" }, { "_leads_page_urls": { "ended": "/search/opportunity%28status%28status%3A%22Lost%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "entered": "/search/opportunity%28%28original_status%3A%22Lost%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20status_change%28new_status%3A%22Lost%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "gained": "/search/opportunity%28not%20status%28status%3A%22Lost%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22Lost%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "left": "/search/opportunity%28status_change%28old_status%3A%22Lost%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "lost": "/search/opportunity%28status%28status%3A%22Lost%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20status%28status%3A%22Lost%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "started": "/search/opportunity%28status%28status%3A%22Lost%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%29/" }, "_opportunities_page_urls": { "ended": "/opportunities/custom_filter_end_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Lost%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=ended&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/", "entered": "/opportunities/custom_filter_end_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=%28original_status%3A%22Lost%22+and+created+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+created+%3C%3D+%222014-06-01+06%3A59%3A59%22%29+or+status_change%28new_status%3A%22Lost%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=entered&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/", "gained": "/opportunities/custom_filter_end_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=not+status%28status%3A%22Lost%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22Lost%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=gained&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/", "left": "/opportunities/custom_filter_start_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD&custom_filter_start_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22Lost%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=left/", "lost": "/opportunities/custom_filter_start_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD&custom_filter_start_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Lost%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+not+status%28status%3A%22Lost%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=lost/", "started": "/opportunities/custom_filter_start_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD&custom_filter_start_status_label=Lost&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Lost%22+on%3A%222014-01-01+08%3A00%3A00%22%29&custom_filter_type=started/" }, "_queries": { "ended": "opportunity(status(status:\"Lost\" on:\"2014-06-01 06:59:59\"))", "entered": "opportunity((original_status:\"Lost\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or status_change(new_status:\"Lost\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "gained": "opportunity(not status(status:\"Lost\" on:\"2014-01-01 08:00:00\") and status(status:\"Lost\" on:\"2014-06-01 06:59:59\"))", "left": "opportunity(status_change(old_status:\"Lost\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "lost": "opportunity(status(status:\"Lost\" on:\"2014-01-01 08:00:00\") and not status(status:\"Lost\" on:\"2014-06-01 06:59:59\"))", "started": "opportunity(status(status:\"Lost\" on:\"2014-01-01 08:00:00\"))" }, "change": 1, "change_percent": 25, "ended": 5, "entered": 1, "gained": 1, "left": 0, "lost": 0, "started": 4, "status_id": "stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD", "status_is_deleted": false, "status_label": "Lost" }, { "_leads_page_urls": { "ended": "/search/opportunity%28status%28status%3A%22On%20hold%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "entered": "/search/opportunity%28%28original_status%3A%22On%20hold%22%20and%20created%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20created%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%20or%20status_change%28new_status%3A%22On%20hold%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "gained": "/search/opportunity%28not%20status%28status%3A%22On%20hold%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22On%20hold%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "left": "/search/opportunity%28status_change%28old_status%3A%22On%20hold%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "lost": "/search/opportunity%28status%28status%3A%22On%20hold%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20not%20status%28status%3A%22On%20hold%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "started": "/search/opportunity%28status%28status%3A%22On%20hold%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%29/" }, "_opportunities_page_urls": { "ended": "/opportunities/custom_filter_end_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22On+hold%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=ended&custom_filter_end_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ/", "entered": "/opportunities/custom_filter_end_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=%28original_status%3A%22On+hold%22+and+created+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+created+%3C%3D+%222014-06-01+06%3A59%3A59%22%29+or+status_change%28new_status%3A%22On+hold%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=entered&custom_filter_end_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ/", "gained": "/opportunities/custom_filter_end_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=not+status%28status%3A%22On+hold%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22On+hold%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=gained&custom_filter_end_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ/", "left": "/opportunities/custom_filter_start_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ&custom_filter_start_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22On+hold%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=left/", "lost": "/opportunities/custom_filter_start_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ&custom_filter_start_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22On+hold%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+not+status%28status%3A%22On+hold%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=lost/", "started": "/opportunities/custom_filter_start_status_id=stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ&custom_filter_start_status_label=On+hold&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22On+hold%22+on%3A%222014-01-01+08%3A00%3A00%22%29&custom_filter_type=started/" }, "_queries": { "ended": "opportunity(status(status:\"On hold\" on:\"2014-06-01 06:59:59\"))", "entered": "opportunity((original_status:\"On hold\" and created >= \"2014-01-01 08:00:00\" and created <= \"2014-06-01 06:59:59\") or status_change(new_status:\"On hold\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "gained": "opportunity(not status(status:\"On hold\" on:\"2014-01-01 08:00:00\") and status(status:\"On hold\" on:\"2014-06-01 06:59:59\"))", "left": "opportunity(status_change(old_status:\"On hold\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "lost": "opportunity(status(status:\"On hold\" on:\"2014-01-01 08:00:00\") and not status(status:\"On hold\" on:\"2014-06-01 06:59:59\"))", "started": "opportunity(status(status:\"On hold\" on:\"2014-01-01 08:00:00\"))" }, "change": 0, "change_percent": 0, "ended": 1, "entered": 0, "gained": 0, "left": 0, "lost": 0, "started": 1, "status_id": "stat_rJaLa9RS71Ry5yXUxTXyc7siYvvPzeHSM61rkOSOFKQ", "status_is_deleted": false, "status_label": "On hold" } ], "status_transitions": [ { "_leads_page_url": "/search/opportunity%28status_change%28old_status%3A%22Active%22%20new_status%3A%22Lost%22%20and%20date%20%3E%3D%20%222014-01-01%2008%3A00%3A00%22%20and%20date%20%3C%3D%20%222014-06-01%2006%3A59%3A59%22%29%29/", "_opportunities_page_url": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_end_status_label=Lost&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status_change%28old_status%3A%22Active%22+new_status%3A%22Lost%22+and+date+%3E%3D+%222014-01-01+08%3A00%3A00%22+and+date+%3C%3D+%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=transition&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/", "_query": "opportunity(status_change(old_status:\"Active\" new_status:\"Lost\" and date >= \"2014-01-01 08:00:00\" and date <= \"2014-06-01 06:59:59\"))", "count": 1, "from_status_id": "stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH", "from_status_is_deleted": false, "from_status_label": "Active", "to_status_id": "stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD", "to_status_is_deleted": false, "to_status_label": "Lost" } ], "status_transitions_summary": [ { "_leads_page_url": "/search/opportunity%28status%28status%3A%22Active%22%20on%3A%222014-01-01%2008%3A00%3A00%22%29%20and%20status%28status%3A%22Lost%22%20on%3A%222014-06-01%2006%3A59%3A59%22%29%29/", "_opportunities_page_url": "/opportunities/custom_filter_start_status_id=stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH&custom_filter_end_status_label=Lost&custom_filter_start_status_label=Active&custom_filter_date_start=2014-01-01&custom_filter_date_end=2014-06-01&query=status%28status%3A%22Active%22+on%3A%222014-01-01+08%3A00%3A00%22%29+and+status%28status%3A%22Lost%22+on%3A%222014-06-01+06%3A59%3A59%22%29&custom_filter_type=transition&custom_filter_end_status_id=stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD/", "_query": "opportunity(status(status:\"Active\" on:\"2014-01-01 08:00:00\") and status(status:\"Lost\" on:\"2014-06-01 06:59:59\"))", "count": 1, "from_status_id": "stat_3FD9DnGUCJzccBKTh8LiiKoyVPpMJsOkJdcGoA5AYKH", "from_status_is_deleted": false, "from_status_label": "Active", "to_status_id": "stat_Rq9QVdie9GhRKuEyYnRXfE6JDs6vhlwqh0GW7owibPD", "to_status_is_deleted": false, "to_status_label": "Lost" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/role/": { "get": { "operationId": "roles_list", "tags": [ "roles" ], "summary": "List all the roles defined for your organization", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "editable": false, "id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "name": "Admin", "permissions": [ "bulk_edit", "export", "manage_organization", "view_all_leads" ], "visibility_user_lcf_behavior": null, "visibility_user_lcf_ids": null }, { "editable": true, "id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "name": "Account Manager", "permissions": [ "bulk_edit", "export" ], "visibility_user_lcf_behavior": "require_assignment", "visibility_user_lcf_ids": [ "cf_pHEkAE3enHZ08zBkYnIAAQDQOT3BBn0DhdF6Kr7Q8Ug" ] } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "roles_create", "tags": [ "roles" ], "summary": "Create a new role", "description": "`visibility_user_lcf_ids` (optional)\n\nA list of Lead Custom Field IDs that define which leads user with this role can see. If the role has `view_all_leads` permission, this field should be empty.\n\n`visibility_user_lcf_behavior` (optional)\n\nDefines how lead visibility works for leads that don't have assigned users. If the role has `view_all_leads` permission, this field should be empty.\n\n - `require_assignment` - leads without assigned users are not visible to this role\n - `allow_unassigned` - leads without assigned users are visible to this role", "requestBody": { "content": { "application/json": { "example": { "name": "Account Manager", "permissions": [ "bulk_edit", "export" ], "visibility_user_lcf_behavior": null, "visibility_user_lcf_ids": null } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "editable": true, "id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "name": "Account Manager", "permissions": [ "bulk_edit", "export" ], "visibility_user_lcf_behavior": null, "visibility_user_lcf_ids": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/role/{id}/": { "get": { "operationId": "roles_get", "tags": [ "roles" ], "summary": "Fetch a single role", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "editable": true, "id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "name": "Account Manager", "permissions": [ "bulk_edit", "export", "view_all_leads" ], "visibility_user_lcf_behavior": null, "visibility_user_lcf_ids": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "roles_update", "tags": [ "roles" ], "summary": "Update existing role", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "permissions": [ "bulk_edit", "view_all_leads" ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "editable": true, "id": "role_y6eLquXvRUdmwqi61tsmgCJUU7uGfxaRbDuLoONZL9p", "name": "Account Manager", "permissions": [ "bulk_edit", "view_all_leads" ], "visibility_user_lcf_behavior": null, "visibility_user_lcf_ids": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "roles_delete", "tags": [ "roles" ], "summary": "Delete a role", "description": "Delete a custom role. You must first move all users off this role by reassigning them to another role.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/saved_search/": { "get": { "operationId": "smart_views_list", "tags": [ "smart_views" ], "summary": "List Smart Views", "description": "Accepts:\n\n- A `type` filter that accepts either `lead` or `contact`. Defaults to `lead`.\n- A `type__in` filter that can be used to select multiple comma-separated types: `lead,contact`.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "in": "query", "name": "type", "required": false, "schema": { "default": null, "anyOf": [ { "$ref": "#/components/schemas/SavedSearchType" }, { "type": "null" } ] } }, { "in": "query", "name": "type__in", "required": false, "schema": { "title": "Type (In)", "type": "array", "items": { "$ref": "#/components/schemas/SavedSearchType" } } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "date_created": "2021-05-20T18:37:35.936000+00:00", "date_updated": "2021-05-20T18:37:35.936000+00:00", "description": "", "id": "save_cxgvcccaFJh6uGE3S6x8YYt61TLTd6MG4JiYLD1Eaja", "is_shared": true, "is_user_dependent": false, "name": "All Leads", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": null, "s_query": { "query": { "negate": false, "type": "match_all" }, "results_limit": null, "sort": [] }, "type": "lead", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "date_created": "2021-05-20T18:42:47.015000+00:00", "date_updated": "2021-05-20T18:42:47.015000+00:00", "description": "", "id": "save_fV7sewhM4FOCFs1m677k2OuxV8RuzUKMHxH8OQEEUjU", "is_shared": false, "is_user_dependent": false, "name": "All Contacts", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": null, "s_query": { "query": { "negate": false, "type": "match_all" }, "results_limit": null, "sort": [] }, "type": "contact", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false }, "schema": { "type": "object", "properties": { "data": { "items": { "$ref": "#/components/schemas/SavedSearch" }, "type": "array" }, "has_more": { "type": "boolean" } }, "required": [ "data", "has_more" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "smart_views_create", "tags": [ "smart_views" ], "summary": "Create a Smart View", "description": "Create a Lead or Contact Smart View.\n\nFor Lead Smart Views, the `type` field is optional (since `lead` is the default `type`).\n\nWhen creating a Smart View, you must specify that you want to get objects of the appropriate type via an `object_type` clause as per the [Advanced Filtering](https://developer.close.com/api/resources/advanced-filtering) section. See the examples below.", "requestBody": { "content": { "application/json": { "examples": { "leadSmartView": { "description": "For Lead Smart Views, the type field is optional since lead is the default.", "summary": "Create a Lead Smart View", "value": { "name": "every lead", "s_query": { "query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "Bluth Company" }, "field": { "field_name": "display_name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" } }, "type": "lead" } }, "contactSmartView": { "description": "For Contact Smart Views, you must specify type as contact.", "summary": "Create a Contact Smart View", "value": { "name": "CEOs", "s_query": { "query": { "queries": [ { "object_type": "contact", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "CEO" }, "field": { "field_name": "title", "object_type": "contact", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" } }, "type": "contact" } } } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "examples": { "leadSmartView": { "description": "For Lead Smart Views, the type field is optional since lead is the default.", "summary": "Create a Lead Smart View", "value": { "date_created": "2013-02-01T01:03:56.515000+00:00", "date_updated": "2013-02-01T01:03:56.515000+00:00", "description": "", "id": "save_Cin23B1CYKX83dbNnBB4Q5F5QXl9ucmgrqNf0esq1Ir", "is_shared": false, "is_user_dependent": false, "name": "every lead", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": null, "s_query": { "query": { "queries": [ { "object_type": "lead", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "Bluth Company" }, "field": { "field_name": "display_name", "object_type": "lead", "type": "regular_field" }, "type": "field_condition" } ], "type": "and" } }, "type": "lead", "used_recently": true, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } }, "contactSmartView": { "description": "For Contact Smart Views, you must specify type as contact.", "summary": "Create a Contact Smart View", "value": { "date_created": "2021-05-24T13:20:57.060848", "date_updated": "2021-05-24T13:20:57.060848", "description": "", "id": "save_6fhBU4Dzg5xCx9gOEmDLlPg3vEVIOqjteEqzpDGEkeL", "is_shared": false, "is_user_dependent": false, "name": "CEOs", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": null, "s_query": { "query": { "negate": false, "queries": [ { "negate": false, "object_type": "contact", "type": "object_type" }, { "condition": { "mode": "full_words", "type": "text", "value": "CEO" }, "field": { "field_name": "title", "object_type": "contact", "type": "regular_field" }, "negate": false, "type": "field_condition" } ], "type": "and" }, "results_limit": null }, "type": "contact", "user_id": "user_MvDoAZA889UMrgsZbnXmHkJSomSi7qk2Iwc4JnGHTbo" } } }, "schema": { "$ref": "#/components/schemas/SavedSearch" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/saved_search/{id}/": { "get": { "operationId": "smart_views_get", "tags": [ "smart_views" ], "summary": "Get a single Smart View", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "date_created": "2013-02-01T01:03:56.515000+00:00", "date_updated": "2013-02-01T01:03:56.515000+00:00", "description": "", "id": "save_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb", "is_shared": true, "is_user_dependent": false, "name": "All Leads", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": "*", "s_query": null, "type": "lead", "used_recently": false, "user_id": null }, "schema": { "$ref": "#/components/schemas/SavedSearch" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "smart_views_update", "tags": [ "smart_views" ], "summary": "Update a Smart View", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "every lead" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "date_created": "2013-02-01T01:03:56.515000+00:00", "date_updated": "2013-02-01T01:03:56.515000+00:00", "description": "", "id": "save_wRlAku35U53xEV7PcNY3QodEHlgLPonBKkGFAxo9Ehb", "is_shared": false, "is_user_dependent": false, "name": "every lead", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "query": null, "s_query": { "query": { "negate": false, "type": "match_all" }, "results_limit": null, "sort": [] }, "type": "lead", "used_recently": true, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "schema": { "$ref": "#/components/schemas/SavedSearch" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "smart_views_delete", "tags": [ "smart_views" ], "summary": "Delete a Smart View", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/scheduling_link/": { "get": { "operationId": "scheduling_links_list", "tags": [ "scheduling_links" ], "summary": "List User Scheduling Links", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "description": "Description of Example Scheduling Link", "duration_in_minutes": null, "id": "schlnk_2xfNHpU6cjThMuhioZ3GjX", "name": "Example Scheduling Link", "oauth_client_id": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": null, "type": "USER", "url": "https://example.com/schedule", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "description": "Let's find a time to meet!", "duration_in_minutes": 60, "id": "schlnk_2xfNHpU6cjThMuhioZ3GjX", "name": "Chat with Us", "oauth_client_id": "oa2client_5NvOjgHYKHkbBjv5Rmiyfp", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "THIRD_PARTY", "source_id": "74241bb7-3436-4228-9b76-392ef7a443ee", "source_type": "Multi-Use", "template_tag": null, "type": "USER", "url": "https://your-app.example.com/link/example/", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "description": null, "duration_in_minutes": 30, "id": "schlnk_6R2iZqSRXk1ZPLXXqn83LB", "name": "30 Minute Meeting", "oauth_client_id": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "CALENDLY", "source_id": "fe722374-9993-45f7-8c4c-c2004ec78940", "source_type": "Solo", "template_tag": null, "type": "USER", "url": "https://calendly.com/username/30min", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "scheduling_links_create", "tags": [ "scheduling_links" ], "summary": "Create a User Scheduling Link", "requestBody": { "content": { "application/json": { "example": { "description": "Description of Example Scheduling Link", "name": "Example Scheduling Link", "url": "example.com/schedule" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "description": "Description of Example Scheduling Link", "duration_in_minutes": null, "id": "schlnk_2xfNHpU6cjThMuhioZ3GjX", "name": "Example Scheduling Link", "oauth_client_id": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": null, "type": "USER", "url": "https://example.com/schedule", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/scheduling_link/integration/": { "post": { "operationId": "scheduling_links_create_integration", "tags": [ "scheduling_links" ], "summary": "Create or update a Scheduling Link via OAuth", "description": "Please note that only OAuth apps can perform this operation. Using API key will result in an error. See [Authentication with OAuth](https://developer.close.com/api/overview/oauth-authentication) for more information.\n\nCreate or update a user scheduling link, managed by your application. Uses the integration-provided `source_id` field to identify and merge duplicate resources created by the same OAuth Application. If a scheduling link created by your OAuth application with the specified `source_id` does not exist, a new one will be created. Otherwise, the scheduling link resource will be updated. Requires authentication via OAuth.", "requestBody": { "content": { "application/json": { "example": { "description": "Let's find a time to meet!", "duration_in_minutes": 60, "name": "Chat with Us", "source_id": "74241bb7-3436-4228-9b76-392ef7a443ee", "source_type": "Multi-Use", "url": "https://your-app.example.com/link/example/" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "description": "Let's find a time to meet!", "duration_in_minutes": 60, "id": "schlnk_2xfNHpU6cjThMuhioZ3GjX", "name": "Chat with Us", "oauth_client_id": "oa2client_5NvOjgHYKHkbBjv5Rmiyfp", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "THIRD_PARTY", "source_id": "74241bb7-3436-4228-9b76-392ef7a443ee", "source_type": "Multi-Use", "template_tag": null, "type": "USER", "url": "https://your-app.example.com/link/example/", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/scheduling_link/integration/{source_id}/": { "delete": { "operationId": "scheduling_links_delete_integration", "tags": [ "scheduling_links" ], "summary": "Delete a User Scheduling Link via OAuth integration", "description": "Please note that only OAuth apps can perform this operation. Using API key will result in an error. See [Authentication with OAuth](https://developer.close.com/api/overview/oauth-authentication) for more information.\n\nUses the `source_id` field to identify and delete the specified User Scheduling Link created by your OAuth Application.", "parameters": [ { "in": "path", "name": "source_id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/scheduling_link/{id}/": { "get": { "operationId": "scheduling_links_get", "tags": [ "scheduling_links" ], "summary": "Fetch a User Scheduling Link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "description": "Description of Example Scheduling Link", "duration_in_minutes": null, "id": "schlnk_2xfNHpU6cjThMuhioZ3GjX", "name": "Example Scheduling Link", "oauth_client_id": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": null, "type": "USER", "url": "https://example.com/schedule", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "scheduling_links_update", "tags": [ "scheduling_links" ], "summary": "Update a User Scheduling Link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "description": "Updated Scheduling Link description", "name": "Updated Scheduling Link name", "url": "example.com/updated" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "description": "Updated Scheduling Link description", "duration_in_minutes": null, "id": "schlnk_2xfNHpU6cjThMuhioZ3GjX", "name": "Updated Scheduling Link name", "oauth_client_id": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": null, "type": "USER", "url": "https://example.com/updated", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "scheduling_links_delete", "tags": [ "scheduling_links" ], "summary": "Delete a User Scheduling Link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/send_as/": { "get": { "operationId": "send_as_list", "tags": [ "send_as" ], "summary": "List Send As Associations", "description": "A user only has access to associations they are involved in. This means that when using this endpoint, `allowing_user_id` or `allowed_user_id` must be equal to your user ID. If neither filter is provided, `allowing_user_id` is assumed by default.", "parameters": [ { "in": "query", "name": "allowed_user_id", "required": false, "schema": { "title": "Allowed User ID", "type": "string" } }, { "in": "query", "name": "allowing_user_id", "required": false, "schema": { "title": "Allowing User ID", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "allowed_user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "allowing_user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "id": "sdas_3KlXHOKx4afZ19TfpxMISa", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "send_as_create", "tags": [ "send_as" ], "summary": "Create a Send As Association", "description": "Create a send-as permission. The `allowing_user_id` must be equal to your own user ID.", "requestBody": { "content": { "application/json": { "example": { "allowed_user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "allowing_user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "allowed_user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "allowing_user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "id": "sdas_3KlXHOKx4afZ19TfpxMISa", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "send_as_delete_by_user", "tags": [ "send_as" ], "summary": "Delete a Send As Association by allowed user", "description": "The `allowing_user_id` must be equal to your user ID.\n\nSupply both the `allowing_user_id` and the `allowed_user_id` to delete an association by those users.", "parameters": [ { "in": "query", "name": "allowed_user_id", "required": false, "schema": { "title": "Allowed User ID", "type": "string" } }, { "in": "query", "name": "allowing_user_id", "required": false, "schema": { "title": "Allowing User ID", "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/send_as/bulk/": { "post": { "operationId": "send_as_bulk_create", "tags": [ "send_as" ], "summary": "Edit Send As Associations in bulk", "description": "You can allow and disallow many other users to send as you in a single command by supplying the user IDs you want to allow and disallow.\n\nOnce completed, this endpoint returns all existing associations where your user is the allowing user.", "requestBody": { "content": { "application/json": { "example": { "allowed_user_ids": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" ], "disallowed_user_ids": [ "user_SJMF1fEyZGdtl2RPzCm9zVQ7qhd33VajdGDREhbsxjF" ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "allowed_user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "allowing_user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "id": "sdas_3KlXHOKx4afZ19TfpxMISa", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/send_as/{id}/": { "get": { "operationId": "send_as_get", "tags": [ "send_as" ], "summary": "Retrieve a single Send As Association", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "allowed_user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "allowing_user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "id": "sdas_3KlXHOKx4afZ19TfpxMISa", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "send_as_delete", "tags": [ "send_as" ], "summary": "Delete a Send As Association by ID", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/sequence/": { "get": { "operationId": "sequences_list", "tags": [ "sequences" ], "summary": "List Sequences", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2021-11-17T20:07:11.936158", "date_updated": "2022-02-07T15:26:01.262234", "id": "seq_3CtqAl6ynk4FbJmZIlCYAx", "name": "My Sequence", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "schedule": null, "status": "active", "steps": [ { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2021-11-17T20:07:11.937641", "date_updated": "2021-11-17T20:07:11.937643", "delay": 86400, "email_template_id": "tmpl_RWEWdJWfSb0eZ6F1QUGEqGULmHGNenS4gSuw29DNkEJ", "id": "seqstep_2NGiNEAVZUSXmkv5dNVtPt", "required": true, "step_allowed_delay": null, "step_type": "email", "threading": "old_thread", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2021-11-17T20:07:11.938310", "date_updated": "2021-11-17T20:07:11.938313", "delay": 259200, "email_template_id": null, "id": "seqstep_7GMV3TG7CdrXPfkmJ568OF", "required": true, "step_allowed_delay": null, "step_type": "call", "threading": null, "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "timezone": "US/Eastern", "updated_by_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "sequences_create", "tags": [ "sequences" ], "summary": "Create a Sequence", "requestBody": { "content": { "application/json": { "example": { "name": "My Sequence", "schedule": { "ranges": [ { "end": "16:59", "start": "09:00", "weekday": 1 }, { "end": "16:59", "start": "09:00", "weekday": 2 }, { "end": "16:59", "start": "09:00", "weekday": 3 }, { "end": "16:59", "start": "09:00", "weekday": 4 }, { "end": "16:59", "start": "09:00", "weekday": 5 } ] }, "steps": [ { "delay": 0, "required": true, "step_type": "call" }, { "delay": 86400, "email_template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn", "step_type": "email", "threading": "old_thread" }, { "delay": 259200, "email_template_id": "tmpl_l12k3as9d008324ljeANFTyS239048asdFdsVfnzaln", "threading": "old_thread" } ], "timezone": "America/Los_Angeles" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:21:15.270359", "date_updated": "2022-03-10T14:21:15.270380", "id": "seq_01FX7LXnJDiYZfWM9cZNkK", "name": "My Sequence", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "schedule": { "ranges": [ { "end": "16:59", "start": "09:00", "weekday": 1 }, { "end": "16:59", "start": "09:00", "weekday": 2 }, { "end": "16:59", "start": "09:00", "weekday": 3 }, { "end": "16:59", "start": "09:00", "weekday": 4 }, { "end": "16:59", "start": "09:00", "weekday": 5 } ] }, "status": "active", "steps": [ { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:21:15.276005", "date_updated": "2022-03-10T14:21:15.276009", "delay": 0, "email_template_id": null, "id": "seqstep_27RRKBOqqsaDLfv3DC2j4w", "required": true, "step_allowed_delay": null, "step_type": "call", "threading": null, "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:21:15.278210", "date_updated": "2022-03-10T14:21:15.278213", "delay": 86400, "email_template_id": "tmpl_00jcushDRuoBBS5sSTUAbNt4dPpBUhlJqQafVfzzRJn", "id": "seqstep_6MEzpiQOFmXUspWL50qm9G", "required": true, "step_allowed_delay": null, "step_type": "email", "threading": "old_thread", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:21:15.278909", "date_updated": "2022-03-10T14:21:15.278911", "delay": 259200, "email_template_id": "tmpl_l12k3as9d008324ljeANFTyS239048asdFdsVfnzaln", "id": "seqstep_3EhVVniW2ks6w740LMcivm", "required": true, "step_allowed_delay": null, "step_type": "email", "threading": "old_thread", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "timezone": "America/Los_Angeles", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/sequence/{id}/": { "get": { "operationId": "sequences_get", "tags": [ "sequences" ], "summary": "Fetch a Sequence", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:31:45.512611", "date_updated": "2022-03-10T14:31:45.512615", "id": "seq_51kUuBR322o1B7vb2HvzSz", "name": "My Sequence", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "schedule": null, "status": "active", "steps": [ { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:31:45.515197", "date_updated": "2022-03-10T14:31:45.515200", "delay": 0, "email_template_id": null, "id": "seqstep_6zDtfEugqTPcFinUzqFiAL", "required": true, "step_allowed_delay": null, "step_type": "call", "threading": null, "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:31:45.516521", "date_updated": "2022-03-10T14:31:45.516524", "delay": 86400, "email_template_id": "tmpl_VRIpo4I8JnTGANQsPv77kZvzAhbxbheWYPIRR3hKusu", "id": "seqstep_0yMcp2AXxJh27sWsNpH0f1", "required": true, "step_allowed_delay": null, "step_type": "email", "threading": "old_thread", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:31:45.517156", "date_updated": "2022-03-10T14:31:45.517159", "delay": 259200, "email_template_id": "tmpl_VRIpo4I8JnTGANQsPv77kZvzAhbxbheWYPIRR3hKusu", "id": "seqstep_7XwVZgafycIuCRILLzFR5t", "required": true, "step_allowed_delay": null, "step_type": "email", "threading": "old_thread", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "subscription_counts_by_status": { "active": 10, "error": 0, "finished": 5, "goal": 15, "paused": 2 }, "timezone": "America/Los_Angeles", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "sequences_update", "tags": [ "sequences" ], "summary": "Update a Sequence", "description": "**Note**: If you include `steps` in the payload and exclude some of the existing steps in your sequence, it will remove those steps from the sequence entirely.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "name": "My New Sequence Name", "steps": [ { "id": "seqstep_3fdjsr0thQshwVXo8rWG47" }, { "id": "seqstep_0yMcp2AXxJh27sWsNpH0f1" }, { "id": "seqstep_kjsd324toiweuroo812394" } ] } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:31:45.512611", "date_updated": "2022-03-10T14:31:45.512615", "id": "seq_51kUuBR322o1B7vb2HvzSz", "name": "My New Sequence Name", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "schedule": null, "status": "active", "steps": [ { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:31:45.515197", "date_updated": "2022-03-10T14:31:45.515200", "delay": 0, "email_template_id": null, "id": "seqstep_3fdjsr0thQshwVXo8rWG47", "required": true, "step_allowed_delay": null, "step_type": "call", "threading": null, "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:31:45.516521", "date_updated": "2022-03-10T14:31:45.516524", "delay": 86400, "email_template_id": "tmpl_VRIpo4I8JnTGANQsPv77kZvzAhbxbheWYPIRR3hKusu", "id": "seqstep_0yMcp2AXxJh27sWsNpH0f1", "required": true, "step_allowed_delay": null, "step_type": "email", "threading": "old_thread", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:31:45.517156", "date_updated": "2022-03-10T14:31:45.517159", "delay": 259200, "email_template_id": "tmpl_VRIpo4I8JnTGANQsPv77kZvzAhbxbheWYPIRR3hKusu", "id": "seqstep_kjsd324toiweuroo812394", "required": true, "step_allowed_delay": null, "step_type": "email", "threading": "old_thread", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "subscription_counts_by_status": { "active": 10, "error": 0, "finished": 5, "goal": 15, "paused": 2 }, "timezone": "America/Los_Angeles", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "sequences_delete", "tags": [ "sequences" ], "summary": "Delete a Sequence", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/sequence_subscription/": { "get": { "operationId": "sequences_list_subscriptions", "tags": [ "sequences" ], "summary": "List Sequence Subscriptions", "description": "At least one of `sequence_id`, `contact_id`, and `lead_id` is required.", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "in": "query", "name": "contact_id", "required": false, "schema": { "title": "Contact ID", "type": "string" } }, { "in": "query", "name": "lead_id", "required": false, "schema": { "title": "Lead ID", "type": "string" } }, { "in": "query", "name": "sequence_id", "required": false, "schema": { "title": "Sequence ID", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "calls_assigned_to": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" ], "contact_email": "contact@example.org", "contact_id": "cont_DDLGBBQO7jwLmSXVivqm3H5Vd1uavBBQptN4vapC9T9", "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:40:27.442448", "date_updated": "2022-03-10T14:40:27.442451", "id": "sub_71lcl74wTWvv7Erx6uYWno", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "sender_account_id": "emailacct_0oCdHYhxtl5sV9j3ZwrJI1sUhbOK4FoZjDuTG9I2hej", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_0aZN3EMlTRBdczaBStSN7D", "start_date": null, "status": "active", "status_reason": null, "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "sequences_create_subscription", "tags": [ "sequences" ], "summary": "Subscribe a Contact to a Sequence", "requestBody": { "content": { "application/json": { "example": { "calls_assigned_to": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" ], "contact_email": "contact@example.org", "contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3", "sender_account_id": "emailacct_0oCdHYhxtl5sV9j3ZwrJI1sUhbOK4FoZjDuTG9I2hej", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "calls_assigned_to": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" ], "contact_email": "contact@example.org", "contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3", "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:40:27.442448", "date_updated": "2022-03-10T14:40:27.442451", "id": "sub_71lcl74wTWvv7Erx6uYWno", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "sender_account_id": "emailacct_0oCdHYhxtl5sV9j3ZwrJI1sUhbOK4FoZjDuTG9I2hej", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "start_date": null, "status": "active", "status_reason": null, "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/sequence_subscription/{id}/": { "get": { "operationId": "sequences_get_subscription", "tags": [ "sequences" ], "summary": "Fetch a single Sequence Subscription", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "calls_assigned_to": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" ], "contact_email": "contact@example.org", "contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3", "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:40:27.442448", "date_updated": "2022-03-10T14:40:27.442451", "id": "sub_71lcl74wTWvv7Erx6uYWno", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "sender_account_id": "emailacct_0oCdHYhxtl5sV9j3ZwrJI1sUhbOK4FoZjDuTG9I2hej", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "start_date": null, "status": "active", "status_reason": null, "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "sequences_update_subscription", "tags": [ "sequences" ], "summary": "Update a specific Subscription", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "status": "paused" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "calls_assigned_to": [ "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" ], "contact_email": "contact@example.org", "contact_id": "cont_MEe412YKyJBXuTqbttZBbcofXr3uydwKEhhBJjyu3O3", "created_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-03-10T14:40:27.442448", "date_updated": "2022-03-10T14:40:27.442451", "id": "sub_71lcl74wTWvv7Erx6uYWno", "lead_id": "lead_iuSXNk1x3446ggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "sender_account_id": "emailacct_0oCdHYhxtl5sV9j3ZwrJI1sUhbOK4FoZjDuTG9I2hej", "sender_email": "john@salesteam.com", "sender_name": "John Doe", "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "start_date": null, "status": "paused", "status_reason": "manual", "updated_by_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "sequences_delete_subscription", "tags": [ "sequences" ], "summary": "Delete a Sequence Subscription", "description": "Unsubscribe a contact from a sequence by deleting their subscription.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/shared_scheduling_link/": { "get": { "operationId": "scheduling_links_list_shared", "tags": [ "scheduling_links" ], "summary": "List Shared Scheduling Links", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "description": "Shared Scheduling Link description", "duration_in_minutes": null, "id": "schlnk_167Y0qg1idTVbr6wUoDUlO", "name": "Another Shared Scheduling Link Name", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": "another_shared_scheduling_link_name", "type": "SHARED", "url": null, "user_id": null }, { "description": "Shared Scheduling Link description", "duration_in_minutes": null, "id": "schlnk_5KRTvFoioQKyQjDRFEDvp6", "name": "Shared Scheduling Link name", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": "scheduling_link_name", "type": "SHARED", "url": null, "user_id": null } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "scheduling_links_create_shared", "tags": [ "scheduling_links" ], "summary": "Create a Shared Scheduling Link", "requestBody": { "content": { "application/json": { "example": { "name": "Name", "description": "Description" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "description": "Description", "duration_in_minutes": null, "id": "schlnk_3knjle4iOiymsYjiJHZraq", "name": "Name", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": "name", "type": "SHARED", "url": null, "user_id": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/shared_scheduling_link/{id}/": { "get": { "operationId": "scheduling_links_get_shared", "tags": [ "scheduling_links" ], "summary": "Fetch a Shared Scheduling Link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "description": "Description", "duration_in_minutes": null, "id": "schlnk_3knjle4iOiymsYjiJHZraq", "name": "Name", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": "name", "type": "SHARED", "url": null, "user_id": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "scheduling_links_update_shared", "tags": [ "scheduling_links" ], "summary": "Update a Shared Scheduling Link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "description": "new Shared Scheduling Link name" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "description": "new Shared Scheduling Link name", "duration_in_minutes": null, "id": "schlnk_6dCC3HFuQMD4PRbzCG9GyG", "name": "Shared Scheduling Link name", "organization_id": "orga_oBdWXGyTzf0eRhvDX3mZkCZ9gatoqndE8wkwZW9pQc5", "source": "MANUAL", "source_id": null, "source_type": null, "template_tag": "scheduling_link_name", "type": "SHARED", "url": null, "user_id": null } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "scheduling_links_delete_shared", "tags": [ "scheduling_links" ], "summary": "Delete a Shared Scheduling Link", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/shared_scheduling_link_association/": { "post": { "operationId": "scheduling_links_create_shared_association", "tags": [ "scheduling_links" ], "summary": "Map a Shared Scheduling Link", "description": "Map a Shared Scheduling Link to either a User Scheduling Link or a URL.\n\nSee the examples below for both mapping options.", "requestBody": { "content": { "application/json": { "examples": { "mapToUserSchedulingLink": { "description": "Map a Shared Scheduling Link to a specific user's scheduling link.", "summary": "Map to User Scheduling Link", "value": { "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "shared_scheduling_link_id": "schlnk_5VhB72iVnX3NAn3XJ0o9Ph", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_scheduling_link_id": "schlnk_6m84x0gYn3eSSRJg8sfSQX" } }, "mapToUrl": { "description": "Map a Shared Scheduling Link to an external URL.", "summary": "Map to URL", "value": { "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "shared_scheduling_link_id": "schlnk_5VhB72iVnX3NAn3XJ0o9Ph", "url": "example.com", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "examples": { "mapToUserSchedulingLink": { "description": "Map a Shared Scheduling Link to a specific user's scheduling link.", "summary": "Map to User Scheduling Link", "value": { "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "shared_scheduling_link_id": "schlnk_5VhB72iVnX3NAn3XJ0o9Ph", "url": null, "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "user_scheduling_link_id": "schlnk_6m84x0gYn3eSSRJg8sfSQX" } }, "mapToUrl": { "description": "Map a Shared Scheduling Link to an external URL.", "summary": "Map to URL", "value": { "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "shared_scheduling_link_id": "schlnk_5VhB72iVnX3NAn3XJ0o9Ph", "url": "https://example.com", "user_id": null, "user_scheduling_link_id": "schlnk_6m84x0gYn3eSSRJg8sfSQX" } } } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/shared_scheduling_link_association/unmap/": { "post": { "operationId": "scheduling_links_delete_shared_association", "tags": [ "scheduling_links" ], "summary": "Unmap a Shared Scheduling Link", "requestBody": { "content": { "application/json": { "example": { "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "shared_scheduling_link_id": "schlnk_5VhB72iVnX3NAn3XJ0o9Ph", "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } } }, "required": true }, "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/sms_template/": { "get": { "operationId": "sms_templates_list", "tags": [ "sms_templates" ], "summary": "List SMS templates", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2022-09-26T15:08:03.402869", "date_updated": "2022-09-26T15:08:03.402869", "id": "smstmpl_2JMKiwkNgBHjhxcmlVEvuM", "is_shared": false, "name": "Cold 1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "owned_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "status": "active", "text": "Hey {{ contact.first_name }}, ever considered Close?", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "sms_templates_create", "tags": [ "sms_templates" ], "summary": "Create an SMS template", "requestBody": { "content": { "application/json": { "example": { "is_shared": false, "name": "Cold 1", "text": "Hey {{ contact.first_name }}, ever considered Close?" }, "schema": { "$ref": "#/components/schemas/CreateSMSTemplate" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "created_by": "user_l2RN00c7kDGBRRV7nfUsyWhMfRHu6OP9YCKP9UwQDXY", "date_created": "2022-09-26T15:08:02.179681", "date_updated": "2022-09-26T15:08:02.179681", "id": "smstmpl_0Yu13KOvH2cj1GSFzG9VRH", "is_shared": false, "name": "Cold 1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "owned_by": "user_l2RN00c7kDGBRRV7nfUsyWhMfRHu6OP9YCKP9UwQDXY", "status": "active", "text": "Hey {{ contact.first_name }}, ever considered Close?", "updated_by": "user_l2RN00c7kDGBRRV7nfUsyWhMfRHu6OP9YCKP9UwQDXY" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/sms_template/{id}/": { "get": { "operationId": "sms_templates_get", "tags": [ "sms_templates" ], "summary": "Fetch an SMS template", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "include_attachments", "required": false, "description": "Include file attachments in the response.", "schema": { "title": "Include Attachments", "default": false, "type": "boolean" } }, { "in": "query", "name": "include_embedded", "required": false, "description": "Include embedded templates used by Workflows.", "schema": { "title": "Include Embedded", "default": false, "type": "boolean" } } ], "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_ny9tGmxvGWUf5F7QqrnIovsPe5Mr2uBI4gRc8jJcYva", "date_created": "2022-09-26T15:08:03.153064", "date_updated": "2022-09-26T15:08:03.153064", "id": "smstmpl_3CilrqPkTo3zDSetUASKoP", "is_shared": false, "name": "Cold 1", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "owned_by": "user_ny9tGmxvGWUf5F7QqrnIovsPe5Mr2uBI4gRc8jJcYva", "status": "active", "text": "Hey {{ contact.first_name }}, ever considered Close?", "updated_by": "user_ny9tGmxvGWUf5F7QqrnIovsPe5Mr2uBI4gRc8jJcYva" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "sms_templates_update", "tags": [ "sms_templates" ], "summary": "Update an SMS template", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "is_shared": true }, "schema": { "$ref": "#/components/schemas/UpdateSMSTemplate" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "created_by": "user_edP6Tb2nqUe1iGz9mjkFb30RXPzz1mbPbGWbwVW0EGI", "date_created": "2022-09-26T15:08:02.738160", "date_updated": "2022-09-26T15:08:02.753292", "id": "smstmpl_5qJHPcWbk9XbDwCjP7osdX", "is_shared": true, "name": "changed name", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "owned_by": "user_edP6Tb2nqUe1iGz9mjkFb30RXPzz1mbPbGWbwVW0EGI", "status": "active", "text": "This is a test template.", "updated_by": "user_edP6Tb2nqUe1iGz9mjkFb30RXPzz1mbPbGWbwVW0EGI" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "sms_templates_delete", "tags": [ "sms_templates" ], "summary": "Delete an SMS template", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "No content" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/status/lead/": { "get": { "operationId": "lead_statuses_list", "tags": [ "lead_statuses" ], "summary": "List lead statuses for your organization", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Potential", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" }, { "id": "stat_2ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Bad Fit", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" }, { "id": "stat_3ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Qualified", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" }, { "id": "stat_8ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Not Serious", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "lead_statuses_create", "tags": [ "lead_statuses" ], "summary": "Create a new status that can be applied to leads", "requestBody": { "content": { "application/json": { "example": { "label": "Potential" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "id": "stat_9ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Potential", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/status/lead/{id}/": { "get": { "operationId": "lead_statuses_get", "tags": [ "lead_statuses" ], "summary": "Fetch a single lead status", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "id": "stat_1ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Potential", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "lead_statuses_update", "tags": [ "lead_statuses" ], "summary": "Rename a lead status", "description": "Update a lead status. The `label` and `color` can be changed. To update the status of a particular lead, see PUT `/lead/{lead_id}/`.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "label": "Renamed" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "id": "stat_9ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Renamed", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "lead_statuses_delete", "tags": [ "lead_statuses" ], "summary": "Delete a lead status", "description": "You should make sure no leads are assigned this status, first.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/status/opportunity/": { "get": { "operationId": "opportunity_statuses_list", "tags": [ "opportunity_statuses" ], "summary": "List opportunity statuses for your organization", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Active", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "type": "active" }, { "id": "stat_5ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Won", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "type": "won" }, { "id": "stat_6ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Lost", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "type": "lost" }, { "id": "stat_7ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "On hold", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "type": "active" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "opportunity_statuses_create", "tags": [ "opportunity_statuses" ], "summary": "Create an opportunity status", "description": "Create a new opportunity status. The status must belong to a pipeline (specified by `pipeline_id`) and have a `type` of `active`, `won`, or `lost`.", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "label": "Closed", "pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "type": "won" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "id": "stat_10diZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Closed", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "type": "won" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/status/opportunity/{id}/": { "get": { "operationId": "opportunity_statuses_get", "tags": [ "opportunity_statuses" ], "summary": "Fetch a single opportunity status", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "id": "stat_4ZdiZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Active", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "type": "active" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "opportunity_statuses_update", "tags": [ "opportunity_statuses" ], "summary": "Rename an opportunity status", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "label": "Renamed" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "id": "stat_10diZqcSIkoGVnNOyxiEY58eTGQmFNG3LPlEVQ4V7Nk", "label": "Renamed", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "pipeline_id": "pipe_6gV01if4wo7r2YTVQDWP2j", "type": "active" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "opportunity_statuses_delete", "tags": [ "opportunity_statuses" ], "summary": "Delete an opportunity status", "description": "You should make sure no opportunities are assigned this status, first.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/task/": { "get": { "operationId": "tasks_list", "tags": [ "tasks" ], "summary": "List or filter tasks", "description": "The `view` parameter can be used to conveniently access the different task views. It accepts one of the following values:\n\n* `inbox`: Shows incomplete tasks up to the end of the user's day only (taking the time zone into account).\n* `future`: Shows incomplete tasks starting from the user's tomorrow only (taking the time zone into account).\n* `archive`: Shows complete tasks only.\n\nNote that a `view` value of `inbox` or `future` will override any `date__lt` or `date__gte` parameters included in the same request.\n\nThe `_order_by` field allows ordering by `date` or `date_created` (descending order by prepending a minus, e.g. `_order_by=-date`).", "parameters": [ { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" }, { "in": "query", "name": "assigned_to", "required": false, "schema": { "title": "Assigned To", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "format", "required": false, "schema": { "title": "Format", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "id", "required": false, "schema": { "title": "ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "id__in", "required": false, "schema": { "title": "ID (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "is_complete", "required": false, "schema": { "title": "Is Complete", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "lead_id", "required": false, "schema": { "title": "Lead ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "_order_by", "required": false, "schema": { "title": "Order By", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "in": "query", "name": "_type", "required": false, "schema": { "title": "Type", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "_type__in", "required": false, "schema": { "title": "Type (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "view", "required": false, "schema": { "title": "View", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date", "required": false, "schema": { "title": "Date", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date__lt", "required": false, "schema": { "title": "Date (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date__lte", "required": false, "schema": { "title": "Date (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date__gt", "required": false, "schema": { "title": "Date (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date__gte", "required": false, "schema": { "title": "Date (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date", "required": false, "schema": { "title": "Due Date", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date__lt", "required": false, "schema": { "title": "Due Date (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date__lte", "required": false, "schema": { "title": "Due Date (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date__gt", "required": false, "schema": { "title": "Due Date (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date__gte", "required": false, "schema": { "title": "Due Date (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__lt", "required": false, "schema": { "title": "Date Created (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__lte", "required": false, "schema": { "title": "Date Created (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__gt", "required": false, "schema": { "title": "Date Created (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__gte", "required": false, "schema": { "title": "Date Created (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__lt", "required": false, "schema": { "title": "Date Updated (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__lte", "required": false, "schema": { "title": "Date Updated (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__gt", "required": false, "schema": { "title": "Date Updated (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__gte", "required": false, "schema": { "title": "Date Updated (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "_type": "lead", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": null, "contact_name": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "John Doe", "date": "2015-02-08T00:00:00+00:00", "date_created": "2015-02-08T20:30:54.314000+00:00", "date_updated": "2015-02-26T19:11:36.128000+00:00", "id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI", "is_complete": false, "is_dateless": false, "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc", "lead_name": "Close", "object_id": null, "object_type": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "text": "Connect with Account Manager", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "John Doe", "view": "inbox" }, { "_type": "missed_call", "assigned_to": "user_alksdjfWZ9sg3FHYQcUwV7tbwZRpe3sA215Ftv8OvbU", "assigned_to_name": "Stefan Wojcik", "contact_id": "cont_nWEklsdiC4z8u0b9QcNV92pWZODOyS5eUIYkvID0poZ", "contact_name": "", "created_by": null, "created_by_name": null, "date": "2015-05-27T18:33:52.937000+00:00", "date_created": "2015-05-27T18:33:52.937000+00:00", "date_updated": "2015-05-27T18:35:28.120000+00:00", "id": "noti_034u5OZh3J759uE9kokI5r0xzhKE1tsfwcIwW5kXtWy", "is_complete": false, "lead_id": "lead_098324SXepf2mAk33WOIOvJYlis9dvRKJJe0wt1AwFE", "lead_name": "Lead Name", "local_phone": "+19193332031", "object_id": "acti_7ALcldIJ9faMty47UM8xqAr0AMLeGcCUTmK32FuURJO", "object_type": "call", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phone": "+16503334444", "phone_formatted": "+1 650-333-4444", "phone_number_description": "California", "updated_by": null, "updated_by_name": null, "view": "inbox" }, { "_type": "voicemail", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": null, "contact_name": null, "created_by": null, "created_by_name": null, "date": "2014-01-29T21:18:37.535000+00:00", "date_created": "2015-02-26T19:24:39.847000+00:00", "date_updated": "2015-02-26T19:24:39.849000+00:00", "id": "noti_7WlHZCMgokvfv3H4SfymZLvG29QTifbGK0zMbEbPNgO", "is_complete": false, "lead_id": null, "lead_name": null, "local_phone": "+16319099219", "object_id": "acti_ZnroXFGejb5JjYnluywM9wjKAGPwU3IpidvQZtW7WRp", "object_type": "call", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phone": "+16314238017", "updated_by": null, "updated_by_name": null, "view": "inbox", "voicemail_duration": 21, "voicemail_url": "https://s3.amazonaws.com/plivocloud/aaa-bbb-ccc.mp3" }, { "_type": "incoming_email", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "body_preview": "Hi, does your company provide metrics for 12/2014?", "contact_id": "cont_73beDdTK5JOR7TMd5ervPFCwJ2jbXCPLtBfVY0yeg9X", "contact_name": "", "created_by": null, "created_by_name": null, "date": "2015-01-09T19:50:49+00:00", "date_created": "2015-01-09T19:50:49+00:00", "date_updated": "2015-02-26T19:24:38.643000+00:00", "emails": [ "acti_LfXPSR1K9IMFZwEq0yjtmrhjI9tSBQ4u4lb2lF87dzs" ], "id": "noti_xN0O5Owvrxn6k8BclFme7L46k3eUaPlGMN6Y5o3mkyS", "is_complete": false, "lead_id": "lead_E271nhg2okT6QJ7btzKmZwmZOhWSXeOG21PCJshsP3N", "lead_name": "Test Company", "object_id": "acti_jV7yfal4zwkKNTv66rGrHFd1uFUqhyNHc1m812xzcCF", "object_type": "emailthread", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "subject": "December 2014 Metrics", "updated_by": null, "updated_by_name": null, "view": "inbox" }, { "_type": "email_followup", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "body_preview": "Please respond if you're interested", "contact_id": "cont_73beDdTK5JOR7TMd5ervPFCwJ2jbXCPLtBfVY0yeg9X", "contact_name": "", "created_by": null, "created_by_name": null, "date": "2015-01-09T19:50:49+00:00", "date_created": "2015-01-09T19:50:49+00:00", "date_updated": "2015-02-26T19:24:38.643000+00:00", "email_id": "acti_nwretk1K9IMFZwEq0yjtmrhjI9tSBQ4u4lb2lbmnrqt", "id": "noti_akhsweqrrxn6k8BclFme7L46k3eUaPlGMN6Y5o3mkyS", "is_complete": false, "lead_id": "lead_E271nhg2okT6QJ7btzKmZwmZOhWSXeOG21PCJshsP3N", "lead_name": "Test Company", "object_id": "acti_nmsdgwqetlkKNTv66rGrHFd1uFUqhyNHc1m812xzbsq", "object_type": "emailthread", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "subject": "I have an offer for you", "updated_by": null, "updated_by_name": null, "view": "inbox" }, { "_type": "answered_detached_call", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": null, "contact_name": null, "created_by": null, "created_by_name": null, "date": "2015-01-09T19:49:49+00:00", "date_created": "2015-01-09T19:50:49+00:00", "date_updated": "2015-02-26T19:24:38.643000+00:00", "id": "noti_xc42fe5JD4y2GkcVhXQcbrrQKXjG6XDk5kuzBC1yRk0", "is_complete": false, "lead_id": null, "lead_name": null, "object_id": "acti_gtb5mn2YAO4up2Tv7XMjV5FLMif6JVebYxDOrqvnzas", "object_type": "call", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "phone": "+16504298174", "phone_formatted": "+1 650-429-8174", "phone_number_description": "California", "recording_url": "https://s3.amazonaws.com/plivocloud/aaa-bbb-ccc.mp3", "updated_by": null, "updated_by_name": null, "view": "inbox" }, { "_type": "opportunity_due", "assigned_to": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "assigned_to_name": "Stefan Wojcik", "contact_id": "cont_elkeZ5eRDRgoPfVvqTtnN8L0Rdj8fyNlI043oqPxQ6Z", "contact_name": "John Doe", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "Stefan Wojcik", "date": "2015-05-28T00:00:00+00:00", "date_created": "2015-05-27T22:27:43.617000+00:00", "date_updated": "2015-05-27T22:59:26.435000+00:00", "id": "noti_7VfBZIqaXYO3tgdflHcY14kDu2mu9qeF32OT6PdOSqH", "is_complete": false, "lead_id": "lead_0yXstlx26nU5o3341BwO9oUbqHxwcvny8sYeWQo83gU", "lead_name": "Test Inc.", "object_id": "oppo_FOvMVC4D4OHvHyXjtoBytvS8QIKvqOjknPzzSyNei7e", "object_type": "opportunity", "opportunity_note": "tqm cvr", "opportunity_value": 130000, "opportunity_value_currency": "USD", "opportunity_value_formatted": "$1,300", "opportunity_value_period": "one_time", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Stefan Wojcik", "view": "inbox" }, { "_type": "incoming_sms", "assigned_to": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "assigned_to_name": "Stefan Wojcik", "attachments": [ { "content_type": "image/png", "filename": "media_1.png", "media_id": "media_1GnAWzBfs0SOjTDcUnyyP9", "size": 15148, "thumbnail_url": "https://app.close.com/go/sms/acti_y10nW8kPdfmMPLy2Ufce9KymKPDuTRGKTqjpSxl6jMe/media/media_7Ga8l93XLVvqNsgjPbBuUI/thumbnail/", "url": "https://app.close.com/go/sms/acti_y10nW8kPdfmMPLy2Ufce9KymKPDuTRGKTqjpSxl6jMe/media/media_7Ga8l93XLVvqNsgjPbBuUI/" } ], "contact_id": "cont_TdzWUxuQbVMUiZbaF5ki5OFRdbGFXSD9kyw5CTPksIT", "contact_name": "Steve Ballmer", "created_by": null, "created_by_name": null, "date": "2016-09-21", "date_created": "2016-09-21T19:00:05.835000+00:00", "date_updated": "2016-09-21T19:00:05.835000+00:00", "id": "noti_8cT0GaRs0Ol2d97MvlresffPHEpTAE5qi6EE6y5RrKw", "is_complete": false, "lead_id": "lead_iuSXNk1x4KrPggPVwQS7ynmp8pGRIDieRYiCnuo4yFb", "lead_name": "New Lead", "local_phone": "+16503334444", "object_id": "acti_y10nW8kPdfmMPLy2Ufce9KymKPDuTRGKTqjpSxl6jMe", "object_type": "sms", "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "remote_phone": "+18189347000", "remote_phone_description": "California", "remote_phone_formatted": "+1 818-934-7000", "text": "Developers developers developers developers!!!", "updated_by": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "updated_by_name": "Stefan Wojcik", "view": "inbox" }, { "_type": "outgoing_call", "agent_config_id": null, "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": "cont_nWEklsdiC4z8u0b9QcNV92pWZODOyS5eUIYkvID0poZ", "contact_name": "Bruce Wayne", "created_by": null, "created_by_name": null, "date": "2025-11-05T00:00:00+00:00", "date_created": "2025-11-04T18:33:52.937000+00:00", "date_updated": "2025-11-04T18:33:52.937000+00:00", "deduplication_key": null, "id": "noti_9cU1HbSt1Pm3e08NwmsftggQIFqUBF6rj7FF7z6SsLx", "is_complete": false, "is_primary_lead_notification": true, "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc", "lead_name": "Wayne Enterprises", "object_id": null, "object_type": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "resolution": null, "sequence_id": "seq_1BTljGuCooX0nbFoPihl07", "sequence_subscription_id": "sub_wRlAku35U53xEV7PcNY3Qo", "step_id": "step_5aH9sBVYNjNa0FrGGVdQzq", "text": "Qualify this lead", "updated_by": null, "updated_by_name": null, "view": "future" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "tasks_create", "tags": [ "tasks" ], "summary": "Create a task", "description": "Provide the type of task to be created in the `_type` field. Currently only tasks of type `lead` and `outgoing_call` can be created.", "parameters": [ { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "examples": { "lead_task": { "summary": "Create a lead task", "value": { "_type": "lead", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date": "2013-02-06", "is_complete": false, "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc", "text": "Connect with Account Manager" } }, "call_task": { "summary": "Create an outgoing-call task", "value": { "_type": "outgoing_call", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "contact_id": "cont_q4xdpIoJZCgMKY3sFBbGnRGhdgNbGN3yXfCmJSnkGai", "date": "2013-02-06", "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc" } } }, "schema": { "$ref": "#/components/schemas/CreateTask" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "examples": { "lead_task": { "summary": "Create a lead task", "value": { "_type": "lead", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": null, "contact_name": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "John Doe", "date": "2013-02-06", "date_created": "2015-02-08T20:30:54.314000+00:00", "date_updated": "2015-02-26T19:11:36.128000+00:00", "id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI", "is_complete": false, "is_dateless": false, "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc", "lead_name": "Close", "object_id": null, "object_type": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "text": "Connect with Account Manager", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "John Doe" } }, "call_task": { "summary": "Create an outgoing-call task", "value": { "_type": "outgoing_call", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": "cont_q4xdpIoJZCgMKY3sFBbGnRGhdgNbGN3yXfCmJSnkGai", "contact_name": "Jane Smith", "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "John Doe", "date": "2013-02-06", "date_created": "2015-02-08T20:31:12.000000+00:00", "date_updated": "2015-02-08T20:31:12.000000+00:00", "id": "task_bXUZYDn0mNc3MxwiUQigGpGcDtVobpRi2odR8XMokZJ", "is_complete": false, "is_dateless": false, "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc", "lead_name": "Close", "object_id": null, "object_type": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "text": null, "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "John Doe" } } } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "tasks_bulk_update", "tags": [ "tasks" ], "summary": "Bulk-update tasks", "description": "Any of the filters of the GET endpoint may be used as query parameters or passed in the request body (see [Filter Parameters](https://developer.close.com/api/overview/filter-parameters)). For example:\n\n```json\n{\"_params\": {\"id__in\": \"task_A,task_B,task_C\"}, \"is_complete\": true}\n```\n\nOnly the `assigned_to`, `date` and `is_complete` fields may be updated.", "parameters": [ { "in": "query", "name": "assigned_to", "required": false, "schema": { "title": "Assigned To", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "format", "required": false, "schema": { "title": "Format", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "id", "required": false, "schema": { "title": "ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "id__in", "required": false, "schema": { "title": "ID (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "is_complete", "required": false, "schema": { "title": "Is Complete", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "lead_id", "required": false, "schema": { "title": "Lead ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "_order_by", "required": false, "schema": { "title": "Order By", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "$ref": "#/components/parameters/ActivityFilters_OrganizationIdParam" }, { "in": "query", "name": "_type", "required": false, "schema": { "title": "Type", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "_type__in", "required": false, "schema": { "title": "Type (In)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "view", "required": false, "schema": { "title": "View", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date", "required": false, "schema": { "title": "Date", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date__lt", "required": false, "schema": { "title": "Date (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date__lte", "required": false, "schema": { "title": "Date (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date__gt", "required": false, "schema": { "title": "Date (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date__gte", "required": false, "schema": { "title": "Date (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date", "required": false, "schema": { "title": "Due Date", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date__lt", "required": false, "schema": { "title": "Due Date (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date__lte", "required": false, "schema": { "title": "Due Date (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date__gt", "required": false, "schema": { "title": "Due Date (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "due_date__gte", "required": false, "schema": { "title": "Due Date (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__lt", "required": false, "schema": { "title": "Date Created (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__lte", "required": false, "schema": { "title": "Date Created (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__gt", "required": false, "schema": { "title": "Date Created (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_created__gte", "required": false, "schema": { "title": "Date Created (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__lt", "required": false, "schema": { "title": "Date Updated (<)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__lte", "required": false, "schema": { "title": "Date Updated (<=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__gt", "required": false, "schema": { "title": "Date Updated (>)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "in": "query", "name": "date_updated__gte", "required": false, "schema": { "title": "Date Updated (>=)", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "is_complete": true }, "schema": { "$ref": "#/components/schemas/BulkUpdateNotifications" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "ok": true } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/task/{id}/": { "get": { "operationId": "tasks_get", "tags": [ "tasks" ], "summary": "Fetch a task's details", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "_type": "lead", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": null, "contact_name": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "John Doe", "date": "2015-02-08T00:00:00+00:00", "date_created": "2015-02-08T20:30:54.314000+00:00", "date_updated": "2015-02-26T19:11:36.128000+00:00", "id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI", "is_complete": false, "is_dateless": false, "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc", "lead_name": "Close", "object_id": null, "object_type": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "text": "Connect with Account Manager", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "John Doe" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "tasks_update", "tags": [ "tasks" ], "summary": "Update a task", "description": "The `assigned_to`, `date` (either a date or a date-time), and `is_complete` fields may be updated on all tasks. If the task type is `lead`, the `text` field may also be modified.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "$ref": "#/components/parameters/FieldsParam" } ], "requestBody": { "content": { "application/json": { "example": { "is_complete": false }, "schema": { "$ref": "#/components/schemas/UpdateNotification" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "_type": "lead", "assigned_to": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "assigned_to_name": "John Doe", "contact_id": null, "contact_name": null, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "created_by_name": "John Doe", "date": "2013-02-06", "date_created": "2015-02-08T20:30:54.314000+00:00", "date_updated": "2015-02-26T19:11:36.128000+00:00", "id": "task_aRUZXCm9lMb2LwipTPhfFoFbCsUnaoQh1ncQ7WLnjlI", "is_complete": true, "is_dateless": false, "lead_id": "lead_5LmpOyrMQdJSUlbNGBSGfK5XzcioIm7aC94PSQamQJc", "lead_name": "Close", "object_id": null, "object_type": null, "organization_id": "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH", "text": "Connect with Account Manager", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "updated_by_name": "John Doe" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "tasks_delete", "tags": [ "tasks" ], "summary": "Delete a task", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/unsubscribe/email/": { "get": { "operationId": "unsubscribed_emails_list", "tags": [ "unsubscribed_emails" ], "summary": "List all unsubscribed emails", "description": "Get a list of unsubscribed email addresses.", "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "email": "jane@example.com" }, { "email": "bob@example.com" } ], "has_more": false } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "unsubscribed_emails_create", "tags": [ "unsubscribed_emails" ], "summary": "Unsubscribe an email address", "description": "This is useful for when you have an email address that has unsubscribed in another context (like a mailing list) and you want to unsubscribe them from messages from Close as well.", "requestBody": { "content": { "application/json": { "example": { "email": "steve@example.com" }, "schema": { "$ref": "#/components/schemas/CreateUnsubscribedEmail" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "example": { "email": "steve@example.com" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/unsubscribe/email/{email_address}/": { "delete": { "operationId": "unsubscribed_emails_delete", "tags": [ "unsubscribed_emails" ], "summary": "Resubscribe an email address", "parameters": [ { "in": "path", "name": "email_address", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "email": "steve@example.com" } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/user/": { "get": { "operationId": "users_list", "tags": [ "users" ], "summary": "List users in your organization", "description": "List all users who are members of your organization.", "parameters": [ { "in": "query", "name": "_order_by", "required": false, "schema": { "type": "string", "enum": [ "last_name,first_name", "first_name,last_name" ] } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "date_created": "2012-08-29T00:33:22.720000+00:00", "date_updated": "2013-05-08T01:57:15.204000+00:00", "email": "stefan@close.com", "first_name": "Stefan", "id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "image": "https://secure.gravatar.com/avatar/a4bec4594864f1896c4750328b1d7470", "last_name": "Wojcik", "organizations": [ "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" ] }, { "date_created": "2012-08-10T00:00:11.000000+00:00", "date_updated": "2013-05-08T02:00:13.000000+00:00", "email": "kevin@close.com", "first_name": "Kevin", "id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk", "image": "https://secure.gravatar.com/avatar/37b6e80dc105b9a8d0d16ef51b5d68c7", "last_name": "Ramani", "organizations": [ "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" ] } ], "has_more": true } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/user/availability/": { "get": { "operationId": "users_list_availabilities", "tags": [ "users" ], "summary": "List user availability statuses", "description": "List user availability statuses for all users in an organization.\n\nThe `active_calls` field is an array of call metadata for calls that the user is currently participating in.", "parameters": [ { "in": "query", "name": "organization_id", "required": false, "schema": { "title": "Organization ID", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "availability": [ { "active_calls": [], "status": "offline", "type": "mobile" }, { "active_calls": [ { "id": "acti_ZZfoNAATNVsvUG2eoozjUiG08KGO46uDa3aTSTChkDI", "lead": { "display_name": "Wayne Enterprises", "id": "lead_8gzAE1a3yWyFUIlNzIGZbwWP7QaqlVixCq31uwqtwHu" }, "method": "regular" } ], "status": "online", "type": "native" }, { "active_calls": [], "status": "offline", "type": "web" } ], "user_id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, { "availability": [ { "active_calls": [], "status": "offline", "type": "mobile" }, { "active_calls": [], "status": "offline", "type": "native" }, { "active_calls": [], "status": "offline", "type": "web" } ], "user_id": "user_Ova4RGFG7pztSeJiiMFdN7O2MFl71nD0uGO3bIOo4Wk" }, { "availability": [ { "active_calls": [], "status": "online", "type": "mobile" }, { "active_calls": [], "status": "offline", "type": "native" }, { "active_calls": [], "status": "offline", "type": "web" } ], "user_id": "user_SJMF1fEyZGdtl2RPzCm9zVQ7qhd33VajdGDREhbsxjF" }, { "availability": [ { "active_calls": [], "status": "offline", "type": "mobile" }, { "active_calls": [], "status": "offline", "type": "native" }, { "active_calls": [], "status": "online", "type": "web" } ], "user_id": "user_OWiN4rEbBR04K2AKXe3jq5j1JWQqmTguuuZa1dG7qQr" } ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/user/{id}/": { "get": { "operationId": "users_get", "tags": [ "users" ], "summary": "Fetch a single user", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } }, { "in": "query", "name": "_order_by", "required": false, "schema": { "type": "string", "enum": [ "last_name,first_name", "first_name,last_name" ] } }, { "$ref": "#/components/parameters/LimitParam" }, { "$ref": "#/components/parameters/SkipParam" } ], "responses": { "200": { "content": { "application/json": { "example": { "date_created": "2012-08-29T00:33:22.720000+00:00", "date_updated": "2013-05-08T01:57:15.204000+00:00", "email": "stefan@close.com", "first_name": "Stefan", "id": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "image": "https://secure.gravatar.com/avatar/a4bec4594864f1896c4750328b1d7470", "last_name": "Wojcik", "organizations": [ "orga_RbREgmiiwcr1w2b4cOnCMQaQPSIFxMqAD2Dh243uxcH" ] } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/webhook/": { "get": { "operationId": "webhooks_list", "tags": [ "webhooks" ], "summary": "List Webhook subscriptions", "description": "List all webhook subscriptions for the organization.", "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "post": { "operationId": "webhooks_create", "tags": [ "webhooks" ], "summary": "Create new Webhook subscription", "description": "The subscription will send events to the specified URL.", "requestBody": { "content": { "application/json": { "examples": { "basic": { "summary": "Basic webhook subscription", "value": { "events": [ { "action": "created", "object_type": "lead" }, { "action": "updated", "object_type": "lead" }, { "action": "created", "object_type": "activity.call" }, { "action": "created", "object_type": "activity.note" }, { "action": "updated", "object_type": "activity.note" }, { "action": "created", "object_type": "activity.form_submission" } ], "url": "https://test.example.com" } }, "withFilter": { "summary": "Webhook subscription with event filter", "value": { "events": [ { "action": "created", "extra_filter": { "field": "user_id", "filter": { "type": "equals", "value": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "type": "field_accessor" }, "object_type": "lead" } ], "url": "https://test.example.com" } } }, "schema": { "$ref": "#/components/schemas/CreateWebhook" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "examples": { "basic": { "summary": "Basic webhook subscription", "value": { "counters": {}, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2018-12-06T19:15:09.590432", "date_updated": "2018-12-06T19:15:09.590439", "events": [ { "action": "created", "object_type": "lead" }, { "action": "updated", "object_type": "lead" }, { "action": "created", "object_type": "activity.call" }, { "action": "created", "object_type": "activity.note" }, { "action": "updated", "object_type": "activity.note" } ], "health_status": "healthy", "id": "whsub_6un6NQjYTaFdgtIZsTDXP6", "latest_error": null, "pause_reason": null, "recent_consecutive_fail_buckets_cnt": 0, "signature_key": "058bfb6a3d8cfdc4da7c3be5901b16ae11da982b46a25fb2cd7016e97a140a1c", "status": "active", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "https://test.example.com", "verify_ssl": true } }, "withFilter": { "summary": "Webhook subscription with event filter", "value": { "counters": {}, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2018-12-06T19:15:09.590432", "date_updated": "2018-12-06T19:15:09.590439", "events": [ { "action": "created", "extra_filter": { "field": "user_id", "filter": { "type": "equals", "value": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA" }, "type": "field_accessor" }, "object_type": "lead" } ], "health_status": "healthy", "id": "whsub_6un6NQjYTaFdgtIZsTDXP6", "latest_error": null, "pause_reason": null, "recent_consecutive_fail_buckets_cnt": 0, "signature_key": "058bfb6a3d8cfdc4da7c3be5901b16ae11da982b46a25fb2cd7016e97a140a1c", "status": "active", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "https://test.example.com", "verify_ssl": true } } } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } }, "/webhook/{id}/": { "get": { "operationId": "webhooks_get", "tags": [ "webhooks" ], "summary": "Retrieve a single Webhook subscription", "description": "The response contains the subscription details.", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "counters": {}, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2018-12-06T19:15:09.590432", "date_updated": "2018-12-06T19:15:09.590439", "events": [ { "action": "created", "object_type": "lead" }, { "action": "updated", "object_type": "lead" }, { "action": "created", "object_type": "activity.call" }, { "action": "created", "object_type": "activity.note" }, { "action": "updated", "object_type": "activity.note" } ], "health_status": "healthy", "id": "whsub_6un6NQjYTaFdgtIZsTDXP6", "latest_error": null, "pause_reason": null, "recent_consecutive_fail_buckets_cnt": 0, "signature_key": "058bfb6a3d8cfdc4da7c3be5901b16ae11da982b46a25fb2cd7016e97a140a1c", "status": "active", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "https://test.example.com", "verify_ssl": true } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "put": { "operationId": "webhooks_update", "tags": [ "webhooks" ], "summary": "Update existing Webhook subscription", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "status": "paused" }, "schema": { "$ref": "#/components/schemas/UpdateWebhook" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "example": { "counters": {}, "created_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "date_created": "2018-12-06T19:15:09.590432", "date_updated": "2018-12-06T19:21:12.226090", "events": [ { "action": "created", "object_type": "lead" }, { "action": "updated", "object_type": "lead" }, { "action": "created", "object_type": "activity.call" }, { "action": "created", "object_type": "activity.note" }, { "action": "updated", "object_type": "activity.note" } ], "health_status": "healthy", "id": "whsub_6un6NQjYTaFdgtIZsTDXP6", "latest_error": null, "pause_reason": "api", "recent_consecutive_fail_buckets_cnt": 0, "signature_key": "058bfb6a3d8cfdc4da7c3be5901b16ae11da982b46a25fb2cd7016e97a140a1c", "status": "paused", "updated_by": "user_N6KhMpzHRCYQHdn4gRNIFNN5JExnsrprKA6ekxM63XA", "url": "https://test.example.com", "verify_ssl": true } } }, "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } }, "delete": { "operationId": "webhooks_delete", "tags": [ "webhooks" ], "summary": "Delete Webhook subscription", "parameters": [ { "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successful response" }, "400": { "description": "Bad request" }, "401": { "description": "Unauthorized" }, "404": { "description": "Not found" } } } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "description": "Use your API key as the username and leave the password empty.", "scheme": "basic", "type": "http" }, "OAuth2": { "flows": { "authorizationCode": { "authorizationUrl": "https://app.close.com/oauth2/authorize/", "scopes": { "all.full_access": "Full access to all resources", "offline_access": "Request a refresh token" }, "tokenUrl": "https://api.close.com/oauth2/token/" } }, "type": "oauth2" } }, "parameters": { "FieldsParam": { "description": "Comma-separated list of fields to include in the response.", "in": "query", "name": "_fields", "required": false, "schema": { "type": "string" } }, "LimitParam": { "description": "Number of results to return.", "in": "query", "name": "_limit", "required": false, "schema": { "default": 100, "type": "integer" } }, "SkipParam": { "description": "Number of results to skip before returning, for pagination.", "in": "query", "name": "_skip", "required": false, "schema": { "default": 0, "type": "integer" } }, "ActivityFilters_IdInParam": { "description": "Filter by activity IDs (comma-separated)", "in": "query", "name": "id__in", "required": false, "schema": { "title": "ID In", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } }, "ActivityFilters_LeadIdParam": { "description": "Filter by lead IDs (comma-separated)", "in": "query", "name": "lead_id", "required": false, "schema": { "title": "Lead ID", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } }, "ActivityFilters_ContactIdParam": { "description": "Filter by contact IDs (comma-separated)", "in": "query", "name": "contact_id", "required": false, "schema": { "title": "Contact ID", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } }, "ActivityFilters_UserIdParam": { "description": "Filter by user IDs (comma-separated)", "in": "query", "name": "user_id", "required": false, "schema": { "title": "User ID", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } }, "ActivityFilters_OrganizationIdParam": { "in": "query", "name": "organization_id", "required": false, "schema": { "title": "Organization ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "ActivityFilters_TypeParam": { "description": "Filter by activity type, e.g. Call (comma-separated)", "in": "query", "name": "_type", "required": false, "schema": { "title": "Type", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] } }, "ActivityFilters_DateCreatedGteParam": { "in": "query", "name": "date_created__gte", "required": false, "schema": { "title": "Date Created (>=)", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] } }, "ActivityFilters_DateCreatedLteParam": { "in": "query", "name": "date_created__lte", "required": false, "schema": { "title": "Date Created (<=)", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] } }, "ActivityFilters_DateCreatedGtParam": { "in": "query", "name": "date_created__gt", "required": false, "schema": { "title": "Date Created (>)", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] } }, "ActivityFilters_DateCreatedLtParam": { "in": "query", "name": "date_created__lt", "required": false, "schema": { "title": "Date Created (<)", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] } }, "ActivityFilters_ActivityAtGteParam": { "in": "query", "name": "activity_at__gte", "required": false, "schema": { "title": "Activity At (>=)", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] } }, "ActivityFilters_ActivityAtLteParam": { "in": "query", "name": "activity_at__lte", "required": false, "schema": { "title": "Activity At (<=)", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] } }, "ActivityFilters_ActivityAtGtParam": { "in": "query", "name": "activity_at__gt", "required": false, "schema": { "title": "Activity At (>)", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] } }, "ActivityFilters_ActivityAtLtParam": { "in": "query", "name": "activity_at__lt", "required": false, "schema": { "title": "Activity At (<)", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] } } }, "schemas": { "ActionItem": { "title": "ActionItem", "deprecated": true, "type": "object", "properties": { "action": { "description": "The recommended next step to progress or resolve the stalled opportunity", "$ref": "#/components/schemas/StalledOpportunityActionTypeV1" }, "justification": { "title": "Justification", "description": "A short justification for the recommended action in the sales pipeline. Maximum 2 sentences.", "type": "string" } }, "required": [ "action", "justification" ] }, "ActivityBase": { "title": "ActivityBase", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "attachments": { "title": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, "comment_summary": { "title": "Comment Summary", "anyOf": [ { "$ref": "#/components/schemas/CommentSummary" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "note": { "title": "Note", "type": "string" }, "note_html": { "title": "Note Html", "type": "string" }, "note_mentions": { "title": "Note Mentions", "type": "array", "items": { "type": "string" } }, "organization_id": { "title": "Organization ID", "type": "string" }, "pinned": { "title": "Pinned", "type": "boolean" }, "pinned_at": { "title": "Pinned At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "source": { "anyOf": [ { "$ref": "#/components/schemas/CreationSource" }, { "type": "null" } ] }, "title": { "title": "Title", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "attachments", "contact_id", "created_by", "date_created", "date_updated", "id", "lead_id", "note", "note_html", "note_mentions", "organization_id", "pinned", "pinned_at", "source", "title", "updated_by", "user_id", "users" ] }, "Attachment": { "title": "Attachment", "type": "object", "properties": { "content_type": { "title": "Content Type", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "filename": { "title": "Filename", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "size": { "title": "Size", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "thumbnail_url": { "title": "Thumbnail URL", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "url": { "title": "URL", "type": "string" } }, "required": [ "content_type", "filename", "size", "url" ] }, "AttachmentIn": { "title": "AttachmentIn", "type": "object", "properties": { "content_type": { "title": "Content Type", "type": "string", "default": "" }, "filename": { "title": "Filename", "type": "string" }, "url": { "title": "Url", "type": "string" } }, "required": [ "filename", "url" ] }, "AutoRecordCalls": { "title": "AutoRecordCalls", "type": "string", "enum": [ "enabled", "disabled", "unset" ] }, "BasicSubscriptionInfoForContact": { "title": "BasicSubscriptionInfoForContact", "type": "object", "properties": { "contact_email": { "title": "Contact Email", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "initial_email_id": { "title": "Initial Email ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_id": { "title": "Sequence ID", "type": "string" }, "sequence_name": { "title": "Sequence Name", "type": "string" }, "sequence_status": { "$ref": "#/components/schemas/WorkflowStatus" }, "start_date": { "title": "Start Date", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "subscription_id": { "title": "Subscription ID", "type": "string" }, "subscription_status": { "$ref": "#/components/schemas/WorkflowRunStatus" }, "subscription_status_reason": { "anyOf": [ { "$ref": "#/components/schemas/StatusReason" }, { "type": "null" } ] } }, "required": [ "contact_email", "date_created", "initial_email_id", "sequence_id", "sequence_name", "sequence_status", "start_date", "subscription_id", "subscription_status", "subscription_status_reason" ] }, "BlockedPhoneNumber": { "title": "BlockedPhoneNumber", "type": "object", "properties": { "created_by": { "title": "Created By", "description": "User who created this Blocked Number initially.", "type": "string" }, "date_created": { "title": "Date Created", "description": "When this Blocked Number was created.", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "description": "When this Blocked Number was last updated.", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "phone": { "title": "Phone", "description": "The phone number (in E.164 format) to block.", "type": "string" }, "reason": { "title": "Reason", "description": "The reason for blocking the given phone number.", "type": "string" }, "updated_by": { "title": "Updated By", "description": "User who most recently updated this Blocked Number.", "type": "string" } }, "required": [ "created_by", "date_created", "date_updated", "id", "organization_id", "phone", "reason", "updated_by" ] }, "BlockedPhoneNumberSettings": { "title": "BlockedPhoneNumberSettings", "type": "object", "properties": { "reject_anonymous_inbound_calls": { "title": "Reject Anonymous Inbound Calls", "type": "boolean" } }, "required": [ "reject_anonymous_inbound_calls" ] }, "BulkActionObjectType": { "title": "BulkActionObjectType", "type": "string", "enum": [ "lead", "contact", "call", "custom_activity", "form_submission" ] }, "BulkActionStatus": { "title": "BulkActionStatus", "type": "string", "enum": [ "created", "loading", "processing", "done", "paused", "resuming", "error" ] }, "BulkDeleteAction": { "title": "BulkDeleteAction", "type": "object", "properties": { "bulk_object_type": { "$ref": "#/components/schemas/BulkActionObjectType" }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "n_leads": { "title": "N Leads", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "n_leads_processed": { "title": "N Leads Processed", "type": "integer" }, "n_objects": { "title": "N Objects", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "n_objects_processed": { "title": "N Objects Processed", "type": "integer" }, "organization_id": { "title": "Organization ID", "type": "string" }, "query": { "title": "Query", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "results_limit": { "title": "Results Limit", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "s_query": { "title": "S Query", "type": "object", "additionalProperties": true }, "send_done_email": { "title": "Send Done Email", "type": "boolean" }, "sort": { "title": "Sort", "type": "array", "items": { "type": "object", "additionalProperties": true } }, "status": { "anyOf": [ { "$ref": "#/components/schemas/BulkActionStatus" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "bulk_object_type", "created_by", "date_created", "date_updated", "id", "n_leads", "n_leads_processed", "n_objects", "n_objects_processed", "organization_id", "query", "results_limit", "s_query", "send_done_email", "sort", "status", "updated_by" ] }, "BulkEditAction": { "title": "BulkEditAction", "type": "object", "properties": { "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "custom_field_name": { "title": "Custom Field Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "custom_field_value": { "title": "Custom Field Value", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "lead_status_id": { "title": "Lead Status ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "n_leads": { "title": "N Leads", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "n_leads_processed": { "title": "N Leads Processed", "type": "integer" }, "n_objects": { "title": "N Objects", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "n_objects_processed": { "title": "N Objects Processed", "type": "integer" }, "organization_id": { "title": "Organization ID", "type": "string" }, "query": { "title": "Query", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "results_limit": { "title": "Results Limit", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "s_query": { "title": "S Query", "type": "object", "additionalProperties": true }, "send_done_email": { "title": "Send Done Email", "type": "boolean" }, "sort": { "title": "Sort", "type": "array", "items": { "type": "object", "additionalProperties": true } }, "status": { "anyOf": [ { "$ref": "#/components/schemas/BulkActionStatus" }, { "type": "null" } ] }, "type": { "$ref": "#/components/schemas/BulkEditActionType" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "created_by", "custom_field_name", "custom_field_value", "date_created", "date_updated", "id", "lead_status_id", "n_leads", "n_leads_processed", "n_objects", "n_objects_processed", "organization_id", "query", "results_limit", "s_query", "send_done_email", "sort", "status", "type", "updated_by" ] }, "BulkEditActionType": { "title": "BulkEditActionType", "type": "string", "enum": [ "set_custom_field", "clear_custom_field", "set_lead_status", "set_contact_custom_field", "clear_contact_custom_field", "set_activity_custom_field", "clear_activity_custom_field", "set_global_custom_field", "clear_global_custom_field", "set_opportunity_custom_field", "clear_opportunity_custom_field", "set_custom_object_custom_field", "clear_custom_object_custom_field" ] }, "BulkEmailAction": { "title": "BulkEmailAction", "type": "object", "properties": { "contact_preference": { "anyOf": [ { "$ref": "#/components/schemas/BulkEmailContactPreference" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "email_account_id": { "title": "Email Account ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "n_leads": { "title": "N Leads", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "n_leads_processed": { "title": "N Leads Processed", "type": "integer" }, "n_objects": { "title": "N Objects", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "n_objects_processed": { "title": "N Objects Processed", "type": "integer" }, "organization_id": { "title": "Organization ID", "type": "string" }, "query": { "title": "Query", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "results_limit": { "title": "Results Limit", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "s_query": { "title": "S Query", "type": "object", "additionalProperties": true }, "send_done_email": { "title": "Send Done Email", "type": "boolean" }, "sender": { "title": "Sender", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sort": { "title": "Sort", "type": "array", "items": { "type": "object", "additionalProperties": true } }, "status": { "anyOf": [ { "$ref": "#/components/schemas/BulkActionStatus" }, { "type": "null" } ] }, "template_id": { "title": "Template ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "contact_preference", "created_by", "date_created", "date_updated", "email_account_id", "id", "n_leads", "n_leads_processed", "n_objects", "n_objects_processed", "organization_id", "query", "results_limit", "s_query", "send_done_email", "sender", "sort", "status", "template_id", "updated_by" ] }, "BulkEmailContactPreference": { "title": "BulkEmailContactPreference", "type": "string", "enum": [ "lead", "contact", "all" ] }, "BulkSequenceSubscriptionAction": { "title": "BulkSequenceSubscriptionAction", "type": "object", "properties": { "action_type": { "$ref": "#/components/schemas/BulkSequenceSubscriptionActionType" }, "calls_assigned_to": { "title": "Calls Assigned To", "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "contact_preference": { "anyOf": [ { "$ref": "#/components/schemas/BulkSequenceSubscriptionContactPreference" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "from_phone_number_id": { "title": "From Phone Number ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "n_leads": { "title": "N Leads", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "n_leads_processed": { "title": "N Leads Processed", "type": "integer" }, "n_objects": { "title": "N Objects", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "n_objects_processed": { "title": "N Objects Processed", "type": "integer" }, "organization_id": { "title": "Organization ID", "type": "string" }, "query": { "title": "Query", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "results_limit": { "title": "Results Limit", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "s_query": { "title": "S Query", "type": "object", "additionalProperties": true }, "send_done_email": { "title": "Send Done Email", "type": "boolean" }, "sender_account_id": { "title": "Sender Account ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sender_email": { "title": "Sender Email", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sender_name": { "title": "Sender Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_id": { "title": "Sequence ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sort": { "title": "Sort", "type": "array", "items": { "type": "object", "additionalProperties": true } }, "status": { "anyOf": [ { "$ref": "#/components/schemas/BulkActionStatus" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "action_type", "calls_assigned_to", "contact_preference", "created_by", "date_created", "date_updated", "from_phone_number_id", "id", "n_leads", "n_leads_processed", "n_objects", "n_objects_processed", "organization_id", "query", "results_limit", "s_query", "send_done_email", "sender_account_id", "sender_email", "sender_name", "sequence_id", "sort", "status", "updated_by" ] }, "BulkSequenceSubscriptionActionType": { "title": "BulkSequenceSubscriptionActionType", "type": "string", "enum": [ "subscribe", "resume", "resume_finished", "pause", "reassign" ] }, "BulkSequenceSubscriptionContactPreference": { "title": "BulkSequenceSubscriptionContactPreference", "type": "string", "enum": [ "lead", "contact" ] }, "BulkUpdateNotifications": { "title": "BulkUpdateNotifications", "type": "object", "properties": { "assigned_to": { "title": "Assigned To", "type": "string" }, "date": { "title": "Date", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] }, "is_complete": { "title": "Is Complete", "type": "boolean" }, "organization_id": { "title": "Organization ID", "type": "string" }, "priority": { "$ref": "#/components/schemas/TaskPriority" }, "resolution": { "anyOf": [ { "$ref": "#/components/schemas/NotificationResolution" }, { "type": "null" } ] }, "text": { "title": "Text", "type": "string" } }, "additionalProperties": false }, "CallActivity": { "title": "CallActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "outcome_id": { "title": "Outcome ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_id": { "title": "Sequence ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_name": { "title": "Sequence Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_subscription_id": { "title": "Sequence Subscription ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "source": { "$ref": "#/components/schemas/PhoneActivitySource" }, "status": { "$ref": "#/components/schemas/CallStatus" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "id", "lead_id", "organization_id", "outcome_id", "source", "status", "updated_by", "user_id", "users" ] }, "CallStatus": { "title": "CallStatus", "description": "Current status of the call.", "type": "string", "enum": [ "created", "in-progress", "completed", "cancel", "no-answer", "busy", "failed", "timeout" ] }, "CarrierNumberType": { "title": "CarrierNumberType", "type": "string", "enum": [ "local", "national", "mobile", "tollfree", "shortcode" ] }, "CommentSummary": { "title": "CommentSummary", "type": "object", "properties": { "comment_count": { "title": "Comment Count", "type": "integer" }, "thread_id": { "title": "Thread ID", "type": "string" } }, "required": [ "comment_count", "thread_id" ] }, "CommunicationDirection": { "title": "CommunicationDirection", "description": "Direction of communication. Outgoing means the communication flowing from the user to the lead/contact. Inbound means the opposite.", "type": "string", "enum": [ "incoming", "outgoing" ] }, "ConferenceLinkType": { "title": "ConferenceLinkType", "type": "string", "enum": [ "ZOOM", "GOOGLE_MEET", "GOOGLE_HANGOUTS", "MICROSOFT_TEAMS", "SKYPE", "WEBEX", "GO_TO_MEETING" ] }, "Contact": { "title": "Contact", "type": "object", "properties": { "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "display_name": { "title": "Display Name", "type": "string" }, "emails": { "title": "Emails", "type": "array", "items": { "$ref": "#/components/schemas/ContactEmail" } }, "id": { "title": "ID", "type": "string" }, "integration_links": { "title": "Integration Links", "type": "array", "items": { "$ref": "#/components/schemas/RenderedIntegrationLink" } }, "lead_id": { "title": "Lead ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_suggestions_operation_id": { "title": "Lead Suggestions Operation ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "title": "Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "phones": { "title": "Phones", "type": "array", "items": { "$ref": "#/components/schemas/ContactPhone" } }, "recent_calls": { "title": "Recent Calls", "type": "array", "items": { "$ref": "#/components/schemas/ContactRecentCall" } }, "subscriptions": { "title": "Subscriptions", "type": "array", "items": { "$ref": "#/components/schemas/BasicSubscriptionInfoForContact" } }, "timezone": { "title": "Timezone", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "timezone_source": { "title": "Timezone Source", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "title": "Title", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "urls": { "title": "URLs", "type": "array", "items": { "$ref": "#/components/schemas/ContactUrl" } } }, "required": [ "created_by", "date_created", "date_updated", "display_name", "id", "name", "organization_id", "title", "updated_by" ] }, "ContactEmail": { "title": "ContactEmail", "type": "object", "properties": { "email": { "title": "Email", "type": "string" }, "is_unsubscribed": { "title": "Is Unsubscribed", "type": "boolean" }, "type": { "title": "Type", "type": "string" } }, "required": [ "email", "is_unsubscribed", "type" ] }, "ContactPhone": { "title": "ContactPhone", "type": "object", "properties": { "country": { "title": "Country", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "outbound_sms_blocked": { "title": "Outbound SMS Blocked", "type": "boolean" }, "phone": { "title": "Phone", "type": "string" }, "phone_formatted": { "title": "Phone Formatted", "type": "string" }, "type": { "title": "Type", "type": "string" }, "tz_ids": { "title": "TZ IDs", "type": "array", "items": { "type": "string" } } }, "required": [ "phone", "type" ] }, "ContactRecentCall": { "title": "ContactRecentCall", "type": "object", "properties": { "dialer_id": { "title": "Dialer ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "duration": { "title": "Duration", "type": "integer" }, "finish_timestamp": { "title": "Finish Timestamp", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "status": { "$ref": "#/components/schemas/CallStatus" } }, "required": [ "dialer_id", "duration", "finish_timestamp", "id", "status" ] }, "ContactUrl": { "title": "ContactUrl", "type": "object", "properties": { "type": { "title": "Type", "type": "string" }, "url": { "title": "URL", "type": "string" } }, "required": [ "type", "url" ] }, "CreateBlockedPhoneNumber": { "title": "CreateBlockedPhoneNumber", "type": "object", "properties": { "phone": { "title": "Phone", "description": "The phone number (in E.164 format) that you wish to block.", "type": "string" }, "reason": { "title": "Reason", "description": "The reason why you wish to block a given phone number.", "type": "string" } }, "required": [ "phone", "reason" ], "additionalProperties": false }, "CreateCallActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "contact_id": { "type": [ "null", "string" ] }, "conversation_type_id": { "type": [ "null", "string" ] }, "created_by": { "type": [ "null", "string" ] }, "date_created": { "type": [ "null", "string" ], "format": "date-time" }, "direction": { "type": [ "null", "string" ], "enum": [ "inbound", "outbound", null ] }, "duration": { "type": [ "integer", "null" ], "maximum": 604800 }, "lead_id": { "type": [ "null", "string" ] }, "note": { "type": [ "null", "string" ] }, "note_html": { "type": [ "null", "string" ] }, "organization_id": { "type": [ "null", "string" ] }, "outcome_id": { "type": [ "null", "string" ] }, "phone": { "description": "Phone number in E.164 format", "type": [ "null", "string" ] }, "playbook_id": { "type": [ "null", "string" ] }, "quality_info": { "type": [ "null", "string" ] }, "recording_url": { "type": [ "null", "string" ], "format": "uri" }, "source": { "type": [ "null", "string" ], "enum": [ "Close.io", "External", null ] }, "status": { "type": [ "null", "string" ], "enum": [ "created", "in-progress", "completed", "cancel", "no-answer", "busy", "failed", "timeout", null ] }, "user_id": { "type": [ "null", "string" ] }, "voicemail_url": { "type": [ "null", "string" ], "format": "uri" } }, "additionalProperties": false, "patternProperties": { "^custom\\.": { "not": { "type": "object" } } } }, "CreateCallTask": { "title": "CreateCallTask", "type": "object", "properties": { "_type": { "title": "Type", "type": "string", "default": "outgoing_call", "const": "outgoing_call" }, "agent_config_id": { "title": "Agent Config ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "assigned_to": { "title": "Assigned To", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "type": "string" }, "created_by": { "title": "Created By", "type": "string" }, "date": { "title": "Date", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] }, "is_complete": { "title": "Is Complete", "type": "boolean" }, "lead_id": { "title": "Lead ID", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "text": { "title": "Text", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "contact_id", "lead_id" ] }, "CreateComment": { "title": "CreateComment", "type": "object", "properties": { "body": { "title": "Body", "type": "string" }, "object_id": { "title": "Object ID", "type": "string" } }, "required": [ "body", "object_id" ], "additionalProperties": false }, "CreateContact": { "type": "object", "properties": { "created_by": { "type": [ "null", "string" ] }, "date_created": { "type": [ "null", "string" ], "format": "date-time" }, "emails": { "type": [ "array", "null" ], "maxItems": 100, "items": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "type": { "type": "string" } }, "required": [ "email" ] } }, "lead_id": { "type": [ "null", "string" ] }, "name": { "type": [ "null", "string" ], "maxLength": 1000 }, "phones": { "type": [ "array", "null" ], "maxItems": 100, "items": { "type": "object", "properties": { "phone": { "description": "Phone number in E.164 format", "type": [ "null", "string" ] }, "type": { "type": "string" } } } }, "timezone": { "description": "IANA timezone identifier", "type": [ "null", "string" ] }, "title": { "type": [ "null", "string" ], "maxLength": 1000 }, "urls": { "type": [ "array", "null" ], "maxItems": 100, "items": { "type": "object", "properties": { "type": { "type": "string" }, "url": { "type": "string", "format": "uri" } }, "required": [ "url" ] } } }, "additionalProperties": false, "patternProperties": { "^custom\\.": { "not": { "type": "object" } } } }, "CreateCustomActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "contact_id": { "type": [ "null", "string" ] }, "created_by": { "type": [ "null", "string" ] }, "custom_activity_type_id": { "type": "string" }, "date_created": { "type": [ "null", "string" ], "format": "date-time" }, "lead_id": { "type": "string" }, "organization_id": { "type": [ "null", "string" ] }, "pinned": { "type": [ "boolean", "null" ] }, "status": { "type": "string", "enum": [ "draft", "published" ] }, "user_id": { "type": [ "null", "string" ] } }, "required": [ "custom_activity_type_id", "lead_id" ], "additionalProperties": false, "patternProperties": { "^custom\\.": { "not": { "type": "object" } } } }, "CreateEmailActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "attachments": { "type": [ "array", "null" ], "maxItems": 1000, "items": { "type": "object", "properties": { "content_id": { "type": [ "null", "string" ] }, "content_type": { "type": [ "null", "string" ] }, "filename": { "type": "string" }, "inline_only": { "type": "boolean" }, "size": { "type": "integer" }, "url": { "type": "string", "format": "uri" } }, "required": [ "filename", "size", "url" ] } }, "bcc": { "type": [ "array", "null" ], "maxItems": 500, "items": { "type": "string", "maxLength": 1000 } }, "body_html": { "type": [ "null", "string" ], "maxLength": 1048576 }, "body_text": { "type": [ "null", "string" ], "maxLength": 1048576 }, "cc": { "type": [ "array", "null" ], "maxItems": 500, "items": { "type": "string", "maxLength": 1000 } }, "contact_id": { "type": [ "null", "string" ] }, "created_by": { "type": [ "null", "string" ] }, "date_created": { "type": [ "null", "string" ], "format": "date-time" }, "email_account_id": { "type": [ "null", "string" ] }, "followup_date": { "type": [ "null", "string" ], "format": "date-time" }, "followup_sequence_add_cc_bcc": { "type": [ "boolean", "null" ] }, "followup_sequence_delay": { "type": [ "integer", "null" ], "minimum": 86400 }, "followup_sequence_id": { "type": [ "null", "string" ] }, "in_reply_to_id": { "type": [ "null", "string" ] }, "lead_id": { "type": "string" }, "opens": { "type": [ "array", "null" ], "items": { "type": "object", "properties": { "opened_at": { "type": "string", "format": "date-time" } }, "required": [ "opened_at" ] } }, "organization_id": { "type": [ "null", "string" ] }, "sender": { "type": [ "null", "string" ], "format": "email" }, "status": { "type": "string", "enum": [ "inbox", "draft", "scheduled", "outbox", "sent", "error" ] }, "subject": { "type": [ "null", "string" ], "maxLength": 1000 }, "template_id": { "type": [ "null", "string" ] }, "to": { "type": [ "array", "null" ], "maxItems": 500, "items": { "type": "string", "maxLength": 1000 } }, "user_id": { "type": [ "null", "string" ] } }, "required": [ "lead_id", "status" ], "additionalProperties": false }, "CreateGroup": { "title": "CreateGroup", "type": "object", "properties": { "name": { "title": "Name", "type": "string" } }, "required": [ "name" ], "additionalProperties": false }, "CreateGroupMember": { "title": "CreateGroupMember", "type": "object", "properties": { "user_id": { "title": "User ID", "type": "string" } }, "required": [ "user_id" ], "additionalProperties": false }, "CreateIntegrationLink": { "title": "CreateIntegrationLink", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "type": { "$ref": "#/components/schemas/IntegrationLinkType" }, "url": { "title": "Url", "type": "string" } }, "required": [ "name", "type", "url" ], "additionalProperties": false }, "CreateLeadTask": { "title": "CreateLeadTask", "type": "object", "properties": { "_type": { "title": "Type", "type": "string", "default": "lead", "const": "lead" }, "assigned_to": { "title": "Assigned To", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "type": "string" }, "date": { "title": "Date", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] }, "date_created": { "title": "Date Created", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] }, "disable_notification": { "title": "Disable Notification", "type": "boolean", "default": false }, "due_date": { "title": "Due Date", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] }, "is_complete": { "title": "Is Complete", "type": "boolean" }, "is_dateless": { "title": "Is Dateless", "type": "boolean" }, "lead_id": { "title": "Lead ID", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "priority": { "title": "Priority", "$ref": "#/components/schemas/TaskPriority" }, "text": { "title": "Text", "type": "string" } }, "required": [ "lead_id", "text" ] }, "CreateMembership": { "title": "CreateMembership", "type": "object", "properties": { "email": { "title": "Email", "type": "string", "format": "email" }, "role_id": { "title": "Role ID", "description": "One of `superuser`, `user`, or `restricteduser` for the corresponding predefined role, or the ID of a custom [Role](https://developer.close.com/api/resources/roles). The role must not grant the `manage_organization` permission.", "type": "string", "minLength": 1 } }, "required": [ "email", "role_id" ], "additionalProperties": false }, "CreateNoteActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "attachments": { "type": [ "array", "null" ], "maxItems": 1000, "items": { "type": "object", "properties": { "content_type": { "type": [ "null", "string" ] }, "filename": { "type": "string" }, "url": { "type": "string", "format": "uri" } }, "required": [ "filename", "url" ] } }, "contact_id": { "type": [ "null", "string" ] }, "created_by": { "type": [ "null", "string" ] }, "date_created": { "type": [ "null", "string" ], "format": "date-time" }, "lead_id": { "type": "string" }, "note": { "type": [ "null", "string" ] }, "note_html": { "type": [ "null", "string" ] }, "organization_id": { "type": [ "null", "string" ] }, "pinned": { "type": [ "boolean", "null" ] }, "title": { "type": [ "null", "string" ] }, "user_id": { "type": [ "null", "string" ] } }, "required": [ "lead_id" ], "additionalProperties": false }, "CreateOpportunity": { "title": "CreateOpportunity", "type": "object", "properties": { "attachments": { "title": "Attachments", "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/AttachmentIn" } }, { "type": "null" } ] }, "confidence": { "title": "Confidence", "default": null, "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "default": null, "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_won": { "title": "Date Won", "description": "If not set on the resource or in the request, `date_won` will be set automatically to today's date when setting `status_id` to a status with type `won`. The `x-tz-offset` header, used to pass your timezone's UTC offset, will be taken into account.", "default": null, "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "description": "Opportunities belong to exactly one Lead. If not provided, a new lead will be created (appearing as \"Untitled\" in the UI).", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "note": { "title": "Note", "description": "Plaintext/markdown version of the note. If `note_html` is also provided in the same request, this value is ignored and `note` is derived from the HTML instead.", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "note_html": { "title": "Note HTML", "description": "Rich-text HTML version of the note. When set, `note` is automatically populated with the plaintext version (tags become markdown), overriding any `note` value passed in the same request.", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "pipeline_id": { "title": "Pipeline ID", "description": "Specify which pipeline this opportunity should belong to. When supplied without `status_id`, the opportunity will be created with the first available status of that pipeline. When supplied with `status_id`, the status must belong to the specified pipeline or a 400 error will be returned. If the pipeline does not exist, a 400 error will be returned. See the [Pipelines API](https://developer.close.com/api/resources/pipelines).", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status_id": { "title": "Status ID", "description": "Post a `status_id` to create an opportunity with a specific status. If omitted, the organization's default (first) status will be used (or the first status of the `pipeline_id` if provided). See the [Opportunity Status API](https://developer.close.com/api/resources/opportunity-statuses).", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value": { "title": "Value", "default": null, "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "value_period": { "default": null, "anyOf": [ { "$ref": "#/components/schemas/OpportunityValuePeriod" }, { "type": "null" } ] } }, "additionalProperties": false, "patternProperties": { "^custom\\.": { "not": { "type": "object" } } } }, "CreateOutcome": { "title": "CreateOutcome", "type": "object", "properties": { "applies_to": { "title": "Applies To", "description": "Deprecated. This field will be derived from `type` in a future update: `custom` applies to calls and meetings, `vm-dropped` applies to calls only.", "deprecated": true, "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/OutcomeAppliesTo" } }, { "type": "null" } ] }, "description": { "title": "Description", "description": "Explain what the outcome means and when it should be used.", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "title": "Name", "description": "Displayed to users wherever outcomes can be selected.", "type": "string" }, "type": { "description": "Set to `vm-dropped` if this outcome should be automatically set on calls whenever a team member performs a Voicemail Drop. Otherwise, leave empty or explicitly set to `custom` (default).", "default": "custom", "$ref": "#/components/schemas/OutcomeType" } }, "required": [ "name" ], "additionalProperties": false }, "CreatePhoneNumberRequest": { "title": "CreatePhoneNumberRequest", "type": "object", "properties": { "bundle_id": { "title": "Bundle ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "carrier_type": { "title": "Carrier Type", "default": null, "anyOf": [ { "type": "string", "enum": [ "local", "national", "mobile", "tollfree" ] }, { "type": "null" } ] }, "country": { "title": "Country", "description": "A two letter ISO country code (e.g. `US` for United States).", "type": "string" }, "prefix": { "title": "Prefix", "description": "A string with the phone number prefix or area code, not including the country code.", "type": "string", "default": "", "maxLength": 5 }, "sharing": { "description": "Deprecated. `personal` for a number that belongs to an individual user, or `group` for a group number. The distinction between personal and group numbers is being removed, and this field will be removed in a future update. When omitted, defaults to `personal`.", "deprecated": true, "default": "personal", "$ref": "#/components/schemas/PhoneNumberSharing" }, "with_mms": { "title": "With MMS", "description": "By default, MMS-capable numbers are rented if Close supports MMS for the given country. Renting an MMS-capable number can be forced by setting this flag to `true`. If set to `false`, certain prefixes that don't support MMS can be rented in countries where Close supports MMS. In most scenarios, this flag should not be passed. When you request an MMS number, you must set `with_sms` to `true` as well.", "default": null, "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "with_sms": { "title": "With SMS", "description": "By default, SMS-capable numbers are rented if Close supports SMS for the given country. Renting an SMS-capable number can be forced by setting this flag to `true`. If set to `false`, certain prefixes that don't support SMS can be rented in countries where Close supports SMS. In most scenarios, this flag should not be passed unless a `has-voice-only` error status is received.", "default": null, "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "country" ], "additionalProperties": false }, "CreatePlaybook": { "title": "CreatePlaybook", "type": "object", "properties": { "custom_field_ids": { "title": "Custom Field IDs", "description": "IDs of [Shared Custom Fields](/api/resources/custom-fields/custom-fields-shared) to associate with this Playbook.", "type": "array", "items": { "type": "string" } }, "description": { "title": "Description", "description": "Description of the playbook.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "title": "Name", "type": "string" }, "outcome_ids": { "title": "Outcome IDs", "description": "IDs of [Outcomes](/api/resources/outcomes/) that should be associated with this Playbook.", "type": "array", "items": { "type": "string" } }, "summary_guidance": { "title": "Summary Guidance", "description": "Guidance for AI summaries of calls and meetings associated with this Playbook.", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "name" ], "additionalProperties": false }, "CreateSMSActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "attachments": { "type": [ "array", "null" ], "maxItems": 10, "items": { "type": "object", "properties": { "content_type": { "type": "string", "enum": [ "application/pdf", "application/vcard", "audio/3gpp", "audio/3gpp2", "audio/L24", "audio/ac3", "audio/amr", "audio/amr-nb", "audio/basic", "audio/mp4", "audio/mpeg", "audio/ogg", "audio/vnd.rn-realaudio", "audio/vnd.wave", "audio/webm", "image/bmp", "image/gif", "image/jpeg", "image/jpg", "image/png", "image/tiff", "text/calendar", "text/csv", "text/directory", "text/richtext", "text/rtf", "text/vcard", "text/x-vcard", "video/3gpp", "video/3gpp-tt", "video/3gpp2", "video/H261", "video/H263", "video/H263-1998", "video/H263-2000", "video/H264", "video/mp4", "video/mpeg", "video/quicktime", "video/webm" ] }, "filename": { "type": "string" }, "url": { "type": "string" } }, "required": [ "content_type", "filename", "url" ] } }, "contact_id": { "type": [ "null", "string" ] }, "created_by": { "type": [ "null", "string" ] }, "date_created": { "type": [ "null", "string" ], "format": "date-time" }, "direction": { "type": [ "null", "string" ], "enum": [ "inbound", "outbound", null ] }, "lead_id": { "type": [ "null", "string" ] }, "local_phone": { "description": "Phone number in E.164 format", "type": [ "null", "string" ] }, "organization_id": { "type": [ "null", "string" ] }, "remote_phone": { "description": "Phone number in E.164 format", "type": [ "null", "string" ] }, "source": { "type": [ "null", "string" ], "enum": [ "Close.io", "External", null ] }, "status": { "type": "string", "enum": [ "inbox", "draft", "scheduled", "outbox", "sent", "error" ] }, "template_id": { "type": [ "null", "string" ] }, "text": { "type": [ "null", "string" ] }, "user_id": { "type": [ "null", "string" ] } }, "required": [ "status" ], "additionalProperties": false }, "CreateSMSTemplate": { "title": "CreateSMSTemplate", "type": "object", "properties": { "attachments": { "title": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/CreateSMSTemplateAttachment" } }, "is_shared": { "title": "Is Shared", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "text": { "title": "Text", "type": "string" } }, "required": [ "name" ], "additionalProperties": false }, "CreateSMSTemplateAttachment": { "title": "CreateSMSTemplateAttachment", "type": "object", "properties": { "content_type": { "title": "Content Type", "type": "string" }, "filename": { "title": "Filename", "type": "string" }, "url": { "title": "Url", "type": "string" } }, "required": [ "content_type", "filename", "url" ] }, "CreateTask": { "title": "CreateTask", "oneOf": [ { "$ref": "#/components/schemas/CreateLeadTask" }, { "$ref": "#/components/schemas/CreateCallTask" } ], "discriminator": { "mapping": { "lead": "#/components/schemas/CreateLeadTask", "outgoing_call": "#/components/schemas/CreateCallTask" }, "propertyName": "_type" } }, "CreateUnsubscribedEmail": { "title": "CreateUnsubscribedEmail", "type": "object", "properties": { "email": { "title": "Email", "type": "string", "format": "email", "maxLength": 500 } }, "required": [ "email" ], "additionalProperties": false }, "CreateWebhook": { "title": "CreateWebhook", "type": "object", "properties": { "events": { "title": "Events", "description": "A list of events to subscribe to. Each event has an `object_type` and an `action` from values in the [event log](https://developer.close.com/api/resources/events/list-of-event-types). You can also use [Webhook Filters](https://developer.close.com/api/resources/webhooks/webhook-filters) while creating your subscription so that an event only fires to a Webhook when certain conditions are met.", "type": "array", "items": { "$ref": "#/components/schemas/WebhookSubscriptionEvent" } }, "url": { "title": "Url", "description": "Destination URL for the webhook subscription", "type": "string" }, "verify_ssl": { "title": "Verify Ssl", "description": "Verify SSL certificate of destination webhook URL. Set to `false` to disable SSL certificate validation. We recommend using https to protect your data during delivery.", "type": "boolean", "default": true } }, "required": [ "events", "url" ], "additionalProperties": false }, "CreateWhatsAppMessage": { "title": "CreateWhatsAppMessage", "type": "object", "properties": { "activity_at": { "title": "Activity At", "type": "string", "format": "date-time" }, "attachments": { "title": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/WhatsAppAttachmentData" } }, "contact_id": { "title": "Contact ID", "type": "string" }, "direction": { "$ref": "#/components/schemas/CommunicationDirection" }, "external_whatsapp_message_id": { "title": "External WhatsApp Message ID", "type": "string" }, "integration_link": { "title": "Integration Link", "default": null, "anyOf": [ { "type": "string", "format": "uri", "minLength": 1, "maxLength": 2083 }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "type": "string" }, "local_phone": { "title": "Local Phone", "type": "string" }, "message_markdown": { "title": "Message Markdown", "type": "string" }, "remote_phone": { "title": "Remote Phone", "type": "string" }, "response_to_id": { "title": "Response To ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "activity_at", "contact_id", "direction", "external_whatsapp_message_id", "lead_id", "local_phone", "message_markdown", "remote_phone" ], "additionalProperties": false }, "CreatedActivity": { "title": "CreatedActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "import_id": { "title": "Import ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "source": { "anyOf": [ { "$ref": "#/components/schemas/CreationSource" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "id", "import_id", "lead_id", "organization_id", "source", "updated_by", "user_id", "users" ] }, "CreationSource": { "title": "CreationSource", "type": "string", "enum": [ "ui", "api", "import", "clipper", "email", "suggestion", "segment-integration", "customerio-integration", "calendly-integration", "ai", "whatsapp", "webform" ] }, "CustomActivity": { "title": "CustomActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "comment_summary": { "title": "Comment Summary", "anyOf": [ { "$ref": "#/components/schemas/CommentSummary" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "custom_activity_type_id": { "title": "Custom Activity Type ID", "type": "string" }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "last_published_at": { "title": "Last Published At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "mentions": { "title": "Mentions", "type": "array", "items": { "type": "string" } }, "mentions_updated_at": { "title": "Mentions Updated At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "pinned": { "title": "Pinned", "type": "boolean" }, "pinned_at": { "title": "Pinned At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "source": { "anyOf": [ { "$ref": "#/components/schemas/CreationSource" }, { "type": "null" } ] }, "status": { "$ref": "#/components/schemas/CustomActivityStatus" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "custom_activity_type_id", "date_created", "date_updated", "id", "last_published_at", "lead_id", "mentions", "mentions_updated_at", "organization_id", "pinned", "pinned_at", "source", "status", "updated_by", "user_id", "users" ] }, "CustomActivityStatus": { "title": "CustomActivityStatus", "type": "string", "enum": [ "draft", "published" ] }, "EmailActivity": { "title": "EmailActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "agent_action_reason": { "title": "Agent Action Reason", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "agent_config_id": { "title": "Agent Config ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "attachments": { "title": "Attachments", "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, { "type": "null" } ] }, "bcc": { "title": "Bcc", "type": "array", "items": { "type": "string" } }, "body_html": { "title": "Body HTML", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "body_preview": { "title": "Body Preview", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "body_text": { "title": "Body Text", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "bulk_email_action_id": { "title": "Bulk Email Action ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cc": { "title": "Cc", "type": "array", "items": { "type": "string" } }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_scheduled": { "title": "Date Scheduled", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_sent": { "title": "Date Sent", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "direction": { "anyOf": [ { "$ref": "#/components/schemas/CommunicationDirection" }, { "type": "null" } ] }, "email_account_id": { "title": "Email Account ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "envelope": { "title": "Envelope", "default": null, "anyOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "followup_sequence_add_cc_bcc": { "title": "Followup Sequence Add Cc Bcc", "type": "boolean" }, "followup_sequence_delay": { "title": "Followup Sequence Delay", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "followup_sequence_id": { "title": "Followup Sequence ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "has_reply": { "title": "Has Reply", "type": "boolean" }, "id": { "title": "ID", "type": "string" }, "in_reply_to_id": { "title": "In Reply To ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "message_ids": { "title": "Message IDs", "type": "array", "items": { "type": "string" } }, "need_smtp_credentials": { "title": "Need Smtp Credentials", "type": "boolean" }, "opens": { "title": "Opens", "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/EmailOpen" } }, { "type": "null" } ] }, "opens_summary": { "title": "Opens Summary", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "references": { "title": "References", "type": "array", "items": { "type": "string" } }, "send_as_id": { "title": "Send As ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "send_attempts": { "title": "Send Attempts", "default": null, "anyOf": [ { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, { "type": "null" } ] }, "sender": { "title": "Sender", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_id": { "title": "Sequence ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_name": { "title": "Sequence Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_subscription_id": { "title": "Sequence Subscription ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "$ref": "#/components/schemas/MessageStatus" }, "subject": { "title": "Subject", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "template_id": { "title": "Template ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "template_name": { "title": "Template Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "thread_id": { "title": "Thread ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "to": { "title": "To", "type": "array", "items": { "type": "string" } }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "bcc", "body_html", "body_text", "bulk_email_action_id", "cc", "contact_id", "created_by", "date_created", "date_scheduled", "date_sent", "date_updated", "direction", "followup_sequence_add_cc_bcc", "followup_sequence_delay", "has_reply", "id", "in_reply_to_id", "lead_id", "message_ids", "need_smtp_credentials", "opens_summary", "organization_id", "references", "send_as_id", "sender", "status", "subject", "template_id", "thread_id", "to", "updated_by", "user_id", "users" ] }, "EmailEnvelope": { "title": "EmailEnvelope", "type": "object", "properties": { "bcc": { "title": "BCC", "type": "array", "items": { "$ref": "#/components/schemas/EmailIdentity" } }, "cc": { "title": "CC", "type": "array", "items": { "$ref": "#/components/schemas/EmailIdentity" } }, "date": { "title": "Date", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "from": { "title": "From", "type": "array", "items": { "$ref": "#/components/schemas/EmailIdentity" } }, "in_reply_to": { "title": "In Reply To", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "is_autoreply": { "title": "Is Auto-Reply", "type": "boolean" }, "message_id": { "title": "Message ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "reply_to": { "title": "Reply To", "type": "array", "items": { "$ref": "#/components/schemas/EmailIdentity" } }, "sender": { "title": "Sender", "type": "array", "items": { "$ref": "#/components/schemas/EmailIdentity" } }, "subject": { "title": "Subject", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "to": { "title": "To", "type": "array", "items": { "$ref": "#/components/schemas/EmailIdentity" } } }, "required": [ "bcc", "cc", "date", "from", "in_reply_to", "is_autoreply", "message_id", "reply_to", "sender", "subject", "to" ] }, "EmailIdentity": { "title": "EmailIdentity", "type": "object", "properties": { "email": { "title": "Email", "type": "string" }, "name": { "title": "Name", "type": "string" } }, "required": [ "email", "name" ] }, "EmailInThread": { "title": "EmailInThread", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "agent_action_reason": { "title": "Agent Action Reason", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "agent_config_id": { "title": "Agent Config ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "ai_draft": { "title": "Ai Draft", "anyOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "attachments": { "title": "Attachments", "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, { "type": "null" } ] }, "bcc": { "title": "Bcc", "type": "array", "items": { "type": "string" } }, "body_html": { "title": "Body HTML", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "body_html_quoted": { "title": "Body HTML Quoted", "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/QuotedEmailHTML" } }, { "type": "null" } ] }, "body_preview": { "title": "Body Preview", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "body_text": { "title": "Body Text", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "body_text_quoted": { "title": "Body Text Quoted", "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/QuotedEmailText" } }, { "type": "null" } ] }, "bulk_email_action_id": { "title": "Bulk Email Action ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cc": { "title": "Cc", "type": "array", "items": { "type": "string" } }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_scheduled": { "title": "Date Scheduled", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_sent": { "title": "Date Sent", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "direction": { "anyOf": [ { "$ref": "#/components/schemas/CommunicationDirection" }, { "type": "null" } ] }, "email_account_id": { "title": "Email Account ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "envelope": { "title": "Envelope", "default": null, "anyOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "followup_sequence_add_cc_bcc": { "title": "Followup Sequence Add Cc Bcc", "type": "boolean" }, "followup_sequence_delay": { "title": "Followup Sequence Delay", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "followup_sequence_id": { "title": "Followup Sequence ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "has_reply": { "title": "Has Reply", "type": "boolean" }, "id": { "title": "ID", "type": "string" }, "in_reply_to_id": { "title": "In Reply To ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "message_ids": { "title": "Message IDs", "type": "array", "items": { "type": "string" } }, "need_smtp_credentials": { "title": "Need Smtp Credentials", "type": "boolean" }, "opens": { "title": "Opens", "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/EmailOpen" } }, { "type": "null" } ] }, "opens_summary": { "title": "Opens Summary", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "references": { "title": "References", "type": "array", "items": { "type": "string" } }, "send_as_id": { "title": "Send As ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "send_attempts": { "title": "Send Attempts", "default": null, "anyOf": [ { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, { "type": "null" } ] }, "sender": { "title": "Sender", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_id": { "title": "Sequence ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_name": { "title": "Sequence Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_subscription_id": { "title": "Sequence Subscription ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "$ref": "#/components/schemas/MessageStatus" }, "subject": { "title": "Subject", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "template_id": { "title": "Template ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "template_name": { "title": "Template Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "thread_id": { "title": "Thread ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "to": { "title": "To", "type": "array", "items": { "type": "string" } }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "bcc", "bulk_email_action_id", "cc", "contact_id", "created_by", "date_created", "date_scheduled", "date_sent", "date_updated", "direction", "followup_sequence_add_cc_bcc", "followup_sequence_delay", "has_reply", "id", "in_reply_to_id", "lead_id", "message_ids", "need_smtp_credentials", "opens_summary", "organization_id", "references", "send_as_id", "sender", "status", "subject", "template_id", "thread_id", "to", "updated_by", "user_id", "users" ] }, "EmailOpen": { "title": "EmailOpen", "type": "object", "properties": { "ip_address": { "title": "Ip Address", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "opened_at": { "title": "Opened At", "type": "string", "format": "date-time" }, "opened_by": { "title": "Opened By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_agent": { "title": "User Agent", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "ip_address", "opened_at", "opened_by", "user_agent" ] }, "EmailPreview": { "title": "EmailPreview", "type": "object", "properties": { "bcc": { "title": "BCC", "type": "array", "items": { "type": "string" } }, "body_preview": { "title": "Body Preview", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cc": { "title": "CC", "type": "array", "items": { "type": "string" } }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_sent": { "title": "Date Sent", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "direction": { "$ref": "#/components/schemas/CommunicationDirection" }, "envelope": { "anyOf": [ { "$ref": "#/components/schemas/EmailEnvelope" }, { "type": "null" } ] }, "has_attachments": { "title": "Has Attachments", "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "id": { "title": "ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "opens_summary": { "title": "Opens Summary", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "send_as_id": { "title": "Send As ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sender": { "title": "Sender", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "$ref": "#/components/schemas/MessageStatus" }, "subject": { "title": "Subject", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "to": { "title": "To", "type": "array", "items": { "type": "string" } }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "bcc", "body_preview", "cc", "date_created", "date_sent", "date_updated", "direction", "envelope", "has_attachments", "id", "opens_summary", "send_as_id", "sender", "status", "subject", "to", "user_id" ] }, "EmailThreadActivity": { "title": "EmailThreadActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "comment_summary": { "title": "Comment Summary", "anyOf": [ { "$ref": "#/components/schemas/CommentSummary" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "emails": { "title": "Emails", "type": "array", "items": { "$ref": "#/components/schemas/EmailInThread" } }, "id": { "title": "ID", "type": "string" }, "importance": { "title": "Importance", "anyOf": [ { "$ref": "#/components/schemas/ImportantEmailThread" }, { "$ref": "#/components/schemas/NotImportantEmailThread" } ] }, "latest_emails": { "title": "Latest Emails", "type": "array", "items": { "$ref": "#/components/schemas/EmailPreview" } }, "latest_normalized_subject": { "title": "Latest Normalized Subject", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "n_emails": { "title": "Number of Emails", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "participants": { "title": "Participants", "type": "array", "items": { "$ref": "#/components/schemas/EmailIdentity" } }, "summary": { "title": "Summary", "anyOf": [ { "$ref": "#/components/schemas/EmailThreadSummary" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "id", "latest_normalized_subject", "lead_id", "n_emails", "organization_id", "updated_by", "user_id", "users" ] }, "EmailThreadSummary": { "title": "EmailThreadSummary", "type": "object", "properties": { "expired_at": { "title": "Expired At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "feedback": { "title": "Feedback", "$ref": "#/components/schemas/EmailThreadSummaryFeedback" }, "generated_at": { "title": "Generated At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "status": { "$ref": "#/components/schemas/SummaryStatus" }, "summary_html": { "title": "Summary HTML", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary_text": { "title": "Summary Text", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" } }, "required": [ "expired_at", "generated_at", "status", "summary_html", "summary_text", "updated_at" ] }, "EmailThreadSummaryFeedback": { "title": "EmailThreadSummaryFeedback", "type": "object", "properties": { "detail": { "title": "Detail", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "given_at": { "title": "Given At", "type": "string", "format": "date-time" }, "rating": { "$ref": "#/components/schemas/SummaryFeedbackRating" } }, "required": [ "detail", "given_at", "rating" ] }, "Form": { "title": "Form", "type": "object", "properties": { "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "field_definitions": { "title": "Field Definitions", "type": "array", "items": { "$ref": "#/components/schemas/FormFieldDefinition" } }, "id": { "title": "ID", "type": "string" }, "is_archived": { "title": "Is Archived", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" } }, "required": [ "date_created", "date_updated", "field_definitions", "id", "is_archived", "name", "organization_id" ] }, "FormFieldChoice": { "title": "FormFieldChoice", "type": "object", "properties": { "label": { "title": "Label", "type": "string" }, "value": { "title": "Value", "type": "string" } }, "required": [ "label", "value" ] }, "FormFieldDefinition": { "title": "FormFieldDefinition", "type": "object", "properties": { "choices": { "title": "Choices", "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/FormFieldChoice" } }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "name": { "title": "Name", "type": "string" }, "type": { "title": "Type", "type": "string" } }, "required": [ "choices", "id", "name", "type" ] }, "FormSubmissionActivity": { "title": "FormSubmissionActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "form_configuration_id": { "title": "Form Configuration ID", "type": "string" }, "form_id": { "title": "Form ID", "type": "string" }, "form_name": { "title": "Form Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "ip_address": { "title": "Ip Address", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "origin": { "title": "Origin", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "source_url": { "title": "Source URL", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "source_url_normalized": { "title": "Source URL Normalized", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } }, "values": { "title": "Values", "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "null" } ] } }, "values_by_name": { "title": "Values By Name", "type": "object", "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "null" } ] } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "form_configuration_id", "form_id", "id", "ip_address", "lead_id", "organization_id", "origin", "source_url", "source_url_normalized", "updated_by", "user_id", "users", "values", "values_by_name" ] }, "Group": { "title": "Group", "type": "object", "properties": { "id": { "title": "ID", "type": "string" }, "members": { "title": "Members", "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/GroupMember" } }, { "type": "null" } ] }, "name": { "title": "Name", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" } }, "required": [ "id", "name", "organization_id" ] }, "GroupMember": { "title": "GroupMember", "type": "object", "properties": { "user_id": { "title": "User ID", "type": "string" } }, "required": [ "user_id" ] }, "ImportUpdateActivity": { "title": "ImportUpdateActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "import_id": { "title": "Import ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "reverted": { "title": "Reverted", "type": "boolean" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "id", "import_id", "lead_id", "organization_id", "reverted", "updated_by", "user_id", "users" ] }, "ImportantEmailThread": { "title": "ImportantEmailThread", "type": "object", "properties": { "reason": { "$ref": "#/components/schemas/ImportantThreadReason" }, "type": { "title": "Type", "type": "string", "const": "important" } }, "required": [ "reason", "type" ] }, "ImportantThreadReason": { "title": "ImportantThreadReason", "type": "string", "enum": [ "manual", "contains-manual-message", "most-recent-communication", "has-response", "whitelisted", "by-default", "unset-initial-default" ] }, "InlineLeadStatusPayload": { "title": "InlineLeadStatusPayload", "description": "Reference to an existing lead status by `id`.", "type": "object", "properties": { "id": { "title": "ID", "description": "ID of an existing lead status.", "type": "string" }, "label": { "title": "Label", "description": "Label of the lead status.", "type": "string" } } }, "IntegrationLink": { "title": "IntegrationLink", "type": "object", "properties": { "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "name": { "title": "Name", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "type": { "$ref": "#/components/schemas/IntegrationLinkType" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "url": { "title": "Url", "type": "string" } }, "required": [ "created_by", "date_created", "date_updated", "id", "name", "organization_id", "type", "updated_by", "url" ] }, "IntegrationLinkType": { "title": "IntegrationLinkType", "type": "string", "enum": [ "lead", "contact", "opportunity" ] }, "Lead": { "title": "Lead", "type": "object", "properties": { "addresses": { "title": "Addresses", "type": "array", "items": { "$ref": "#/components/schemas/LeadAddress" } }, "contact_ids": { "title": "Contact IDs", "type": "array", "items": { "type": "string" } }, "contacts": { "title": "Contacts", "deprecated": true, "type": "array", "items": { "$ref": "#/components/schemas/Contact" } }, "contacts_summary": { "title": "Contacts Summary", "type": "string" }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "description": { "title": "Description", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "display_name": { "title": "Display Name", "type": "string" }, "html_url": { "title": "HTML URL", "type": "string" }, "id": { "title": "ID", "type": "string" }, "integration_links": { "title": "Integration Links", "type": "array", "items": { "$ref": "#/components/schemas/RenderedIntegrationLink" } }, "localtime": { "title": "Localtime", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "name": { "title": "Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "opportunities": { "title": "Opportunities", "deprecated": true, "type": "array", "items": { "$ref": "#/components/schemas/Opportunity" } }, "organization_id": { "title": "Organization ID", "type": "string" }, "primary_address_full": { "title": "Primary Address Full", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "primary_address_summary": { "title": "Primary Address Summary", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "primary_email": { "title": "Primary Email", "anyOf": [ { "$ref": "#/components/schemas/ContactEmail" }, { "type": "null" } ] }, "primary_phone": { "title": "Primary Phone", "anyOf": [ { "$ref": "#/components/schemas/ContactPhone" }, { "type": "null" } ] }, "recent_calls": { "title": "Recent Calls", "type": "array", "items": { "type": "object", "additionalProperties": true } }, "source": { "title": "Source", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status_id": { "title": "Status ID", "type": "string" }, "status_label": { "title": "Status Label", "type": "string" }, "summaries": { "title": "Summaries", "type": "array", "items": { "type": "object", "additionalProperties": true } }, "tasks": { "title": "Tasks", "type": "array", "items": { "type": "object", "additionalProperties": true } }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "url": { "title": "URL", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "contact_ids", "created_by", "date_created", "date_updated", "description", "html_url", "id", "name", "organization_id", "status_id", "updated_by", "url" ] }, "LeadAddress": { "title": "LeadAddress", "type": "object", "properties": { "address_1": { "title": "Address 1", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "address_2": { "title": "Address 2", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "city": { "title": "City", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "country": { "title": "Country", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "label": { "title": "Label", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "state": { "title": "State", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "tz_ids": { "title": "TZ IDs", "type": "array", "items": { "type": "string" } }, "zipcode": { "title": "Zipcode", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "address_1", "address_2", "city", "country", "label", "state", "zipcode" ] }, "LeadMergeActivity": { "title": "LeadMergeActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "destination_display_name": { "title": "Destination Display Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "destination_lead_id": { "title": "Destination Lead ID", "type": "string" }, "error_message": { "title": "Error Message", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "merge_status": { "$ref": "#/components/schemas/LeadMergeStatus" }, "organization_id": { "title": "Organization ID", "type": "string" }, "source_display_name": { "title": "Source Display Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "source_lead_id": { "title": "Source Lead ID", "type": "string" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "destination_display_name", "destination_lead_id", "error_message", "id", "lead_id", "merge_status", "organization_id", "source_display_name", "source_lead_id", "updated_by", "user_id", "users" ] }, "LeadMergeStatus": { "title": "LeadMergeStatus", "type": "string", "enum": [ "pending", "in_progress", "completed", "errored" ] }, "LeadStatusChangeActivity": { "title": "LeadStatusChangeActivity", "type": "object", "properties": { "_paused_subscriptions": { "title": "Paused Subscriptions", "type": "array", "items": { "$ref": "#/components/schemas/PausedSubscription" } }, "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "new_status_id": { "title": "New Status ID", "type": "string" }, "new_status_label": { "title": "New Status Label", "type": "string" }, "old_status_id": { "title": "Old Status ID", "type": "string" }, "old_status_label": { "title": "Old Status Label", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "id", "lead_id", "new_status_id", "old_status_id", "organization_id", "updated_by", "user_id", "users" ] }, "MeetingActivity": { "title": "MeetingActivity", "type": "object", "properties": { "_paused_subscriptions": { "title": "Paused Subscriptions", "type": "array", "items": { "$ref": "#/components/schemas/MeetingPausedSubscription" } }, "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "actual_duration": { "title": "Actual Duration", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "attached_call_ids": { "title": "Attached Call IDs", "type": "array", "items": { "type": "string" } }, "attendees": { "title": "Attendees", "type": "array", "items": { "$ref": "#/components/schemas/MeetingAttendee" } }, "calendar_event_link": { "title": "Calendar Event Link", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "calendar_event_uids": { "title": "Calendar Event UIDs", "type": "array", "items": { "type": "string" } }, "comment_summary": { "title": "Comment Summary", "anyOf": [ { "$ref": "#/components/schemas/CommentSummary" }, { "type": "null" } ] }, "conference_links": { "title": "Conference Links", "type": "array", "items": { "$ref": "#/components/schemas/MeetingConferenceLink" } }, "connected_account_id": { "title": "Connected Account ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "conversation_type_id": { "title": "Conversation Type ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "conversation_type_reason": { "anyOf": [ { "$ref": "#/components/schemas/PlaybookReason" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "duration": { "title": "Duration", "type": "integer" }, "ends_at": { "title": "Ends At", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "integrations": { "title": "Integrations", "type": "array", "items": { "type": "object", "additionalProperties": true } }, "is_recurring": { "title": "Is Recurring", "type": "boolean" }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "location": { "title": "Location", "type": "string" }, "note": { "title": "Note", "type": "string" }, "notetaker_id": { "title": "Notetaker ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "outcome_autofill_confidence": { "anyOf": [ { "$ref": "#/components/schemas/OutcomeAutofillConfidence" }, { "type": "null" } ] }, "outcome_autofill_reasoning": { "title": "Outcome Autofill Reasoning", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "outcome_id": { "title": "Outcome ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "outcome_reason": { "anyOf": [ { "$ref": "#/components/schemas/OutcomeReason" }, { "type": "null" } ] }, "playbook_id": { "title": "Playbook ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "playbook_reason": { "anyOf": [ { "$ref": "#/components/schemas/PlaybookReason" }, { "type": "null" } ] }, "provider_calendar_event_id": { "title": "Provider Calendar Event ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "provider_calendar_ids": { "title": "Provider Calendar IDs", "type": "array", "items": { "type": "string" } }, "provider_calendar_type": { "anyOf": [ { "$ref": "#/components/schemas/ProviderCalendarType" }, { "type": "null" } ] }, "source": { "$ref": "#/components/schemas/MeetingSource" }, "starts_at": { "title": "Starts At", "type": "string", "format": "date-time" }, "status": { "anyOf": [ { "$ref": "#/components/schemas/MeetingStatus" }, { "type": "null" } ] }, "summary": { "anyOf": [ { "$ref": "#/components/schemas/MeetingSummary" }, { "type": "null" } ] }, "title": { "title": "Title", "type": "string" }, "transcripts": { "title": "Transcripts", "type": "array", "items": { "anyOf": [ { "$ref": "#/components/schemas/MeetingTranscript" }, { "type": "null" } ] } }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_note": { "title": "User Note", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_note_date_updated": { "title": "User Note Date Updated", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "user_note_html": { "title": "User Note Html", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_note_mentions": { "title": "User Note Mentions", "type": "array", "items": { "type": "string" } }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "actual_duration", "attached_call_ids", "attendees", "calendar_event_link", "calendar_event_uids", "conference_links", "connected_account_id", "contact_id", "conversation_type_id", "conversation_type_reason", "created_by", "date_created", "date_updated", "duration", "ends_at", "id", "integrations", "is_recurring", "lead_id", "location", "note", "notetaker_id", "organization_id", "outcome_autofill_confidence", "outcome_autofill_reasoning", "outcome_id", "outcome_reason", "playbook_id", "playbook_reason", "provider_calendar_event_id", "provider_calendar_ids", "provider_calendar_type", "source", "starts_at", "status", "summary", "title", "updated_by", "user_id", "user_note", "user_note_date_updated", "user_note_html", "user_note_mentions", "users" ] }, "MeetingAttendee": { "title": "MeetingAttendee", "type": "object", "properties": { "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "email": { "title": "Email", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "is_organizer": { "title": "Is Organizer", "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "name": { "title": "Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "title": "Status", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "contact_id", "email", "is_organizer", "name", "status", "user_id" ] }, "MeetingConferenceLink": { "title": "MeetingConferenceLink", "type": "object", "properties": { "type": { "$ref": "#/components/schemas/ConferenceLinkType" }, "url": { "title": "URL", "type": "string" } }, "required": [ "type", "url" ] }, "MeetingPausedSubscription": { "title": "MeetingPausedSubscription", "type": "object", "properties": { "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "contact_name": { "title": "Contact Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "sequence_id": { "title": "Sequence ID", "type": "string" }, "sequence_name": { "title": "Sequence Name", "type": "string" }, "sequence_status": { "title": "Sequence Status", "type": "string" } }, "required": [ "contact_id", "contact_name", "id", "sequence_id", "sequence_name", "sequence_status" ] }, "MeetingSource": { "title": "MeetingSource", "type": "string", "enum": [ "calendar", "manual" ] }, "MeetingStatus": { "title": "MeetingStatus", "type": "string", "enum": [ "upcoming", "in-progress", "completed", "canceled", "declined-by-org", "declined-by-lead" ] }, "MeetingSummary": { "title": "MeetingSummary", "type": "object", "properties": { "html": { "title": "Html", "type": "string" }, "text": { "title": "Text", "type": "string" } }, "required": [ "html", "text" ] }, "MeetingTranscript": { "title": "MeetingTranscript", "type": "object", "properties": { "has_speaker_labels": { "title": "Has Speaker Labels", "type": "boolean" }, "id": { "title": "ID", "type": "string" }, "speakers": { "title": "Speakers", "type": "array", "items": { "$ref": "#/components/schemas/MeetingTranscriptSpeaker" } }, "summary_html": { "title": "Summary Html", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "summary_text": { "title": "Summary Text", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "utterances": { "title": "Utterances", "type": "array", "items": { "$ref": "#/components/schemas/MeetingTranscriptUtterance" } } }, "required": [ "has_speaker_labels", "id", "speakers", "summary_text", "utterances" ] }, "MeetingTranscriptSpeaker": { "title": "MeetingTranscriptSpeaker", "type": "object", "properties": { "speaker_label": { "title": "Speaker Label", "type": "string" }, "speaker_side": { "anyOf": [ { "$ref": "#/components/schemas/SpeakerSide" }, { "type": "null" } ] }, "talk_percentage": { "title": "Talk Percentage", "type": "number" }, "talk_time": { "title": "Talk Time", "type": "number" } }, "required": [ "speaker_label", "speaker_side", "talk_percentage", "talk_time" ] }, "MeetingTranscriptUtterance": { "title": "MeetingTranscriptUtterance", "type": "object", "properties": { "end": { "title": "End", "type": "number" }, "speaker_label": { "title": "Speaker Label", "type": "string" }, "speaker_side": { "anyOf": [ { "$ref": "#/components/schemas/SpeakerSide" }, { "type": "null" } ] }, "start": { "title": "Start", "type": "number" }, "text": { "title": "Text", "type": "string" }, "words": { "title": "Words", "type": "array", "items": { "$ref": "#/components/schemas/MeetingTranscriptWord" } } }, "required": [ "end", "speaker_label", "speaker_side", "start", "text" ] }, "MeetingTranscriptWord": { "title": "MeetingTranscriptWord", "type": "object", "properties": { "end": { "title": "End", "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "start": { "title": "Start", "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "text": { "title": "Text", "type": "string" } }, "required": [ "end", "start", "text" ] }, "Membership": { "title": "Membership", "description": "Editable settings for an organization membership.", "type": "object", "properties": { "auto_record_calls": { "description": "Whether this member's calls are automatically recorded. Starts as `unset` and can be set to `enabled` or `disabled`.", "$ref": "#/components/schemas/AutoRecordCalls" }, "default_caller_id": { "title": "Default Caller ID", "description": "ID of the phone number to use as this member's default outbound caller ID.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "hangup_recording_url": { "title": "Hangup Recording URL", "description": "URL of the audio file used as this member's voicemail drop recording.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "may_workflows_impersonate": { "title": "May Workflows Impersonate", "description": "Whether Workflows may send emails on this member's behalf.", "type": "boolean" }, "role_id": { "title": "Role ID", "description": "One of `admin`, `superuser`, `user`, or `restricteduser` for the corresponding predefined role, or the ID of a custom [Role](https://developer.close.com/api/resources/roles).", "type": "string" }, "track_email_opens": { "title": "Track Email Opens", "description": "Whether email opens are tracked for emails this member sends.", "type": "boolean" } }, "additionalProperties": false }, "MessageStatus": { "title": "MessageStatus", "description": "Status of a message, such as Email or SMS.", "type": "string", "enum": [ "inbox", "draft", "scheduled", "outbox", "sent", "error" ] }, "NotImportantEmailThread": { "title": "NotImportantEmailThread", "type": "object", "properties": { "reason": { "$ref": "#/components/schemas/NotImportantThreadReason" }, "type": { "title": "Type", "type": "string", "const": "not_important" } }, "required": [ "reason", "type" ] }, "NotImportantThreadReason": { "title": "NotImportantThreadReason", "type": "string", "enum": [ "manual", "scheduling-emails", "automated-outbound", "marketing-or-transactional", "by-default" ] }, "NotificationResolution": { "title": "NotificationResolution", "type": "string", "enum": [ "abandoned", "skipped" ] }, "Opportunity": { "title": "Opportunity", "type": "object", "properties": { "annualized_expected_value": { "title": "Annualized Expected Value", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "annualized_value": { "title": "Annualized Value", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "attachments": { "title": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, "comment_summary": { "title": "Comment Summary", "anyOf": [ { "$ref": "#/components/schemas/CommentSummary" }, { "type": "null" } ] }, "confidence": { "title": "Confidence", "type": "integer" }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "contact_name": { "title": "Contact Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_lost": { "title": "Date Lost", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "date_won": { "title": "Date Won", "anyOf": [ { "type": "string", "format": "date" }, { "type": "null" } ] }, "expected_value": { "title": "Expected Value", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "integration_links": { "title": "Integration Links", "type": "array", "items": { "$ref": "#/components/schemas/RenderedIntegrationLink" } }, "is_stalled": { "title": "Is Stalled", "type": "boolean" }, "lead_id": { "title": "Lead ID", "type": "string" }, "lead_name": { "title": "Lead Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_primary_email": { "title": "Lead Primary Email", "anyOf": [ { "$ref": "#/components/schemas/ContactEmail" }, { "type": "null" } ] }, "lead_primary_phone": { "title": "Lead Primary Phone", "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/ContactPhone" } }, { "type": "null" } ] }, "note": { "title": "Note", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "note_html": { "title": "Note Html", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "pipeline_id": { "title": "Pipeline ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "pipeline_name": { "title": "Pipeline Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "stall_status": { "title": "Stall Status", "anyOf": [ { "$ref": "#/components/schemas/StalledOpportunityActionItems" }, { "type": "null" } ] }, "status_display_name": { "title": "Status Display Name", "type": "string" }, "status_id": { "title": "Status ID", "type": "string" }, "status_label": { "title": "Status Label", "type": "string" }, "status_type": { "title": "Status Type", "$ref": "#/components/schemas/OpportunityStatusType" }, "suggested_action": { "title": "Suggested Action", "anyOf": [ { "$ref": "#/components/schemas/OpportunitySuggestedAction" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "type": "string" }, "user_name": { "title": "User Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value": { "title": "Value", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "value_currency": { "title": "Value Currency", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value_formatted": { "title": "Value Formatted", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value_period": { "$ref": "#/components/schemas/OpportunityValuePeriod" } }, "required": [ "annualized_expected_value", "annualized_value", "confidence", "contact_id", "created_by", "date_created", "date_lost", "date_updated", "date_won", "expected_value", "id", "lead_id", "note", "note_html", "organization_id", "status_id", "updated_by", "user_id", "value", "value_period" ] }, "OpportunityAdjustCloseDateActionDetails": { "title": "OpportunityAdjustCloseDateActionDetails", "type": "object", "properties": { "close_date": { "title": "Close Date", "type": "string", "format": "date" } }, "required": [ "close_date" ] }, "OpportunityChangeStatusActionDetails": { "title": "OpportunityChangeStatusActionDetails", "type": "object", "properties": { "status_id": { "title": "Status ID", "type": "string" } }, "required": [ "status_id" ] }, "OpportunityFollowUpCallActionDetails": { "title": "OpportunityFollowUpCallActionDetails", "type": "object", "properties": { "call_plan": { "title": "Call Plan", "type": "string" }, "contact_id": { "title": "Contact ID", "type": "string" } }, "required": [ "call_plan", "contact_id" ] }, "OpportunityFollowUpEmailActionDetails": { "title": "OpportunityFollowUpEmailActionDetails", "type": "object", "properties": { "contact_id": { "title": "Contact ID", "type": "string" }, "message_draft": { "title": "Message Draft", "type": "string" }, "subject_draft": { "title": "Subject Draft", "type": "string" } }, "required": [ "contact_id", "message_draft", "subject_draft" ] }, "OpportunityFollowUpSMSActionDetails": { "title": "OpportunityFollowUpSMSActionDetails", "type": "object", "properties": { "contact_id": { "title": "Contact ID", "type": "string" }, "message_draft": { "title": "Message Draft", "type": "string" } }, "required": [ "contact_id", "message_draft" ] }, "OpportunityStatusChangeActivity": { "title": "OpportunityStatusChangeActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "new_pipeline_id": { "title": "New Pipeline ID", "type": "string" }, "new_pipeline_name": { "title": "New Pipeline Name", "type": "string" }, "new_status_id": { "title": "New Status ID", "type": "string" }, "new_status_label": { "title": "New Status Label", "type": "string" }, "new_status_type": { "title": "New Status Type", "$ref": "#/components/schemas/OpportunityStatusType" }, "old_pipeline_id": { "title": "Old Pipeline ID", "type": "string" }, "old_pipeline_name": { "title": "Old Pipeline Name", "type": "string" }, "old_status_id": { "title": "Old Status ID", "type": "string" }, "old_status_label": { "title": "Old Status Label", "type": "string" }, "old_status_type": { "title": "Old Status Type", "$ref": "#/components/schemas/OpportunityStatusType" }, "opportunity_confidence": { "title": "Opportunity Confidence", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "opportunity_date_won": { "title": "Opportunity Date Won", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "opportunity_id": { "title": "Opportunity ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "opportunity_value": { "title": "Opportunity Value", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "opportunity_value_currency": { "title": "Opportunity Value Currency", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "opportunity_value_formatted": { "title": "Opportunity Value Formatted", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "opportunity_value_period": { "title": "Opportunity Value Period", "anyOf": [ { "$ref": "#/components/schemas/OpportunityValuePeriod" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "id", "lead_id", "new_status_id", "old_status_id", "opportunity_id", "organization_id", "updated_by", "user_id", "users" ] }, "OpportunityStatusType": { "title": "OpportunityStatusType", "type": "string", "enum": [ "won", "lost", "active" ] }, "OpportunitySuggestedAction": { "title": "OpportunitySuggestedAction", "type": "object", "properties": { "action": { "$ref": "#/components/schemas/StalledOpportunityActionTypeV2" }, "details": { "title": "Details", "anyOf": [ { "$ref": "#/components/schemas/OpportunityChangeStatusActionDetails" }, { "$ref": "#/components/schemas/OpportunityFollowUpEmailActionDetails" }, { "$ref": "#/components/schemas/OpportunityFollowUpSMSActionDetails" }, { "$ref": "#/components/schemas/OpportunityFollowUpCallActionDetails" }, { "$ref": "#/components/schemas/OpportunityAdjustCloseDateActionDetails" }, { "type": "null" } ] }, "justification": { "title": "Justification", "type": "string" } }, "required": [ "action", "details", "justification" ] }, "OpportunityValuePeriod": { "title": "OpportunityValuePeriod", "type": "string", "enum": [ "one_time", "monthly", "annual" ] }, "Organization": { "title": "Organization", "description": "Editable organization settings.", "type": "object", "properties": { "currency": { "title": "Currency", "description": "Default currency as a three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.", "type": "string" }, "enable_unsubscribe_link": { "title": "Enable Unsubscribe Link", "description": "Enable the unsubscribe link by default in new email templates.", "type": "boolean" }, "lead_statuses": { "title": "Lead Statuses", "description": "The organization's lead statuses. Provide the full list in the desired order to reorder them.", "type": "array", "maxItems": 1000, "items": { "$ref": "#/components/schemas/InlineLeadStatusPayload" } }, "name": { "title": "Name", "description": "The organization's name.", "type": "string", "minLength": 1 }, "require_unsubscribe_link": { "title": "Require Unsubscribe Link", "description": "Require an unsubscribe link in Bulk Emails and Workflows.", "type": "boolean" } }, "additionalProperties": false }, "Outcome": { "title": "Outcome", "type": "object", "properties": { "applies_to": { "title": "Applies To", "type": "array", "items": { "$ref": "#/components/schemas/OutcomeAppliesTo" } }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "description": { "title": "Description", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "name": { "title": "Name", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "type": { "$ref": "#/components/schemas/OutcomeType" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "applies_to", "created_by", "date_created", "date_updated", "description", "id", "name", "organization_id", "type", "updated_by" ] }, "OutcomeAppliesTo": { "title": "OutcomeAppliesTo", "type": "string", "enum": [ "calls", "meetings" ] }, "OutcomeAutofillConfidence": { "title": "OutcomeAutofillConfidence", "type": "string", "enum": [ "low", "medium", "high" ] }, "OutcomeReason": { "title": "OutcomeReason", "type": "string", "enum": [ "autofilled", "user-selected", "voicemail-dropped" ] }, "OutcomeType": { "title": "OutcomeType", "type": "string", "enum": [ "vm-dropped", "custom" ] }, "PausedSubscription": { "title": "PausedSubscription", "type": "object", "properties": { "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "contact_name": { "title": "Contact Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "sequence_id": { "title": "Sequence ID", "type": "string" }, "sequence_name": { "title": "Sequence Name", "type": "string" }, "sequence_status": { "title": "Sequence Status", "type": "string" } }, "required": [ "contact_id", "contact_name", "id", "sequence_id", "sequence_name", "sequence_status" ] }, "PhoneActivityDirection": { "title": "PhoneActivityDirection", "description": "Direction of a phone activity, such as a call or an SMS message.", "type": "string", "enum": [ "inbound", "outbound" ] }, "PhoneActivitySource": { "title": "PhoneActivitySource", "description": "Source of a phone activity. Describes whether the phone activity (such as a call or an SMS) was handled by Close's telephony provider or handled externally by a 3rd party and is merely logged in Close.", "type": "string", "enum": [ "Close.io", "External" ] }, "PhoneNumber": { "title": "PhoneNumber", "type": "object", "properties": { "address_id": { "title": "Address ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "bundle_id": { "title": "Bundle ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "carrier": { "anyOf": [ { "$ref": "#/components/schemas/UnderlyingCarrier" }, { "type": "null" } ] }, "carrier_type": { "anyOf": [ { "$ref": "#/components/schemas/CarrierNumberType" }, { "type": "null" } ] }, "country": { "title": "Country", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "forward_to": { "title": "Forward To", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "forward_to_enabled": { "title": "Forward To Enabled", "type": "boolean" }, "forward_to_formatted": { "title": "Forward To Formatted", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "inbound_ring_duration": { "title": "Inbound Ring Duration", "description": "Number of seconds we ring this number on inbound calls before moving on (e.g. to voicemail). `null` means the default of 30 seconds is used.", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "is_group_number": { "title": "Is Group Number", "description": "Deprecated. The distinction between personal and group numbers is being removed, and `is_group_number` will be removed in a future update.", "deprecated": true, "type": "boolean" }, "is_premium": { "title": "Is Premium", "type": "boolean" }, "is_verified": { "title": "Is Verified", "type": "boolean" }, "label": { "title": "Label", "type": "string" }, "last_billed_price": { "title": "Last Billed Price", "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "mms_enabled": { "title": "Mms Enabled", "type": "boolean" }, "next_billing_on": { "title": "Next Billing On", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "number": { "title": "Number", "type": "string" }, "number_formatted": { "title": "Number Formatted", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "participants": { "title": "Participants", "type": "array", "items": { "type": "string" } }, "phone_numbers": { "title": "Phone Numbers", "type": "array", "items": { "type": "string" } }, "phone_numbers_formatted": { "title": "Phone Numbers Formatted", "type": "array", "items": { "type": "string" } }, "press_1_to_accept": { "title": "Press 1 To Accept", "type": "boolean" }, "sms_enabled": { "title": "SMS Enabled", "type": "boolean" }, "supports_mms_to_countries": { "title": "Supports Mms To Countries", "type": "array", "items": { "type": "string" } }, "supports_sms_to_countries": { "title": "Supports SMS To Countries", "type": "array", "items": { "type": "string" } }, "type": { "$ref": "#/components/schemas/PhoneNumberType" }, "user_id": { "title": "User ID", "description": "Deprecated. Set to the sole member's user ID for single-member numbers, otherwise `null`. `user_id` will be removed in a future update.", "deprecated": true, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "voicemail_greeting_url": { "title": "Voicemail Greeting URL", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "was_ported": { "title": "Was Ported", "type": "boolean" } }, "required": [ "address_id", "bundle_id", "carrier", "carrier_type", "country", "date_created", "date_updated", "id", "is_group_number", "is_premium", "is_verified", "label", "last_billed_price", "mms_enabled", "next_billing_on", "number", "number_formatted", "organization_id", "sms_enabled", "supports_mms_to_countries", "supports_sms_to_countries", "type", "user_id" ] }, "PhoneNumberSharing": { "title": "PhoneNumberSharing", "type": "string", "enum": [ "personal", "group" ] }, "PhoneNumberType": { "title": "PhoneNumberType", "type": "string", "enum": [ "internal", "external", "virtual" ] }, "Playbook": { "title": "Playbook", "type": "object", "properties": { "archived_at": { "title": "Archived At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "archived_by_id": { "title": "Archived By ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_at": { "title": "Created At", "type": "string", "format": "date-time" }, "created_by_id": { "title": "Created By ID", "type": "string" }, "custom_field_ids": { "title": "Custom Field IDs", "type": "array", "items": { "type": "string" } }, "description": { "title": "Description", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "name": { "title": "Name", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "outcome_ids": { "title": "Outcome IDs", "type": "array", "items": { "type": "string" } }, "position": { "title": "Position", "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "summary_guidance": { "title": "Summary Guidance", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_at": { "title": "Updated At", "type": "string", "format": "date-time" }, "updated_by_id": { "title": "Updated By ID", "type": "string" } }, "required": [ "archived_at", "archived_by_id", "created_at", "created_by_id", "custom_field_ids", "description", "id", "name", "organization_id", "outcome_ids", "position", "summary_guidance", "updated_at", "updated_by_id" ] }, "PlaybookReason": { "title": "PlaybookReason", "type": "string", "enum": [ "user-selected", "autodetected" ] }, "ProviderCalendarType": { "title": "ProviderCalendarType", "type": "string", "enum": [ "google", "microsoft" ] }, "QuotedEmailHTML": { "title": "QuotedEmailHTML", "type": "object", "properties": { "expand": { "title": "Expand", "type": "boolean" }, "html": { "title": "HTML", "type": "string" } }, "required": [ "expand", "html" ] }, "QuotedEmailText": { "title": "QuotedEmailText", "type": "object", "properties": { "expand": { "title": "Expand", "type": "boolean" }, "text": { "title": "Text", "type": "string" } }, "required": [ "expand", "text" ] }, "RenderedIntegrationLink": { "title": "RenderedIntegrationLink", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "url": { "title": "Url", "type": "string" } }, "required": [ "name", "url" ] }, "RunFieldEnrichment": { "title": "RunFieldEnrichment", "type": "object", "properties": { "field_id": { "title": "Field ID", "type": "string" }, "object_id": { "title": "Object ID", "type": "string" }, "object_type": { "title": "Object Type", "type": "string", "enum": [ "lead", "contact" ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "overwrite_existing_value": { "title": "Overwrite Existing Value", "type": "boolean", "default": false }, "set_new_value": { "title": "Set New Value", "type": "boolean", "default": true } }, "required": [ "field_id", "object_id", "object_type", "organization_id" ], "additionalProperties": false }, "SMSActivity": { "title": "SMSActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "agent_action_reason": { "title": "Agent Action Reason", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "agent_config_id": { "title": "Agent Config ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "cost": { "title": "Cost", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_scheduled": { "title": "Date Scheduled", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_sent": { "title": "Date Sent", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "direction": { "$ref": "#/components/schemas/PhoneActivityDirection" }, "error_message": { "title": "Error Message", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "local_country_iso": { "title": "Local Country Iso", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "local_phone": { "title": "Local Phone", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "local_phone_formatted": { "title": "Local Phone Formatted", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "remote_country_iso": { "title": "Remote Country Iso", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "remote_phone": { "title": "Remote Phone", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "remote_phone_formatted": { "title": "Remote Phone Formatted", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_id": { "title": "Sequence ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_name": { "title": "Sequence Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_subscription_id": { "title": "Sequence Subscription ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "source": { "$ref": "#/components/schemas/PhoneActivitySource" }, "status": { "$ref": "#/components/schemas/MessageStatus" }, "template_id": { "title": "Template ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "text": { "title": "Text", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "cost", "created_by", "date_created", "date_scheduled", "date_sent", "date_updated", "direction", "error_message", "id", "lead_id", "local_country_iso", "local_phone", "local_phone_formatted", "organization_id", "remote_country_iso", "remote_phone", "remote_phone_formatted", "source", "status", "template_id", "text", "updated_by", "user_id", "users" ] }, "SMSTemplateStatus": { "title": "SMSTemplateStatus", "type": "string", "enum": [ "active", "archived" ] }, "SavedSearch": { "title": "SavedSearch", "type": "object", "properties": { "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "description": { "title": "Description", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "title": "ID", "type": "string" }, "is_shared": { "title": "Is Shared", "type": "boolean" }, "is_user_dependent": { "title": "Is User Dependent", "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "name": { "title": "Name", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "query": { "title": "Query", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "s_query": { "title": "S Query", "anyOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "selected_fields": { "title": "Selected Fields", "default": null, "anyOf": [ { "type": "array", "items": { "type": "object", "additionalProperties": true } }, { "type": "null" } ] }, "shared_with": { "title": "Shared With", "default": null, "anyOf": [ { "type": "array", "items": { "type": "string" } }, { "type": "null" } ] }, "sharing_settings": { "default": null, "anyOf": [ { "$ref": "#/components/schemas/SharingSettingsEmbeddedResponse" }, { "type": "null" } ] }, "type": { "$ref": "#/components/schemas/SavedSearchType" }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "date_created", "date_updated", "description", "id", "is_shared", "is_user_dependent", "name", "organization_id", "query", "s_query", "type", "user_id" ] }, "SavedSearchType": { "title": "SavedSearchType", "type": "string", "enum": [ "lead", "contact", "opportunity", "call", "email", "sms", "meeting", "note", "whatsapp_message", "custom_activity", "form_submission" ] }, "SetPinnedSavedView": { "title": "SetPinnedSavedView", "type": "object", "properties": { "saved_view_ids": { "title": "Saved View IDs", "type": "array", "items": { "type": "string" } } }, "required": [ "saved_view_ids" ], "additionalProperties": false }, "SharingSettingsEmbeddedResponse": { "title": "SharingSettingsEmbeddedResponse", "type": "object", "properties": { "created_at": { "title": "Created At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "created_by_id": { "title": "Created By ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "group_ids": { "title": "Group IDs", "type": "array", "items": { "type": "string" } }, "updated_at": { "title": "Updated At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "updated_by_id": { "title": "Updated By ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_ids": { "title": "User IDs", "type": "array", "items": { "type": "string" } }, "whole_org": { "title": "Whole Org", "type": "boolean" } }, "required": [ "created_at", "created_by_id", "group_ids", "updated_at", "updated_by_id", "user_ids", "whole_org" ] }, "SpeakerSide": { "title": "SpeakerSide", "type": "string", "enum": [ "contact", "close-user", "voice-agent" ] }, "StalledOpportunityActionItems": { "title": "StalledOpportunityActionItems", "deprecated": true, "type": "object", "properties": { "communication_issue": { "description": "The communication issue that is causing the stalled opportunity. If there is no issue, set to NoIssue.", "$ref": "#/components/schemas/StalledOpportunityCommunicationIssue" }, "next_action": { "description": "An action item recommended to progress or resolve the stalled opportunity.", "$ref": "#/components/schemas/ActionItem" } }, "required": [ "communication_issue", "next_action" ] }, "StalledOpportunityActionTypeV1": { "title": "StalledOpportunityActionTypeV1", "type": "string", "enum": [ "mark_as_lost", "change_status", "follow_up", "adjust_close_date", "ask_someone_else_to_reach_out", "change_communication_method" ] }, "StalledOpportunityActionTypeV2": { "title": "StalledOpportunityActionTypeV2", "type": "string", "enum": [ "change_status", "adjust_close_date", "follow_up_email", "follow_up_call", "follow_up_sms" ] }, "StalledOpportunityCommunicationIssue": { "title": "StalledOpportunityCommunicationIssue", "type": "string", "enum": [ "no_issue", "cant_get_in_touch", "no_communication_attempts" ] }, "StatusReason": { "title": "StatusReason", "description": "Reason for each higher level status on a Workflow run.", "type": "string", "enum": [ "manual", "pending-call-timed-out", "bulk-action", "rate-limited", "sequence-deleted", "workflow-paused", "filter-not-matched", "insufficient-ai-credit-balance", "reply-received", "call-answered", "meeting-booked", "lead-status-changed", "outcome-met", "account-invalid", "account-failures", "sending-throttled-too-long", "membership-inactive", "send-as-error", "email-bounced", "call-failed", "sms-failed", "no-user-phone", "billing-error", "assignment-field-invalid", "lead-status-field-invalid", "assignees-missing", "run-as-disabled", "lead-not-visible", "internal-error", "field-mapping-error", "filter-config-invalid", "email-ai-generation-failed" ] }, "SummaryFeedbackRating": { "title": "SummaryFeedbackRating", "type": "string", "enum": [ "positive", "negative" ] }, "SummaryStatus": { "title": "SummaryStatus", "type": "string", "enum": [ "pending", "success", "failure", "expired" ] }, "TaskCompletedActivity": { "title": "TaskCompletedActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "comment_summary": { "title": "Comment Summary", "anyOf": [ { "$ref": "#/components/schemas/CommentSummary" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "id": { "title": "ID", "type": "string" }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organization_id": { "title": "Organization ID", "type": "string" }, "sequence_id": { "title": "Sequence ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_name": { "title": "Sequence Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_subscription_id": { "title": "Sequence Subscription ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "task_assigned_to": { "title": "Task Assigned To", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "task_assigned_to_name": { "title": "Task Assigned To Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "task_id": { "title": "Task ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "task_text": { "title": "Task Text", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "created_by", "date_created", "date_updated", "id", "lead_id", "organization_id", "task_id", "task_text", "updated_by", "user_id", "users" ] }, "TaskPriority": { "title": "TaskPriority", "type": "string", "enum": [ "high", "medium" ] }, "UnderlyingCarrier": { "title": "UnderlyingCarrier", "type": "string", "enum": [ "twilio", "plivo" ] }, "UpdateBlockedPhoneNumber": { "title": "UpdateBlockedPhoneNumber", "type": "object", "properties": { "reason": { "title": "Reason", "description": "The updated reason for blocking the given phone number.", "type": "string" } }, "required": [ "reason" ], "additionalProperties": false }, "UpdateBlockedPhoneNumberSettings": { "title": "UpdateBlockedPhoneNumberSettings", "type": "object", "properties": { "reject_anonymous_inbound_calls": { "title": "Reject Anonymous Inbound Calls", "type": "boolean" } }, "required": [ "reject_anonymous_inbound_calls" ], "additionalProperties": false }, "UpdateCallActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "contact_id": { "type": [ "null", "string" ] }, "conversation_type_id": { "type": [ "null", "string" ] }, "duration": { "type": [ "integer", "null" ], "maximum": 604800 }, "lead_id": { "type": [ "null", "string" ] }, "note": { "type": [ "null", "string" ] }, "note_html": { "type": [ "null", "string" ] }, "outcome_id": { "type": [ "null", "string" ] }, "phone": { "description": "Phone number in E.164 format", "type": [ "null", "string" ] }, "playbook_id": { "type": [ "null", "string" ] }, "quality_info": { "type": [ "null", "string" ] }, "recording_url": { "type": [ "null", "string" ], "format": "uri" }, "status": { "type": [ "null", "string" ], "enum": [ "created", "in-progress", "completed", "cancel", "no-answer", "busy", "failed", "timeout", null ] }, "user_id": { "type": [ "null", "string" ] }, "voicemail_url": { "type": [ "null", "string" ], "format": "uri" } }, "additionalProperties": false, "patternProperties": { "^custom\\.": { "not": { "type": "object" } } } }, "UpdateCommentThreads": { "title": "UpdateCommentThreads", "type": "object", "properties": { "body": { "title": "Body", "type": "string" } }, "required": [ "body" ], "additionalProperties": false }, "UpdateContact": { "type": "object", "properties": { "emails": { "type": [ "array", "null" ], "maxItems": 100, "items": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "type": { "type": "string" } }, "required": [ "email" ] } }, "lead_id": { "type": [ "null", "string" ] }, "name": { "type": [ "null", "string" ], "maxLength": 1000 }, "phones": { "type": [ "array", "null" ], "maxItems": 100, "items": { "type": "object", "properties": { "phone": { "description": "Phone number in E.164 format", "type": [ "null", "string" ] }, "type": { "type": "string" } } } }, "timezone": { "description": "IANA timezone identifier", "type": [ "null", "string" ] }, "title": { "type": [ "null", "string" ], "maxLength": 1000 }, "urls": { "type": [ "array", "null" ], "maxItems": 100, "items": { "type": "object", "properties": { "type": { "type": "string" }, "url": { "type": "string", "format": "uri" } }, "required": [ "url" ] } } }, "additionalProperties": false, "patternProperties": { "^custom\\.": { "not": { "type": "object" } } } }, "UpdateCustomActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "contact_id": { "type": [ "null", "string" ] }, "pinned": { "type": [ "boolean", "null" ] }, "status": { "type": "string", "enum": [ "draft", "published" ] } }, "additionalProperties": false, "patternProperties": { "^custom\\.": { "not": { "type": "object" } } } }, "UpdateEmailActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "attachments": { "type": [ "array", "null" ], "maxItems": 1000, "items": { "type": "object", "properties": { "content_id": { "type": [ "null", "string" ] }, "content_type": { "type": [ "null", "string" ] }, "filename": { "type": "string" }, "inline_only": { "type": "boolean" }, "size": { "type": "integer" }, "url": { "type": "string", "format": "uri" } }, "required": [ "filename", "size", "url" ] } }, "bcc": { "type": [ "array", "null" ], "maxItems": 500, "items": { "type": "string", "maxLength": 1000 } }, "body_html": { "type": [ "null", "string" ], "maxLength": 1048576 }, "body_text": { "type": [ "null", "string" ], "maxLength": 1048576 }, "cc": { "type": [ "array", "null" ], "maxItems": 500, "items": { "type": "string", "maxLength": 1000 } }, "contact_id": { "type": [ "null", "string" ] }, "email_account_id": { "type": [ "null", "string" ] }, "followup_date": { "type": [ "null", "string" ], "format": "date-time" }, "followup_sequence_add_cc_bcc": { "type": [ "boolean", "null" ] }, "followup_sequence_delay": { "type": [ "integer", "null" ], "minimum": 86400 }, "followup_sequence_id": { "type": [ "null", "string" ] }, "in_reply_to_id": { "type": [ "null", "string" ] }, "opens": { "type": [ "array", "null" ], "items": { "type": "object", "properties": { "opened_at": { "type": "string", "format": "date-time" } }, "required": [ "opened_at" ] } }, "sender": { "type": [ "null", "string" ], "format": "email" }, "status": { "type": "string", "enum": [ "inbox", "draft", "scheduled", "outbox", "sent", "error" ] }, "subject": { "type": [ "null", "string" ], "maxLength": 1000 }, "template_id": { "type": [ "null", "string" ] }, "to": { "type": [ "array", "null" ], "maxItems": 500, "items": { "type": "string", "maxLength": 1000 } }, "user_id": { "type": [ "null", "string" ] } }, "additionalProperties": false }, "UpdateIntegrationLink": { "title": "UpdateIntegrationLink", "type": "object", "properties": { "name": { "title": "Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": { "default": null, "anyOf": [ { "$ref": "#/components/schemas/IntegrationLinkType" }, { "type": "null" } ] }, "url": { "title": "Url", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "UpdateNoteActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "attachments": { "type": [ "array", "null" ], "maxItems": 1000, "items": { "type": "object", "properties": { "content_type": { "type": [ "null", "string" ] }, "filename": { "type": "string" }, "url": { "type": "string", "format": "uri" } }, "required": [ "filename", "url" ] } }, "contact_id": { "type": [ "null", "string" ] }, "note": { "type": [ "null", "string" ] }, "note_html": { "type": [ "null", "string" ] }, "pinned": { "type": [ "boolean", "null" ] }, "title": { "type": [ "null", "string" ] } }, "additionalProperties": false }, "UpdateNotification": { "title": "UpdateNotification", "type": "object", "properties": { "agent_config_id": { "title": "Agent Config ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "assigned_to": { "title": "Assigned To", "type": "string" }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "type": "string" }, "date": { "title": "Date", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] }, "due_date": { "title": "Due Date", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string", "format": "date" } ] }, "is_complete": { "title": "Is Complete", "type": "boolean" }, "is_dateless": { "title": "Is Dateless", "type": "boolean" }, "lead_id": { "title": "Lead ID", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "priority": { "$ref": "#/components/schemas/TaskPriority" }, "resolution": { "anyOf": [ { "$ref": "#/components/schemas/NotificationResolution" }, { "type": "null" } ] }, "text": { "title": "Text", "type": "string" } }, "additionalProperties": false }, "UpdateOpportunity": { "title": "UpdateOpportunity", "type": "object", "properties": { "attachments": { "title": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/AttachmentIn" } }, "confidence": { "title": "Confidence", "type": "integer" }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_won": { "title": "Date Won", "description": "If not set on the resource or in the request, `date_won` will be set automatically to today's date when setting `status_id` to a status with type `won`. The `x-tz-offset` header, used to pass your timezone's UTC offset, will be taken into account.", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "note": { "title": "Note", "description": "Plaintext/markdown version of the note. If `note_html` is also provided in the same request, this value is ignored and `note` is derived from the HTML instead.", "type": "string" }, "note_html": { "title": "Note HTML", "description": "Rich-text HTML version of the note. When set, `note` is automatically populated with the plaintext version (tags become markdown), overriding any `note` value passed in the same request. Pass `null` to clear `note_html`; `note` is cleared as well.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "title": "Status", "type": "string" }, "status_id": { "title": "Status ID", "description": "Setting the `status_id` to a status with a type of `won` will automatically set the `date_won` field if it is not already set or provided in the request. Reverting it from a `won` status to an `active` or `lost` will not automatically change `date_won`.", "type": "string" }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "value": { "title": "Value", "type": "integer" }, "value_period": { "title": "Value Period", "$ref": "#/components/schemas/OpportunityValuePeriod" } }, "additionalProperties": false, "patternProperties": { "^custom\\.": { "not": { "type": "object" } } } }, "UpdateOutcome": { "title": "UpdateOutcome", "type": "object", "properties": { "applies_to": { "title": "Applies To", "description": "Deprecated. This field will be derived from `type` in a future update: `custom` applies to calls and meetings, `vm-dropped` applies to calls only.", "deprecated": true, "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/OutcomeAppliesTo" } }, { "type": "null" } ] }, "description": { "title": "Description", "description": "Explain what the outcome means and when it should be used.", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "title": "Name", "description": "Displayed to users wherever outcomes can be selected.", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": { "description": "Set to `vm-dropped` if this outcome should be automatically set on calls whenever a team member performs a Voicemail Drop. Otherwise, leave empty or explicitly set to `custom` (default).", "default": null, "anyOf": [ { "$ref": "#/components/schemas/OutcomeType" }, { "type": "null" } ] } }, "additionalProperties": false }, "UpdatePhoneNumber": { "title": "UpdatePhoneNumber", "type": "object", "properties": { "forward_to": { "title": "Forward To", "type": "string" }, "forward_to_enabled": { "title": "Forward To Enabled", "type": "boolean" }, "inbound_ring_duration": { "title": "Inbound Ring Duration", "description": "Number of seconds (15-90) to ring this number on inbound calls before moving on (e.g. to voicemail).", "type": "integer", "minimum": 15, "maximum": 90 }, "label": { "title": "Label", "type": "string" }, "participants": { "title": "Participants", "type": "array", "items": { "type": "string" } }, "phone_numbers": { "title": "Phone Numbers", "type": "array", "items": { "type": "string" } }, "press_1_to_accept": { "title": "Press 1 To Accept", "type": "boolean" }, "voicemail_greeting_url": { "title": "Voicemail Greeting URL", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "UpdatePlaybook": { "title": "UpdatePlaybook", "type": "object", "properties": { "custom_field_ids": { "title": "Custom Field IDs", "description": "IDs of [Shared Custom Fields](/api/resources/custom-fields/custom-fields-shared) to associate with this Playbook.", "type": "array", "items": { "type": "string" } }, "description": { "title": "Description", "description": "Description of the playbook.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "title": "Name", "type": "string" }, "outcome_ids": { "title": "Outcome IDs", "description": "IDs of [Outcomes](/api/resources/outcomes/) that should be associated with this Playbook.", "type": "array", "items": { "type": "string" } }, "summary_guidance": { "title": "Summary Guidance", "description": "Guidance for AI summaries of calls and meetings associated with this Playbook.", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "additionalProperties": false }, "UpdateSMSActivity": { "type": "object", "properties": { "activity_at": { "type": [ "null", "string" ], "format": "date-time" }, "attachments": { "type": [ "array", "null" ], "maxItems": 10, "items": { "type": "object", "properties": { "content_type": { "type": "string", "enum": [ "application/pdf", "application/vcard", "audio/3gpp", "audio/3gpp2", "audio/L24", "audio/ac3", "audio/amr", "audio/amr-nb", "audio/basic", "audio/mp4", "audio/mpeg", "audio/ogg", "audio/vnd.rn-realaudio", "audio/vnd.wave", "audio/webm", "image/bmp", "image/gif", "image/jpeg", "image/jpg", "image/png", "image/tiff", "text/calendar", "text/csv", "text/directory", "text/richtext", "text/rtf", "text/vcard", "text/x-vcard", "video/3gpp", "video/3gpp-tt", "video/3gpp2", "video/H261", "video/H263", "video/H263-1998", "video/H263-2000", "video/H264", "video/mp4", "video/mpeg", "video/quicktime", "video/webm" ] }, "filename": { "type": "string" }, "url": { "type": "string" } }, "required": [ "content_type", "filename", "url" ] } }, "contact_id": { "type": [ "null", "string" ] }, "lead_id": { "type": [ "null", "string" ] }, "local_phone": { "description": "Phone number in E.164 format", "type": [ "null", "string" ] }, "remote_phone": { "description": "Phone number in E.164 format", "type": [ "null", "string" ] }, "status": { "type": "string", "enum": [ "inbox", "draft", "scheduled", "outbox", "sent", "error" ] }, "template_id": { "type": [ "null", "string" ] }, "text": { "type": [ "null", "string" ] }, "user_id": { "type": [ "null", "string" ] } }, "additionalProperties": false }, "UpdateSMSTemplate": { "title": "UpdateSMSTemplate", "type": "object", "properties": { "attachments": { "title": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/UpdateSMSTemplateAttachment" } }, "is_shared": { "title": "Is Shared", "type": "boolean" }, "name": { "title": "Name", "type": "string" }, "status": { "title": "Status", "$ref": "#/components/schemas/SMSTemplateStatus" }, "text": { "title": "Text", "type": "string" } }, "additionalProperties": false }, "UpdateSMSTemplateAttachment": { "title": "UpdateSMSTemplateAttachment", "type": "object", "properties": { "content_type": { "title": "Content Type", "type": "string" }, "filename": { "title": "Filename", "type": "string" }, "url": { "title": "Url", "type": "string" } }, "required": [ "content_type", "filename", "url" ] }, "UpdateWebhook": { "title": "UpdateWebhook", "type": "object", "properties": { "events": { "title": "Events", "description": "A list of events to subscribe to. Each event has an `object_type` and an `action` from values in the [event log](https://developer.close.com/api/resources/events/list-of-event-types). You can also use [Webhook Filters](https://developer.close.com/api/resources/webhooks/webhook-filters) while creating your subscription so that an event only fires to a Webhook when certain conditions are met.", "default": null, "anyOf": [ { "type": "array", "items": { "$ref": "#/components/schemas/WebhookSubscriptionEvent" } }, { "type": "null" } ] }, "status": { "default": null, "anyOf": [ { "$ref": "#/components/schemas/WebhookStatus" }, { "type": "null" } ] }, "url": { "title": "Url", "description": "Destination URL for the webhook subscription", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "verify_ssl": { "title": "Verify Ssl", "description": "Verify SSL certificate of destination webhook URL. Set to `false` to disable SSL certificate validation. We recommend using https to protect your data during delivery.", "default": null, "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "additionalProperties": false }, "UpdateWhatsAppMessage": { "title": "UpdateWhatsAppMessage", "type": "object", "properties": { "activity_at": { "title": "Activity At", "type": "string", "format": "date-time" }, "attachments": { "title": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/WhatsAppAttachmentData" } }, "contact_id": { "title": "Contact ID", "type": "string" }, "direction": { "$ref": "#/components/schemas/CommunicationDirection" }, "integration_link": { "title": "Integration Link", "anyOf": [ { "type": "string", "format": "uri", "minLength": 1, "maxLength": 2083 }, { "type": "null" } ] }, "local_phone": { "title": "Local Phone", "type": "string" }, "message_markdown": { "title": "Message Markdown", "type": "string" }, "remote_phone": { "title": "Remote Phone", "type": "string" }, "response_to_id": { "title": "Response To ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "type": "string" } }, "additionalProperties": false }, "UploadFile": { "title": "UploadFile", "type": "object", "properties": { "content_type": { "title": "Content Type", "type": "string" }, "filename": { "title": "Filename", "type": "string" } }, "required": [ "content_type", "filename" ], "additionalProperties": false }, "WebhookStatus": { "title": "WebhookStatus", "type": "string", "enum": [ "active", "paused" ] }, "WebhookSubscriptionEvent": { "title": "WebhookSubscriptionEvent", "type": "object", "properties": { "action": { "title": "Action", "type": "string" }, "extra_filter": { "title": "Extra Filter", "default": null, "anyOf": [ { "type": "object", "additionalProperties": true }, { "type": "null" } ] }, "object_type": { "title": "Object Type", "type": "string" } }, "required": [ "action", "object_type" ] }, "WhatsAppAttachmentData": { "title": "WhatsAppAttachmentData", "type": "object", "properties": { "content_type": { "title": "Content Type", "type": "string" }, "filename": { "title": "Filename", "type": "string" }, "url": { "title": "Url", "type": "string" } }, "required": [ "content_type", "filename", "url" ] }, "WhatsAppMessageActivity": { "title": "WhatsAppMessageActivity", "type": "object", "properties": { "_type": { "title": "Type", "type": "string" }, "activity_at": { "title": "Activity At", "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ] }, "attachments": { "title": "Attachments", "type": "array", "items": { "$ref": "#/components/schemas/Attachment" } }, "contact_id": { "title": "Contact ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by": { "title": "Created By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "created_by_name": { "title": "Created By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "date_created": { "title": "Date Created", "type": "string", "format": "date-time" }, "date_updated": { "title": "Date Updated", "type": "string", "format": "date-time" }, "direction": { "$ref": "#/components/schemas/CommunicationDirection" }, "external_whatsapp_message_id": { "title": "External WhatsApp Message ID", "type": "string" }, "id": { "title": "ID", "type": "string" }, "integration_link": { "title": "Integration Link", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "integration_name": { "title": "Integration Name", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "lead_id": { "title": "Lead ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "local_phone": { "title": "Local Phone", "type": "string" }, "local_phone_formatted": { "title": "Local Phone Formatted", "type": "string" }, "message_html": { "title": "Message HTML", "type": "string" }, "message_markdown": { "title": "Message Markdown", "type": "string" }, "organization_id": { "title": "Organization ID", "type": "string" }, "remote_phone": { "title": "Remote Phone", "type": "string" }, "remote_phone_formatted": { "title": "Remote Phone Formatted", "type": "string" }, "response_to_id": { "title": "Response To ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_id": { "title": "Sequence ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_name": { "title": "Sequence Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sequence_subscription_id": { "title": "Sequence Subscription ID", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "source": { "$ref": "#/components/schemas/CreationSource" }, "text": { "title": "Text", "type": "string" }, "updated_by": { "title": "Updated By", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "updated_by_name": { "title": "Updated By Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_id": { "title": "User ID", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "user_name": { "title": "User Name", "default": null, "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "users": { "title": "Users", "type": "array", "items": { "type": "string" } } }, "required": [ "_type", "activity_at", "contact_id", "created_by", "date_created", "date_updated", "direction", "external_whatsapp_message_id", "id", "integration_link", "integration_name", "lead_id", "local_phone", "local_phone_formatted", "message_html", "message_markdown", "organization_id", "remote_phone", "remote_phone_formatted", "response_to_id", "source", "text", "updated_by", "user_id", "users" ] }, "WorkflowRunStatus": { "title": "WorkflowRunStatus", "type": "string", "enum": [ "active", "paused", "finished", "goal", "error" ] }, "WorkflowStatus": { "title": "WorkflowStatus", "type": "string", "enum": [ "active", "paused", "draft" ] } } } }