Skip to content

Instantly share code, notes, and snippets.

@colmdoyle
Created October 10, 2022 13:11
Show Gist options
  • Save colmdoyle/803c453dd0cb76ba11655aa026c105ac to your computer and use it in GitHub Desktop.
Save colmdoyle/803c453dd0cb76ba11655aa026c105ac to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.0",
"info": {
"title": "Intercom REST API",
"version": "2.2",
"contact": {
"url": "https://developers.intercom.com/building-apps",
"name": "Intercom Developer Hub"
},
"description": "Retrieve information, keep your data in sync, or take actions programmatically through Intercom's API."
},
"servers": [
{
"url": "https://api.intercom.io"
}
],
"paths": {
"/contacts": {
"get": {
"summary": "List all contacts",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactList"
},
"examples": {
"Contact List": {
"value": {
"type": "list",
"data": [
{
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags"
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes"
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies"
}
}
],
"total_count": 436,
"pages": {
"type": "pages",
"next": {
"page": 2,
"starting_after": "WzE1NzEzMTc0NDYwMDAsIjViYTY4MmQyM2Q3Y2Y5MmJlZjg3YmZkNCIsMl0="
},
"page": 1,
"per_page": 1,
"total_pages": 436
}
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
},
"operationId": "get-contacts",
"description": "Fetch a list of all contacts.",
"parameters": [
{
"schema": {
"type": "number",
"default": 10,
"maximum": 150,
"minimum": 1,
"example": 50
},
"in": "query",
"name": "per_page",
"description": "The number of items returned in a single response."
},
{
"schema": {
"type": "string",
"minLength": 1,
"example": "1HaSB+xrOyyMXAkS/c1RteCL7BzOzTvYjmjakgTergIH31eoe2v4/sbLsJWP\\nIncfQLD3ouPkZlCwJ86F\\n"
},
"in": "query",
"name": "starting_after",
"description": "The cursor used for pagination in order to fetch the next page of results."
}
],
"security": [
{
"Bearer": []
}
],
"tags": [
"Contacts"
]
},
"post": {
"summary": "Create a contact",
"operationId": "post-contacts",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Contact"
},
"examples": {
"Contact": {
"value": {
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"has_hard_bounced": false,
"marked_email_as_spam": false,
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"language_override": null,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"android_app_name": null,
"android_app_version": null,
"android_device": null,
"android_os_version": null,
"android_sdk_version": null,
"android_last_seen_at": null,
"ios_app_name": null,
"ios_app_version": null,
"ios_device": null,
"ios_os_version": null,
"ios_sdk_version": null,
"ios_last_seen_at": null,
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags",
"total_count": 3,
"has_more": false
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes",
"total_count": 1,
"has_more": false
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies",
"total_count": 3,
"has_more": false
}
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact already exists": {
"value": {
"type": "error.list",
"request_id": "80ec9d92-99ff-4da9-9a0e-c0ab7c42f7e7",
"errors": [
{
"code": "conflict",
"message": "A contact matching those details already exists with id=5da6f18e3d7cf967e4582d05"
}
]
}
},
"Owner not on workspace": {
"value": {
"type": "error.list",
"request_id": "00043csj9iva7pl9mmmg",
"errors": [
{
"code": "parameter_invalid",
"message": "The owner specified is not a member of the workspace"
}
]
}
}
}
}
}
}
},
"description": "Create a new contact (ie. user or lead).",
"security": [
{
"Bearer": []
}
],
"tags": [
"Contacts"
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateContactRequest"
},
"examples": {
"Create User": {
"value": {
"role": "user",
"external_id": "25",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"last_seen_at": 1571069751,
"signed_up_at": 1571069751,
"owner_id": 127,
"unsubscribed_from_emails": false,
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
}
}
}
}
}
}
}
}
},
"/contacts/search": {
"post": {
"summary": "Search for contacts",
"operationId": "post-contacts-search",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactList"
},
"examples": {
"Contact List": {
"value": {
"type": "list",
"data": [
{
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags"
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes"
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies"
}
}
],
"total_count": 436,
"pages": {
"type": "pages",
"next": {
"page": 2,
"starting_after": "WzE1NzEzMTc0NDYwMDAsIjViYTY4MmQyM2Q3Y2Y5MmJlZjg3YmZkNCIsMl0="
},
"page": 1,
"per_page": 1,
"total_pages": 436
}
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Invalid Parameters": {
"value": {
"type": "error.list",
"request_id": "693d48decbb24ad5bc1e2bf75dc9e8ca",
"errors": [
{
"code": "bad_request",
"message": "bad 'random_param' parameter"
}
]
}
},
"Required Parameter Not There": {
"value": {
"type": "error.list",
"request_id": "693d48decbb24ad5bc1e2bf75dc9e8ca",
"errors": [
{
"code": "invalid_query",
"message": "Invalid query. Ensure 'field', 'operator', 'value' are present for field queries. Ensure 'operator' and 'value' for composite queries."
}
]
}
},
"Too Many Nested Values (Max 10)": {
"value": {
"type": "error.list",
"request_id": "693d48decbb24ad5bc1e2bf75dc9e8ca",
"errors": [
{
"code": "invalid_values",
"message": "Value depth exceeds 10 items"
}
]
}
},
"Invalid Value": {
"value": {
"type": "error.list",
"request_id": "693d48decbb24ad5bc1e2bf75dc9e8ca",
"errors": [
{
"code": "invalid_value",
"message": "123 is not a valid string"
}
]
}
},
"Invalid Field": {
"value": {
"type": "error.list",
"request_id": "693d48decbb24ad5bc1e2bf75dc9e8ca",
"errors": [
{
"code": "invalid_field",
"message": "not_a_field is not a valid field"
}
]
}
},
"Invalid Multiple Filter Operator": {
"value": {
"type": "error.list",
"request_id": "693d48decbb24ad5bc1e2bf75dc9e8ca",
"errors": [
{
"code": "invalid_operator",
"message": "Composite operators must be of type AND or OR "
}
]
}
},
"Invalid Value Operator": {
"value": {
"type": "error.list",
"request_id": "693d48decbb24ad5bc1e2bf75dc9e8ca",
"errors": [
{
"code": "invalid_operator",
"message": "email does not support operator: >"
}
]
}
},
"Too Many Values (Max 15)": {
"value": {
"type": "error.list",
"request_id": "693d48decbb24ad5bc1e2bf75dc9e8ca",
"errors": [
{
"code": "invalid_value",
"message": "Number of elements in composite query is greater than 15, please try again with a smaller list"
}
]
}
}
}
}
}
}
},
"description": "You can search for multiple contacts by the value of their attributes in order to fetch exactly who you want.\n\nTo search for contacts, you need to send a POST request to this endpoint. This will accept a query object in the body which will define your filters in order to search for contacts.\n\nLook at the examples for creating a single filter, multiple filters or nested filters.",
"security": [
{
"Bearer": []
}
],
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object"
},
"examples": {
"Single Filter": {
"value": {
"query": {
"field": "custom_attributes.salesforce_status",
"operator": "~",
"value": "open"
}
}
},
"Multiple Filters": {
"value": {
"query": {
"operator": "AND",
"value": [
{
"field": "custom_attributes.social_network",
"operator": "=",
"value": "facebook"
},
{
"field": "custom_attributes.social_network",
"operator": "=",
"value": "twitter"
},
{
"field": "custom_attributes.social_network",
"operator": "=",
"value": "instagram"
}
]
}
}
},
"Nested Filters": {
"value": {
"query": {
"operator": "AND",
"value": [
{
"operator": "OR",
"value": [
{
"field": "created_at",
"operator": ">",
"value": 1560436650
},
{
"field": "signed_up_at",
"operator": ">",
"value": 1560436784
}
]
},
{
"operator": "OR",
"value": [
{
"field": "custom_attributes.salseforce_status",
"operator": "~",
"value": "Open"
},
{
"field": "custom_attributes.salesforce_object_type",
"operator": "=",
"value": "Lead"
}
]
}
]
}
}
}
}
}
},
"description": ""
},
"tags": [
"Contacts"
]
}
},
"/contacts/{id}": {
"parameters": [
{
"schema": {
"type": "string",
"minLength": 1,
"example": "5ba682d23d7cf92bef87bfd4"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the contact which is given by Intercom."
}
],
"put": {
"summary": "Update a contact",
"operationId": "put-contacts-id",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Contact"
},
"examples": {
"Contact": {
"value": {
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"has_hard_bounced": false,
"marked_email_as_spam": false,
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"language_override": null,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"android_app_name": null,
"android_app_version": null,
"android_device": null,
"android_os_version": null,
"android_sdk_version": null,
"android_last_seen_at": null,
"ios_app_name": null,
"ios_app_version": null,
"ios_device": null,
"ios_os_version": null,
"ios_sdk_version": null,
"ios_last_seen_at": null,
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags",
"total_count": 3,
"has_more": false
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes",
"total_count": 1,
"has_more": false
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies",
"total_count": 3,
"has_more": false
}
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
},
"Updating with existing external_id": {
"value": {
"type": "error.list",
"request_id": "80ec9d92-99ff-4da9-9a0e-c0ab7c42f7e7",
"errors": [
{
"code": "conflict",
"message": "A contact matching those details already exists with id=5da6f18e3d7cf967e4582d05"
}
]
}
},
"Converting user to lead": {
"value": {
"type": "error.list",
"request_id": "00043csj9iva7pl9mmmg",
"errors": [
{
"code": "client_error",
"message": "Contact with user role can't be converted to a lead"
}
]
}
},
"Owner not on workspace": {
"value": {
"type": "error.list",
"request_id": "00043csj9iva7pl9mmmg",
"errors": [
{
"code": "parameter_invalid",
"message": "The owner specified is not a member of the workspace"
}
]
}
}
}
}
}
}
},
"description": "Update an existing contact (ie. user or lead).",
"security": [
{
"Bearer": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateContactRequest"
},
"examples": {
"Update User": {
"value": {
"role": "user",
"external_id": "25",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"last_seen_at": 1571069751,
"signed_up_at": 1571069751,
"owner_id": 127,
"unsubscribed_from_emails": false,
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
}
}
}
}
}
}
},
"tags": [
"Contacts"
]
},
"get": {
"summary": "Retrieve a contact",
"operationId": "get-contacts-id",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Contact"
},
"examples": {
"Contact": {
"value": {
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"has_hard_bounced": false,
"marked_email_as_spam": false,
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"language_override": null,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"android_app_name": null,
"android_app_version": null,
"android_device": null,
"android_os_version": null,
"android_sdk_version": null,
"android_last_seen_at": null,
"ios_app_name": null,
"ios_app_version": null,
"ios_device": null,
"ios_os_version": null,
"ios_sdk_version": null,
"ios_last_seen_at": null,
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags",
"total_count": 3,
"has_more": false
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes",
"total_count": 1,
"has_more": false
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies",
"total_count": 3,
"has_more": false
}
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"description": "Fetch the details of a single contact.",
"security": [
{
"Bearer": []
}
],
"tags": [
"Contacts"
]
},
"delete": {
"summary": "Delete a contact",
"operationId": "delete-contacts-id",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteContactResponse"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"description": "Delete a single contact.",
"security": [
{
"Bearer": []
}
],
"tags": [
"Contacts"
]
}
},
"/contacts/{id}/archive": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true
}
],
"post": {
"summary": "Archive a contact",
"operationId": "post-contacts-id-archive",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ArchiveContactResponse"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"security": [
{
"Bearer": []
}
],
"description": "Archive a single contact.",
"tags": [
"Contacts"
]
}
},
"/contacts/{id}/unarchive": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true
}
],
"post": {
"summary": "Unarchive a contact",
"operationId": "post-contacts-id-unarchive",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ArchiveContactResponse"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"security": [
{
"Bearer": []
}
],
"description": "Unarchive a single contact.",
"tags": [
"Contacts"
]
}
},
"/contacts/merge": {
"post": {
"summary": "Merge two contacts",
"operationId": "post-contacts-merge",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Contact"
},
"examples": {
"Contact": {
"value": {
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"has_hard_bounced": false,
"marked_email_as_spam": false,
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"language_override": null,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"android_app_name": null,
"android_app_version": null,
"android_device": null,
"android_os_version": null,
"android_sdk_version": null,
"android_last_seen_at": null,
"ios_app_name": null,
"ios_app_version": null,
"ios_device": null,
"ios_os_version": null,
"ios_sdk_version": null,
"ios_last_seen_at": null,
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags",
"total_count": 3,
"has_more": false
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes",
"total_count": 1,
"has_more": false
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies",
"total_count": 3,
"has_more": false
}
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Not merging from lead to user": {
"value": {
"type": "error.list",
"request_id": "0019c4t1derm7namdon0",
"errors": [
{
"code": "invalid_merge",
"message": "Merging can only be performed on a lead into a user"
}
]
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"description": "Merge a contact with a role of lead into a contact with a role of user.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MergeContactsRequest"
},
"examples": {
"Merge Request": {
"value": {
"from": "5d70dd30de4efd54f42fd526",
"into": "5ba682d23d7cf92bef87bfd4"
}
}
}
}
}
},
"security": [
{
"Bearer": []
}
],
"tags": [
"Contacts"
]
}
},
"/contacts/{id}/companies": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the contact which is given by Intercom."
}
],
"get": {
"summary": "List attached companies",
"tags": [
"Contacts"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompanyList"
},
"examples": {
"Company List": {
"value": {
"type": "company.list",
"pages": {
"type": "pages",
"next": "https://api.intercom.io/contacts/5d010558220cf7d48317dbb9/companies?per_page=1&page=2",
"page": 1,
"per_page": 50,
"total_pages": 26
},
"companies": [
{
"type": "company",
"id": "531ee472cce572a6ec000006",
"name": "Blue Sun",
"plan": {
"type": "plan",
"id": "33574",
"name": "premium.plan"
},
"company_id": "6",
"remote_created_at": 1394531169,
"created_at": 1394533506,
"updated_at": 1396874658,
"size": 85,
"website": "http://www.example.com",
"industry": "Manufacturing",
"monthly_spend": 49,
"session_count": 26,
"user_count": 10,
"tags": {
"type": "tag.list",
"tags": []
},
"segments": {
"type": "segment.list",
"segments": []
},
"custom_attributes": {}
}
],
"total_count": 1
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"operationId": "get-contacts-id-companies",
"description": "Fetch a list of companies that are associated to a contact.",
"security": [
{
"Bearer": []
}
]
},
"post": {
"summary": "Attach a contact",
"operationId": "post-contacts-id-companies",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Company"
},
"examples": {
"Company": {
"value": {
"type": "company",
"id": "531ee472cce572a6ec000006",
"name": "Blue Sun",
"plan": {
"type": "plan",
"id": "33574",
"name": "premium.plan"
},
"company_id": "6",
"remote_created_at": 1394531169,
"created_at": 1394533506,
"updated_at": 1396874658,
"size": 85,
"website": "http://www.example.com",
"industry": "Manufacturing",
"monthly_spend": 49,
"session_count": 26,
"user_count": 10,
"custom_attributes": {
"paid_subscriber": true,
"team_mates": 0
},
"tags": {
"type": "tag.list",
"tags": [
{
"id": "17513",
"name": "independent",
"type": "tag"
}
]
},
"segments": {
"type": "string",
"segments": [
{
"type": "segment",
"id": "53203e244cba153d39000062",
"name": "New",
"created_at": 1394621988,
"updated_at": 1394622004,
"person_type": "user",
"count": 148
}
]
}
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
},
"Company not found": {
"value": {
"type": "error.list",
"request_id": "5f6b2623-f844-4914-8b8d-ac01acc62a76",
"errors": [
{
"code": "company_not_found",
"message": "Company Not Found"
}
]
}
}
}
}
}
}
},
"tags": [
"Companies"
],
"description": "Attach a company to a single contact.",
"security": [
{
"Bearer": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AttachCompanyToContactRequest"
},
"examples": {
"Attach Contact Request": {
"value": {
"id": "56cde0cc3deab1bd8c000100"
}
}
}
}
}
}
}
},
"/contacts/{id}/tags": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the contact which is given by Intercom."
}
],
"get": {
"summary": "List attached tags",
"tags": [
"Contacts"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TagList"
},
"examples": {
"Tag List": {
"value": {
"type": "list",
"data": [
{
"id": "17513",
"name": "independent",
"type": "tag"
}
]
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"operationId": "get-contacts-id-tags",
"description": "Fetch a list of tags that are associated to a contact.",
"security": [
{
"Bearer": []
}
]
}
},
"/contacts/{id}/segments": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the contact which is given by Intercom."
}
],
"get": {
"summary": "List attached segments",
"tags": [
"Contacts"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SegmentList"
},
"examples": {
"Segment List": {
"value": {
"type": "list",
"data": [
{
"type": "segment",
"id": "53203e244cba153d39000062",
"name": "New",
"created_at": 1394621988,
"updated_at": 1394622004,
"person_type": "user",
"count": 148
}
]
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"operationId": "get-contacts-id-segments",
"description": "Fetch a list of segments that are associated to a contact.",
"security": [
{
"Bearer": []
}
]
}
},
"/contacts/{id}/notes": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the contact which is given by Intercom."
}
],
"get": {
"summary": "List all notes for contact",
"tags": [
"Notes"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NoteList"
},
"examples": {
"Notes List": {
"value": {
"type": "list",
"data": [
{
"type": "note",
"id": "16",
"created_at": 1389913941,
"body": "<p>Text for my note</p>",
"author": {
"type": "admin",
"id": "21",
"name": "Jayne Cobb",
"email": "jayne@serenity.io"
},
"user": {
"type": "user",
"id": "5310d8e8598c9a0b24000005"
}
}
],
"pages": {
"type": "pages",
"next": "https://api.intercom.io/contacts/5d010558220cf7d48317dbb9/companies?per_page=1&page=2",
"page": 1,
"per_page": 50,
"total_pages": 26
},
"total_count": 3
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
},
"application/xml": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
}
}
}
}
}
},
"operationId": "get-contacts-id-notes",
"description": "Fetch a list of notes that are associated to a contact.",
"security": [
{
"Bearer": []
}
]
},
"post": {
"summary": "Create a note",
"operationId": "post-contacts-id-notes",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Note"
},
"examples": {
"Note": {
"value": {
"type": "note",
"id": "16",
"created_at": 1389913941,
"body": "<p>Text for my note</p>",
"author": {
"type": "admin",
"id": "21",
"name": "Jayne Cobb",
"email": "jayne@serenity.io",
"job_title": "The job title of the admin",
"away_mode_enabled": true,
"away_mode_reassign": true,
"has_inbox_seat": true,
"team_ids": [
814865
],
"avatar": "http://example.org/128Jayne.jpg"
},
"user": {
"type": "user",
"id": "5310d8e8598c9a0b24000005"
}
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
},
"Admin not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Resource Not Found"
}
]
}
}
}
}
}
}
},
"tags": [
"Notes"
],
"description": "Create a note on a single contact.",
"security": [
{
"Bearer": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateNoteRequest"
},
"examples": {
"Example": {
"value": {
"body": "Shiny",
"admin_id": "12345"
}
}
}
}
},
"description": ""
}
}
},
"/companies": {
"get": {
"summary": "List all companies",
"tags": [
"Companies"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompanyList"
},
"examples": {
"Company List": {
"value": {
"type": "company.list",
"pages": {
"type": "pages",
"next": "https://api.intercom.io/contacts/5d010558220cf7d48317dbb9/companies?per_page=1&page=2",
"page": 1,
"per_page": 50,
"total_pages": 26
},
"companies": [
{
"type": "company",
"id": "531ee472cce572a6ec000006",
"name": "Blue Sun",
"plan": {
"type": "plan",
"id": "33574",
"name": "premium.plan"
},
"company_id": "6",
"remote_created_at": 1394531169,
"created_at": 1394533506,
"updated_at": 1396874658,
"size": 85,
"website": "http://www.example.com",
"industry": "Manufacturing",
"monthly_spend": 49,
"session_count": 26,
"user_count": 10,
"custom_attributes": {
"paid_subscriber": true,
"team_mates": 0
},
"tags": {
"type": "tag.list",
"tags": [
{
"id": "17513",
"name": "independent",
"type": "tag"
}
]
},
"segments": {
"type": "string",
"segments": [
{
"type": "segment",
"id": "53203e244cba153d39000062",
"name": "New",
"created_at": 1394621988,
"updated_at": 1394622004,
"person_type": "user",
"count": 148
}
]
}
}
],
"total_count": 1
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/BadRequest"
}
},
"operationId": "get-companies",
"description": "You can list companies. The company list is sorted by the last_request_at field and by default is ordered descending, most recently requested first.\n\nNote that the API does not include companies who have no associated users in list responses.",
"security": [
{
"Bearer": []
}
],
"parameters": [
{
"schema": {
"type": "integer",
"minimum": 1,
"default": 1
},
"in": "query",
"name": "page",
"description": "what page of results to fetch defaults to first page."
},
{
"schema": {
"type": "integer",
"default": 50,
"minimum": 1,
"maximum": 150
},
"in": "query",
"name": "per_page",
"description": "how many results per page defaults to 50."
},
{
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
],
"default": "asc"
},
"in": "query",
"name": "order",
"description": "asc or desc. Return the companies in ascending or descending order. defaults to desc."
}
]
},
"post": {
"summary": "Create or update a company",
"operationId": "post-companies",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Company"
},
"examples": {
"Company": {
"value": {
"type": "company",
"id": "531ee472cce572a6ec000006",
"name": "Blue Sun",
"plan": {
"type": "plan",
"id": "33574",
"name": "premium.plan"
},
"company_id": "6",
"remote_created_at": 1394531169,
"created_at": 1394533506,
"updated_at": 1396874658,
"size": 85,
"website": "http://www.example.com",
"industry": "Manufacturing",
"monthly_spend": 49,
"session_count": 26,
"user_count": 10,
"custom_attributes": {
"paid_subscriber": true,
"team_mates": 0
},
"tags": {
"type": "tag.list",
"tags": [
{
"id": "17513",
"name": "independent",
"type": "tag"
}
]
},
"segments": {
"type": "string",
"segments": [
{
"type": "segment",
"id": "53203e244cba153d39000062",
"name": "New",
"created_at": 1394621988,
"updated_at": 1394622004,
"person_type": "user",
"count": 148
}
]
}
}
}
}
}
}
},
"404": {
"$ref": "#/components/responses/BadRequest"
}
},
"tags": [
"Companies"
],
"description": "You can create or update a company.\n\nCompanies are looked up via company_id in a POST request, if not found via company_id, the new company will be created, if found, that company will be updated.",
"security": [
{
"Bearer": []
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateCompanyRequest"
},
"examples": {
"Update Company Request": {
"value": {
"name": "Blue Sun",
"plan": "Paid",
"company_id": "6",
"remote_created_at": 1394531169,
"size": 750,
"website": "http://www.example.com",
"industry": "Manufacturing",
"custom_attributes": {
"paid_subscriber": true,
"team_mates": 0
},
"monthly_spend": 495
}
}
}
}
}
}
}
},
"/companies/scroll": {
"get": {
"summary": "Scroll over all companies",
"tags": [
"Companies"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompanyList"
},
"examples": {
"Company List": {
"value": {
"type": "company.list",
"pages": {
"type": "pages",
"next": "https://api.intercom.io/contacts/5d010558220cf7d48317dbb9/companies?per_page=1&page=2",
"page": 1,
"per_page": 50,
"total_pages": 26
},
"companies": [
{
"type": "company",
"id": "531ee472cce572a6ec000006",
"name": "Blue Sun",
"plan": {
"type": "plan",
"id": "33574",
"name": "premium.plan"
},
"company_id": "6",
"remote_created_at": 1394531169,
"created_at": 1394533506,
"updated_at": 1396874658,
"size": 85,
"website": "http://www.example.com",
"industry": "Manufacturing",
"monthly_spend": 49,
"session_count": 26,
"user_count": 10,
"custom_attributes": {
"paid_subscriber": true,
"team_mates": 0
},
"tags": {
"type": "tag.list",
"tags": [
{
"id": "17513",
"name": "independent",
"type": "tag"
}
]
},
"segments": {
"type": "string",
"segments": [
{
"type": "segment",
"id": "53203e244cba153d39000062",
"name": "New",
"created_at": 1394621988,
"updated_at": 1394622004,
"person_type": "user",
"count": 148
}
]
}
}
],
"total_count": 1,
"scroll_param": "25b649f7-4d33-4ef6-88f5-60e5b8244309"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Scroll parameter not found": {
"value": {
"type": "error.list",
"request_id": "000dvrr3u3mv15vcfm4g",
"errors": [
{
"code": "not_found",
"message": "scroll parameter not found"
}
]
}
}
}
}
}
}
},
"operationId": "get-companies-scroll",
"description": "The Company listing functionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply. The Scroll API provides an efficient mechanism for iterating over all companies in a dataset.\n\n* Each app can only have 1 scroll open at a time. You'll get an error message if you try to have more than one open per app.\n* If the scroll isn't used for 1 minute, it expires and calls with that scroll param will fail\n* If the end of the scroll is reached, \"companies\" will be empty and the scroll parameter will expire",
"security": [
{
"Bearer": []
}
],
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "scroll_param",
"description": "You can get the first page of companies by simply sending a GET request to the scroll endpoint. For subsequent requests you will need to use the scroll parameter from the response."
}
]
}
},
"/companies/": {
"get": {
"summary": "Retrieve a company",
"tags": [
"Companies"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Company"
},
"examples": {
"Company": {
"value": {
"type": "company",
"id": "531ee472cce572a6ec000006",
"name": "Blue Sun",
"plan": {
"type": "plan",
"id": "33574",
"name": "premium.plan"
},
"company_id": "6",
"remote_created_at": 1394531169,
"created_at": 1394533506,
"updated_at": 1396874658,
"size": 85,
"website": "http://www.example.com",
"industry": "Manufacturing",
"monthly_spend": 49,
"session_count": 26,
"user_count": 10,
"custom_attributes": {
"paid_subscriber": true,
"team_mates": 0
},
"tags": {
"type": "tag.list",
"tags": [
{
"id": "17513",
"name": "independent",
"type": "tag"
}
]
},
"segments": {
"type": "string",
"segments": [
{
"type": "segment",
"id": "53203e244cba153d39000062",
"name": "New",
"created_at": 1394621988,
"updated_at": 1394622004,
"person_type": "user",
"count": 148
}
]
}
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Company not found": {
"value": {
"type": "error.list",
"request_id": "0009ulqspmqk6v4j1s60",
"errors": [
{
"code": "company_not_found",
"message": "Company Not Found"
}
]
}
}
}
}
}
}
},
"operationId": "get-company",
"description": "Fetch a single company.",
"security": [
{
"Bearer": []
}
],
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "name",
"description": "The name of the company. The parameter should be url encoded."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "company_id",
"description": "The company_id you have given to the company."
}
]
}
},
"/companies/{id}": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the company which is given by Intercom."
}
],
"delete": {
"summary": "Delete a company",
"operationId": "delete-companies-id",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteCompanyResponse"
},
"examples": {
"Deleted Company": {
"value": {
"id": "5ba682d23d7cf92bef87bfd4",
"object": "company",
"deleted": true
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Company not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Company Not Found"
}
]
}
}
}
}
}
}
},
"description": "Delete a single company.",
"tags": [
"Companies"
],
"security": [
{
"Bearer": []
}
]
}
},
"/contacts/{id}/companies/{companyId}": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "companyId",
"in": "path",
"required": true,
"description": "The unique identifier for the company which is given by Intercom."
},
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the contact which is given by Intercom."
}
],
"delete": {
"summary": "Detach a contact",
"tags": [
"Companies"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Company"
},
"examples": {
"Company": {
"value": {
"type": "company",
"id": "531ee472cce572a6ec000006",
"name": "Blue Sun",
"plan": {
"type": "plan",
"id": "33574",
"name": "premium.plan"
},
"company_id": "6",
"remote_created_at": 1394531169,
"created_at": 1394533506,
"updated_at": 1396874658,
"size": 85,
"website": "http://www.example.com",
"industry": "Manufacturing",
"monthly_spend": 49,
"session_count": 26,
"user_count": 10,
"custom_attributes": {
"paid_subscriber": true,
"team_mates": 0
},
"tags": {
"type": "tag.list",
"tags": [
{
"id": "17513",
"name": "independent",
"type": "tag"
}
]
},
"segments": {
"type": "string",
"segments": [
{
"type": "segment",
"id": "53203e244cba153d39000062",
"name": "New",
"created_at": 1394621988,
"updated_at": 1394622004,
"person_type": "user",
"count": 148
}
]
}
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Contact not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Contact Not Found"
}
]
}
},
"Company not found": {
"value": {
"type": "error.list",
"request_id": "5f6b2623-f844-4914-8b8d-ac01acc62a76",
"errors": [
{
"code": "company_not_found",
"message": "Company Not Found"
}
]
}
}
}
}
}
}
},
"operationId": "get-contacts-id-companies-companyId",
"description": "Detach a company from a single contact.",
"security": [
{
"Bearer": []
}
]
}
},
"/companies/{id}/contacts": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the company which is given by Intercom."
}
],
"get": {
"summary": "List attached contacts",
"tags": [
"Companies"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ContactList"
},
"examples": {
"Contact List": {
"value": {
"type": "list",
"data": [
{
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags"
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes"
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies"
}
}
],
"total_count": 436,
"pages": {
"type": "pages",
"next": {
"page": 2,
"starting_after": "WzE1NzEzMTc0NDYwMDAsIjViYTY4MmQyM2Q3Y2Y5MmJlZjg3YmZkNCIsMl0="
},
"page": 1,
"per_page": 1,
"total_pages": 436
}
}
}
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Invalid starting_after param": {
"value": {
"type": "error.list",
"request_id": "000nbboasf1qqab6b910",
"errors": [
{
"code": "client_error",
"message": "Invalid starting_after param. Please try again using a starting_after value from a paginated response"
}
]
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Company not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Company Not Found"
}
]
}
}
}
}
}
}
},
"operationId": "get-companies-id-contacts",
"description": "Fetch a list of all contacts that belong to a company.",
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "starting_after",
"description": "The cursor used for pagination in order to fetch the next page of results."
}
],
"security": [
{
"Bearer": []
}
]
}
},
"/companies/{id}/segments": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier for the company which is given by Intercom."
}
],
"get": {
"summary": "List attached segments",
"tags": [
"Companies"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SegmentList"
},
"examples": {
"Segment List": {
"value": {
"type": "list",
"data": [
{
"type": "segment",
"id": "53203e244cba153d39000062",
"name": "New",
"created_at": 1394621988,
"updated_at": 1394622004,
"person_type": "user",
"count": 148
}
]
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Company not found": {
"value": {
"type": "error.list",
"request_id": "9a3d0816-9707-4598-977e-c009ba630148",
"errors": [
{
"code": "not_found",
"message": "Company Not Found"
}
]
}
}
}
}
}
}
},
"operationId": "get-companies-id-segments",
"description": "Fetch a list of all segments that belong to a company.",
"security": [
{
"Bearer": []
}
]
}
},
"/notes/{id}": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "id",
"in": "path",
"required": true,
"description": "The unique identifier of a given note."
}
],
"get": {
"summary": "Retrieve a note",
"tags": [
"Notes"
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Note"
},
"examples": {
"Example": {
"value": {
"type": "note",
"id": "16",
"created_at": 1389913941,
"body": "<p>Text for my note</p>",
"author": {
"type": "admin",
"id": "21",
"name": "Jayne Cobb",
"email": "jayne@serenity.io",
"job_title": "The job title of the admin",
"away_mode_enabled": true,
"away_mode_reassign": true,
"has_inbox_seat": true,
"team_ids": [
814865
],
"avatar": "http://example.org/128Jayne.jpg"
},
"user": {
"type": "user",
"id": "5310d8e8598c9a0b24000005"
}
}
}
}
}
}
}
},
"operationId": "get-notes-id",
"description": "Fetch the details of a single note.",
"security": [
{
"Bearer": []
}
]
}
}
},
"components": {
"schemas": {
"Next": {
"description": "Provides information about the next page in a result set.",
"type": "object",
"title": "Next",
"properties": {
"page": {
"type": "integer",
"description": "Number of the next page in the result set.",
"example": 4
},
"starting_after": {
"type": "string",
"description": "Cursor value to be provided in the next call to the pagination query, to return the next set of results.",
"minLength": 1,
"example": "1HaSB+xrOyyMXAkS/c1RteCL7BzOzTvYjmjakgTergIH31eoe2v4/sbLsJWP\\nIncfQLD3ouPkZlCwJ86F\\n",
"nullable": true
}
},
"required": [
"page"
]
},
"PagesCursor": {
"description": "Provides information needed to paginate through records in a result set using a cursor.",
"type": "object",
"title": "Pages (Cursor)",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - pages.",
"example": "pages"
},
"next": {
"$ref": "#/components/schemas/Next"
},
"page": {
"type": "integer",
"description": "The current page.",
"example": 3
},
"per_page": {
"type": "integer",
"description": "How many records per page are included in the response.",
"example": 5
},
"total_pages": {
"type": "integer",
"description": "Total pages in the result set.",
"example": 10
}
},
"required": [
"type"
]
},
"SocialProfile": {
"description": "Represents a social profile of a contact.",
"type": "object",
"title": "Social Profile",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - social_profile.",
"example": "social_profile"
},
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the service (ie. Twitter, Facebook, etc).",
"example": "Twitter"
},
"url": {
"type": "string",
"minLength": 1,
"description": "The profile page for the contact on the service.",
"example": "http://twitter.com/th1sland"
}
},
"required": [
"type",
"name",
"url"
]
},
"SocialProfileList": {
"description": "A list of social profiles associated to a contact.",
"type": "object",
"title": "Social Profiles List",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - list.",
"example": "list"
},
"data": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"description": "List of social profiles.",
"items": {
"$ref": "#/components/schemas/SocialProfile"
}
}
},
"required": [
"type",
"data"
]
},
"Location": {
"description": "The location of a contact.",
"type": "object",
"title": "Location",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - location.",
"example": "location"
},
"country": {
"type": "string",
"nullable": true,
"minLength": 1,
"description": "The country where the contact is.",
"example": "Ireland"
},
"region": {
"type": "string",
"nullable": true,
"minLength": 1,
"description": "A subdivision of the country which the contact is in (ie. state, province, county, territory, etc).",
"example": "Dublin"
},
"city": {
"type": "string",
"nullable": true,
"minLength": 1,
"description": "The city where the contact is.",
"example": "Dublin"
}
},
"required": [
"type"
]
},
"AddressableObject": {
"description": "An object that can be addressed in the Intercom API.",
"type": "object",
"title": "Addressable Object",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - company, note, tag.",
"example": "company"
},
"id": {
"type": "string",
"minLength": 1,
"description": "The id of the object.",
"example": "5ba686093d7cf93552a3dc99"
},
"url": {
"type": "string",
"minLength": 1,
"description": "The URL where the object in question can be accessed (ie. /companies/45678).",
"example": "/companies/5ba686093d7cf93552a3dc99"
}
},
"required": [
"type",
"id",
"url"
]
},
"AddressableList": {
"description": "A list of addressable objects.",
"type": "object",
"title": "Addressable List",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - list.",
"example": "list"
},
"data": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"description": "An array of Addressable Objects.\nMaximum of 10.",
"items": {
"$ref": "#/components/schemas/AddressableObject"
}
},
"url": {
"type": "string",
"nullable": true,
"description": "The URL where the full list can be accessed (ie. /contacts/1234/companies).",
"example": "/contacts/5ba682d23d7cf92bef87bfd4/companies"
},
"total_count": {
"type": "integer",
"description": "The total amount of records.",
"example": 3
},
"has_more": {
"type": "boolean",
"description": "Whether there's more Addressable Objects to be viewed. If true, use the url to view all."
}
},
"required": [
"type",
"data"
]
},
"Contact": {
"description": "The Contacts Model provides details on these contacts within Intercom, and will specify whether they are a user or lead through the role attribute.",
"type": "object",
"title": "Contact",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - contact.",
"example": "contact"
},
"id": {
"type": "string",
"minLength": 1,
"description": "\t\nThe unique identifier for the contact which is given by Intercom.",
"example": "5ba682d23d7cf92bef87bfd4"
},
"workspace_id": {
"type": "string",
"minLength": 1,
"description": "The id of the workspace which the contact belongs to.",
"example": "ecahpwf5"
},
"external_id": {
"type": "string",
"minLength": 1,
"description": "\t\nA unique identifier for the contact which is given to Intercom.",
"example": "25",
"nullable": true
},
"role": {
"type": "string",
"minLength": 1,
"description": "The role of the contact - user or lead.",
"example": "user"
},
"email": {
"type": "string",
"minLength": 1,
"description": "The contact's email.",
"example": "wash@serenity.io",
"nullable": true
},
"phone": {
"type": "string",
"description": "The contact's phone.",
"example": "+1123456789",
"nullable": true
},
"name": {
"type": "string",
"minLength": 1,
"description": "The contact's name.",
"example": "Hoban Washburn",
"nullable": true
},
"avatar": {
"type": "string",
"minLength": 1,
"description": "An image URL containing the avatar of a contact.",
"example": "https://example.org/128Wash.jpg",
"format": "uri",
"nullable": true
},
"owner_id": {
"type": "integer",
"description": "The id of an admin that has been assigned account ownership of the contact.",
"example": 127,
"nullable": true
},
"social_profiles": {
"$ref": "#/components/schemas/SocialProfileList"
},
"has_hard_bounced": {
"type": "boolean",
"description": "Whether the contact has had an email sent to them hard bounce.",
"nullable": true
},
"marked_email_as_spam": {
"type": "boolean",
"description": "Whether the contact has marked an email sent to them as spam.",
"nullable": true
},
"unsubscribed_from_emails": {
"type": "boolean",
"description": "Whether the contact is unsubscribed from emails.",
"nullable": true
},
"created_at": {
"type": "number",
"description": "The time when the contact was created. UNIX timestamp.",
"example": 1571672154
},
"updated_at": {
"type": "integer",
"description": "The time when the contact was last updated. UNIX timestamp.",
"example": 1571672158,
"nullable": true
},
"signed_up_at": {
"type": "integer",
"description": "The time specified for when a contact signed up. UNIX timestamp.",
"example": 1571069751,
"nullable": true
},
"last_seen_at": {
"type": "integer",
"description": "The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually). UNIX timestamp.",
"example": 1571069751,
"nullable": true
},
"last_replied_at": {
"type": "integer",
"description": "The time when the contact last messaged in. UNIX timestamp.",
"example": 1571672158,
"nullable": true
},
"last_contacted_at": {
"type": "integer",
"description": "The time when the contact was last messaged. UNIX timestamp.",
"example": 1571672158,
"nullable": true
},
"last_email_opened_at": {
"type": "integer",
"description": "The time when the contact last opened an email. UNIX timestamp.",
"example": 1571673478,
"nullable": true
},
"last_email_clicked_at": {
"type": "integer",
"description": "The time when the contact last clicked a link in an email. UNIX timestamp.",
"example": 1571676789,
"nullable": true
},
"language_override": {
"type": "string",
"description": "A preferred language setting for the contact, used by the Intercom Messenger even if their browser settings change.",
"minLength": 1,
"example": "es",
"nullable": true
},
"browser": {
"type": "string",
"minLength": 1,
"description": "The name of the browser which the contact is using.",
"example": "chrome",
"nullable": true
},
"browser_version": {
"type": "string",
"minLength": 1,
"description": "The version of the browser which the contact is using.",
"example": "77.0.3865.90",
"nullable": true
},
"browser_language": {
"type": "string",
"minLength": 1,
"description": "The language set by the browser which the contact is using.",
"example": "en",
"nullable": true
},
"os": {
"type": "string",
"minLength": 1,
"description": "The operating system which the contact is using.",
"example": "OS X 10.14.6",
"nullable": true
},
"location": {
"$ref": "#/components/schemas/Location"
},
"android_app_name": {
"type": "string",
"description": "\t\nThe name of the Android app which the contact is using.",
"minLength": 1,
"nullable": true
},
"android_app_version": {
"type": "string",
"description": "The version of the Android app which the contact is using.",
"minLength": 1,
"nullable": true
},
"android_device": {
"type": "string",
"description": "The Android device which the contact is using.",
"minLength": 1,
"nullable": true
},
"android_os_version": {
"type": "string",
"description": "The version of the Android OS which the contact is using.",
"minLength": 1,
"nullable": true
},
"android_sdk_version": {
"type": "string",
"description": "The version of the Android SDK which the contact is using.",
"minLength": 1,
"nullable": true
},
"android_last_seen_at": {
"type": "integer",
"description": "The last time the contact used the Android app. UNIX timestamp.",
"example": 1571069751,
"nullable": true
},
"ios_app_name": {
"type": "string",
"description": "The name of the iOS app which the contact is using.",
"minLength": 1,
"nullable": true
},
"ios_app_version": {
"type": "string",
"minLength": 1,
"description": "The version of the iOS app which the contact is using.",
"nullable": true
},
"ios_device": {
"type": "string",
"minLength": 1,
"description": "The iOS device which the contact is using.",
"nullable": true
},
"ios_os_version": {
"type": "string",
"minLength": 1,
"description": "The version of iOS which the contact is using.",
"nullable": true
},
"ios_sdk_version": {
"type": "string",
"minLength": 1,
"description": "The version of the iOS SDK which the contact is using.",
"nullable": true
},
"ios_last_seen_at": {
"type": "integer",
"description": "The last time the contact used the iOS app. UNIX timestamp.",
"example": 1571069751,
"nullable": true
},
"custom_attributes": {
"type": "object",
"description": "The custom attributes which are set for the contact."
},
"tags": {
"$ref": "#/components/schemas/AddressableList"
},
"notes": {
"$ref": "#/components/schemas/AddressableList"
},
"companies": {
"$ref": "#/components/schemas/AddressableList"
}
},
"required": [
"type",
"id",
"workspace_id",
"role"
]
},
"ContactList": {
"description": "A paginated list of Contact objects.",
"type": "object",
"title": "Contact List",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - list.",
"example": "list"
},
"data": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"description": "An array containing Contact Objects.",
"items": {
"$ref": "#/components/schemas/Contact"
}
},
"total_count": {
"type": "integer",
"description": "The total number of contacts.",
"example": 436
},
"pages": {
"$ref": "#/components/schemas/PagesCursor"
}
},
"required": [
"type",
"data"
]
},
"SingleFilterQuery": {
"description": "Query filter with a single condition.",
"type": "object",
"title": "Single Filter Query",
"properties": {
"query": {
"type": "object",
"description": "A single filter query object."
},
"pagination": {
"$ref": "#/components/schemas/SearchPagination"
},
"sort": {
"$ref": "#/components/schemas/SearchSorting"
}
},
"required": [
"query"
]
},
"SingleFilterString": {
"description": "A single filter used to define your queries to \nsearch for items.",
"type": "object",
"title": "Single Filter (String)",
"properties": {
"field": {
"type": "string",
"minLength": 1,
"description": "The fields associated to a customer that you can search for.",
"example": "custom_attributes.salesforce_status"
},
"operator": {
"type": "string",
"description": "The operator that you want to compare by.",
"minLength": 1,
"example": "~",
"pattern": "^(=|!=|IN|NIN|>|>=|<|<=|~|!~|\\^|\\$)$"
},
"value": {
"type": "string",
"description": "The value you want to search by."
}
},
"required": [
"field",
"operator",
"value"
]
},
"SingleFilterInteger": {
"description": "A single filter used to define your queries to \nsearch for items.",
"type": "object",
"title": "Single Filter (Integer)",
"properties": {
"field": {
"type": "string",
"minLength": 1,
"description": "The fields associated to a customer that you can search for.",
"example": "custom_attributes.salesforce_status"
},
"operator": {
"type": "string",
"description": "The operator that you want to compare by.",
"minLength": 1,
"example": "~",
"pattern": "^(=|!=|IN|NIN|>|>=|<|<=|~|!~|\\^|\\$)$"
},
"value": {
"type": "integer",
"description": "The value you want to search by."
}
},
"required": [
"field",
"operator",
"value"
]
},
"MultiFilterQuery": {
"description": "Query filter with multiple conditions.",
"type": "object",
"title": "Multi-Filter Query",
"properties": {
"query": {
"$ref": "#/components/schemas/MultiFilter"
},
"pagination": {
"$ref": "#/components/schemas/SearchPagination"
},
"sort": {
"$ref": "#/components/schemas/SearchSorting"
}
},
"required": [
"query"
]
},
"NestedFilterQuery": {
"description": "Query filter that includes multiple nested filters.",
"type": "object",
"title": "Nested Filter Query",
"properties": {
"query": {
"$ref": "#/components/schemas/NestedFilter"
},
"pagination": {
"$ref": "#/components/schemas/SearchPagination"
},
"sort": {
"$ref": "#/components/schemas/SearchSorting"
}
},
"required": [
"query"
]
},
"MultiFilter": {
"description": "Class that allows you to combine multiple filters in a single query.",
"type": "object",
"title": "Multi-Filter",
"properties": {
"operator": {
"type": "string",
"minLength": 1,
"enum": [
"AND",
"OR"
],
"example": "AND"
},
"value": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"type": "object",
"description": "An array of single filter query objects."
}
}
},
"required": [
"operator",
"value"
]
},
"NestedFilter": {
"description": "Class that allows you to nest and combine multiple filters in a single query.",
"type": "object",
"title": "Nested Filter",
"properties": {
"operator": {
"type": "string",
"minLength": 1,
"enum": [
"AND",
"OR"
],
"example": "AND"
},
"value": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/components/schemas/MultiFilter"
}
}
},
"required": [
"operator",
"value"
]
},
"Error": {
"description": "Error that ocurred when calling the Intercom API.",
"type": "object",
"title": "Error",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"description": "A string indicating the kind of error, used to further qualify the HTTP response code",
"example": "not_found"
},
"message": {
"type": "string",
"minLength": 1,
"description": "Optional. Human readable description of the error",
"example": "No such email[pi@example.org]"
},
"field": {
"type": "string",
"minLength": 1,
"description": "Optional. Used to identify a particular field or query parameter that was in error.",
"example": "email"
}
},
"required": [
"code",
"message"
]
},
"Errors": {
"description": "A list of errors that ocurred when calling the Intercom API.",
"type": "object",
"title": "Errors",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of object - error.list.",
"example": "error.list"
},
"request_id": {
"type": "string",
"minLength": 1,
"description": "Id of the request.",
"example": "80ec9d92-99ff-4da9-9a0e-c0ab7c42f7e7"
},
"errors": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"description": "An array of one or more error objects",
"items": {
"$ref": "#/components/schemas/Error"
}
}
},
"required": [
"type",
"request_id",
"errors"
]
},
"UpdateContactRequest": {
"description": "Model used to create or update a contact.",
"type": "object",
"title": "Update Contact Request",
"properties": {
"role": {
"type": "string",
"minLength": 1,
"description": "The role of the contact. Accepted values are user or lead.",
"enum": [
"user",
"lead"
],
"example": "user"
},
"external_id": {
"type": "string",
"minLength": 1,
"description": "A unique identifier for the contact which is given to Intercom. Required if role is user and email is blank",
"example": "25"
},
"email": {
"type": "string",
"minLength": 1,
"description": "The contacts email. Required if role is user and external_id is blank.",
"example": "wash@serenity.io"
},
"phone": {
"type": "string",
"minLength": 1,
"description": "The contacts phone.",
"example": "+1123456789"
},
"name": {
"type": "string",
"minLength": 1,
"description": "The contacts name.",
"example": "Hoban Washburn"
},
"avatar": {
"type": "string",
"minLength": 1,
"description": "An image URL containing the avatar of a contact.",
"format": "uri",
"example": "https://example.org/128Wash.jpg"
},
"last_seen_at": {
"type": "integer",
"description": "The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually). Unix Timestamp.",
"example": 1571069751
},
"signed_up_at": {
"type": "integer",
"description": "The time specified for when a contact signed up. Unix Timestamp.",
"example": 1571069751
},
"owner_id": {
"type": "integer",
"description": "The id of an admin that has been assigned account ownership of the contact.",
"example": 127
},
"unsubscribed_from_emails": {
"type": "boolean",
"description": "Whether the contact is unsubscribed from emails."
},
"custom_attributes": {
"type": "object",
"description": "The custom attributes which are set for the contact.\n\nYou can only write to custom data attributes that already exist on the workspace. If you need to create new attributes to write to, you should Create Data Attributes through the Data Attributes API."
}
},
"required": [
"role"
]
},
"DeleteContactResponse": {
"description": "An object with details on the deleted contact.",
"type": "object",
"title": "Delete Contact Response",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "The unique identifier for the contact which is given by Intercom",
"nullable": true,
"example": "5ba682d23d7cf92bef87bfd4"
},
"object": {
"type": "string",
"minLength": 1,
"description": "The type of object - contact",
"nullable": true,
"example": "contact"
},
"deleted": {
"type": "string",
"minLength": 1,
"description": "Whether the contact has been deleted - true",
"nullable": true,
"example": "true"
}
}
},
"ArchiveContactResponse": {
"description": "An object with details on the archived contact.",
"type": "object",
"title": "Archive Contact Response",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "The unique identifier for the contact which is given by Intercom",
"nullable": true,
"example": "5ba682d23d7cf92bef87bfd4"
},
"object": {
"type": "string",
"minLength": 1,
"description": "The type of object - contact",
"nullable": true,
"example": "contact"
},
"deleted": {
"type": "string",
"minLength": 1,
"description": "Whether the contact has been archived - true if archived, false if unarchived.",
"nullable": true,
"example": "true"
}
}
},
"MergeContactsRequest": {
"description": "Information needed to merge two contacts.",
"type": "object",
"title": "Merge Contacts Request",
"properties": {
"from": {
"type": "string",
"minLength": 1,
"description": "The unique identifier for the contact to merge away from. Must be a lead.",
"example": "5d70dd30de4efd54f42fd526"
},
"into": {
"type": "string",
"minLength": 1,
"description": "\t\nThe unique identifier for the contact to merge into. Must be a user.",
"example": "5ba682d23d7cf92bef87bfd4"
}
},
"required": [
"from",
"into"
]
},
"Company": {
"description": "Companies allow you to represent organizations using your product. Each company will have its own description and be associated with contacts. You can fetch, create, update and list companies.\n\nCompanies will not appear within Intercom until users have been added or associated with a company.",
"type": "object",
"title": "Company",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "Value is 'company'.",
"example": "company"
},
"id": {
"type": "string",
"minLength": 1,
"description": "The Intercom defined id representing the company.",
"example": "531ee472cce572a6ec000006"
},
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the company.",
"example": "Blue Sun"
},
"plan": {
"$ref": "#/components/schemas/Plan"
},
"company_id": {
"type": "string",
"minLength": 1,
"description": "The company id you have defined for the company.",
"example": "6",
"nullable": true
},
"remote_created_at": {
"type": "integer",
"description": "The time the company was created by you.",
"example": 1394531169,
"nullable": true
},
"created_at": {
"type": "integer",
"description": "The time the company was added to Intercom.",
"example": 1394533506,
"nullable": true
},
"updated_at": {
"type": "integer",
"description": "The last time the company was updated.",
"example": 1396874658,
"nullable": true
},
"size": {
"type": "integer",
"description": "The number of employees in the company.",
"example": 85,
"nullable": true
},
"website": {
"type": "string",
"minLength": 1,
"description": "The URL for the company website.",
"example": "http://www.example.com",
"nullable": true
},
"industry": {
"type": "string",
"minLength": 1,
"description": "The industry that the company operates in.",
"example": "Manufacturing",
"nullable": true
},
"monthly_spend": {
"type": "number",
"description": "How much revenue the company generates for your business.",
"example": 49,
"minimum": 0,
"nullable": true
},
"session_count": {
"type": "integer",
"description": "How many sessions the company has recorded.",
"example": 26,
"nullable": true
},
"user_count": {
"type": "integer",
"description": "The number of users in the company.",
"example": 10,
"nullable": true
},
"custom_attributes": {
"type": "object",
"description": "The custom attributes you have set on the company."
},
"tags": {
"$ref": "#/components/schemas/CompanyTagList"
},
"segments": {
"$ref": "#/components/schemas/CompanySegmentList"
}
},
"required": [
"type",
"id",
"name"
]
},
"Tag": {
"description": "A tag allows you to label your contacts and companies and list them using that tag.",
"type": "object",
"title": "Tag",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "The id of the tag.",
"example": "17513"
},
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the tag.",
"example": "independent"
},
"type": {
"type": "string",
"minLength": 1,
"description": "Value is 'tag'.",
"example": "tag"
}
},
"required": [
"id",
"name",
"type"
]
},
"Note": {
"description": "Notes allow you to annotate and comment on your contacts.",
"type": "object",
"title": "Note",
"x-examples": {
"Example": {
"type": "note",
"id": "16",
"created_at": 1389913941,
"body": "<p>Text for my note</p>",
"author": {
"type": "admin",
"id": "21",
"name": "Jayne Cobb",
"email": "jayne@serenity.io",
"job_title": "The job title of the admin",
"away_mode_enabled": true,
"away_mode_reassign": true,
"has_inbox_seat": true,
"team_ids": [
814865
],
"avatar": "http://example.org/128Jayne.jpg"
},
"user": {
"type": "user",
"id": "5310d8e8598c9a0b24000005"
}
}
},
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "Value is 'note'.",
"example": "note"
},
"id": {
"type": "string",
"minLength": 1,
"description": "The id representing the note.",
"example": "16"
},
"created_at": {
"type": "integer",
"description": "The time the note was created.",
"example": 1389913941
},
"body": {
"type": "string",
"minLength": 1,
"description": "The body text of the note.",
"example": "<p>Text for my note</p>"
},
"author": {
"$ref": "#/components/schemas/Admin"
},
"user": {
"$ref": "#/components/schemas/NoteUser"
}
},
"required": [
"type",
"id",
"created_at",
"body",
"user"
]
},
"Admin": {
"description": "A teammate account that has access to a workspace.",
"type": "object",
"title": "Admin",
"x-examples": {
"Example": {
"type": "admin",
"id": "21",
"name": "Jayne Cobb",
"email": "jayne@serenity.io",
"job_title": "The job title of the admin",
"away_mode_enabled": true,
"away_mode_reassign": true,
"has_inbox_seat": true,
"team_ids": [
814865
],
"avatar": "http://example.org/128Jayne.jpg"
}
},
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "Value is 'admin'.",
"example": "admin"
},
"id": {
"type": "string",
"minLength": 1,
"description": "The id of the admin user that created the note.",
"example": "21"
},
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the admin user.",
"example": "Jayne Cobb"
},
"email": {
"type": "string",
"minLength": 1,
"description": "Email of the admin user.",
"example": "jayne@serenity.io"
},
"job_title": {
"type": "string",
"minLength": 1,
"example": "The job title of the admin"
},
"away_mode_enabled": {
"type": "boolean",
"description": "Identifies if this admin is currently set in away mode."
},
"away_mode_reassign": {
"type": "boolean",
"description": "Identifies if this admin is set to automatically reassign new conversations to the apps default inbox."
},
"has_inbox_seat": {
"type": "boolean",
"description": "Identifies if a teammate has a paid inbox seat to restrict/allow features that require them."
},
"team_ids": {
"type": "array",
"description": "This is a list of teams id's that you are part of.",
"items": {
"type": "integer",
"minimum": 1,
"example": 814865
}
},
"avatar": {
"type": "string",
"description": "Image for the associated team or teammate",
"format": "uri",
"example": "http://example.org/128Jayne.jpg",
"minLength": 1
}
},
"required": [
"type",
"id",
"name",
"email"
]
},
"NoteUser": {
"description": "The user the note was created about.",
"type": "object",
"title": "Note User",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "Value is 'user'.",
"example": "user"
},
"id": {
"type": "string",
"minLength": 1,
"description": "Id of the user the note was created about.",
"example": "5310d8e8598c9a0b24000005"
}
},
"required": [
"type",
"id"
],
"x-examples": {
"Example": {
"type": "user",
"id": "5310d8e8598c9a0b24000005"
}
}
},
"Segment": {
"description": "A segment is a group of your contacts defined by rules that you set. Contacts are automatically added to the segment every time the contact updates to match those rules. You can use Search for contacts to find contacts that match the same rules.",
"type": "object",
"title": "Segment",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "Value is 'segment'.",
"example": "segment"
},
"id": {
"type": "string",
"minLength": 1,
"description": "The unique identifier representing the segment.",
"example": "53203e244cba153d39000062"
},
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the segment.",
"example": "New"
},
"created_at": {
"type": "integer",
"description": "The time the segment was created.",
"example": 1394621988
},
"updated_at": {
"type": "integer",
"description": "The time the segment was updated.",
"example": 1394622004
},
"person_type": {
"type": "string",
"description": "Type of the record: user or lead.",
"example": "user",
"minLength": 1
},
"count": {
"type": "integer",
"description": "The number of items in the user segment. It's returned when include_count=true is included in the request.",
"example": 148,
"minimum": 0
}
},
"required": [
"type",
"id",
"name"
]
},
"PagesSimple": {
"description": "Provides information needed to paginate through records in a result set (in non-cursor based result sets).",
"type": "object",
"title": "Pages (Simple)",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of the object - pages.",
"example": "pages"
},
"next": {
"type": "string",
"minLength": 1,
"description": "An url to the next page in the result set. A response that does not contain a `next` link does not have further data to fetch.",
"format": "uri",
"example": "https://api.intercom.io/contacts/5d010558220cf7d48317dbb9/companies?per_page=1&page=2"
},
"page": {
"type": "integer",
"description": "The current page.",
"example": 1,
"minimum": 1
},
"per_page": {
"type": "integer",
"description": "How many records per page are included in the response.",
"example": 50,
"minimum": 1
},
"total_pages": {
"type": "integer",
"description": "Total pages in the result set.",
"example": 26,
"minimum": 0
}
},
"required": [
"type"
]
},
"CompanyList": {
"description": "A list of companies.",
"type": "object",
"title": "Company List",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"example": "company.list",
"description": "The type of object - company.list"
},
"pages": {
"$ref": "#/components/schemas/PagesSimple"
},
"companies": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"$ref": "#/components/schemas/Company"
}
},
"total_count": {
"type": "integer",
"example": 1,
"minimum": 0,
"description": "The total number of companies in the result."
},
"scroll_param": {
"type": "string",
"example": "25b649f7-4d33-4ef6-88f5-60e5b8244309",
"minLength": 1,
"description": "When using the Scroll API for companies, for subsequent requests, you will need to use the scroll parameter from the response. You need to send the value of this property as a query parameter in your next request."
}
},
"required": [
"type",
"companies"
]
},
"Plan": {
"description": "A plan you have associated with a company.",
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of the object - plan.",
"example": "plan"
},
"id": {
"type": "string",
"minLength": 1,
"description": "The Id of the plan",
"example": "33574"
},
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the plan.",
"example": "premium.plan"
}
},
"required": [
"type",
"id",
"name"
],
"title": "Plan"
},
"CompanyTagList": {
"description": "List of tags associated to a company.",
"type": "object",
"title": "Company Tag List",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of the object - tag.list.",
"example": "tag.list"
},
"tags": {
"type": "array",
"description": "List of tags associated to this company.",
"items": {
"$ref": "#/components/schemas/Tag"
}
}
},
"required": [
"type",
"tags"
]
},
"CompanySegmentList": {
"description": "List of segments associated to a company.",
"type": "object",
"title": "Company Segment List",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of the object - segment.list."
},
"segments": {
"type": "array",
"description": "List of segments associated to this company.",
"items": {
"$ref": "#/components/schemas/Segment"
}
}
},
"required": [
"type",
"segments"
]
},
"TagList": {
"description": "List of tags.",
"type": "object",
"title": "Tag List",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of the object - list.",
"example": "list"
},
"data": {
"type": "array",
"uniqueItems": true,
"description": "List of tags.",
"items": {
"$ref": "#/components/schemas/Tag"
}
}
},
"required": [
"type",
"data"
]
},
"SegmentList": {
"description": "List of segments.",
"type": "object",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"description": "The type of the object - list.",
"example": "list"
},
"data": {
"type": "array",
"uniqueItems": true,
"description": "List of segments.",
"items": {
"$ref": "#/components/schemas/Segment"
}
}
},
"required": [
"type",
"data"
],
"title": "Segment List"
},
"NoteList": {
"description": "A list of notes attached to a contact.",
"type": "object",
"title": "Note List",
"properties": {
"type": {
"type": "string",
"minLength": 1,
"example": "list",
"description": "The type of the object - list."
},
"data": {
"type": "array",
"uniqueItems": true,
"description": "List of notes",
"items": {
"$ref": "#/components/schemas/Note"
}
},
"pages": {
"$ref": "#/components/schemas/PagesSimple"
},
"total_count": {
"type": "integer",
"example": 3,
"minimum": 0,
"description": "The total number of notes associated to this contact."
}
},
"required": [
"type",
"data",
"pages",
"total_count"
],
"x-examples": {
"Example": {
"type": "list",
"data": [
{
"type": "note",
"id": "16",
"created_at": 1389913941,
"body": "<p>Text for my note</p>",
"author": {
"type": "admin",
"id": "21",
"name": "Jayne Cobb",
"email": "jayne@serenity.io"
},
"user": {
"type": "user",
"id": "5310d8e8598c9a0b24000005"
}
}
],
"pages": {
"type": "pages",
"next": "https://api.intercom.io/contacts/5d010558220cf7d48317dbb9/notes?per_page=1&page=2",
"page": 1,
"per_page": 50,
"total_pages": 26
},
"total_count": 3
}
}
},
"SearchPagination": {
"description": "Provides information needed to paginate through records in a result set using a cursor. This currently only applies to Searching for Contacts.",
"type": "object",
"title": "Search Pagination",
"properties": {
"per_page": {
"type": "integer",
"description": "The number of items returned in a single response.",
"minimum": 1,
"example": 50
},
"starting_after": {
"type": "string",
"minLength": 1,
"description": "The cursor used for pagination in order to fetch the next page of results.",
"example": "1HaSB+xrOyyMXAkS/c1RteCL7BzOzTvYjmjakgTergIH31eoe2v4/sbLsJWP\\nIncfQLD3ouPkZlCwJ86F\\n"
}
},
"required": [
"per_page",
"starting_after"
]
},
"SearchSorting": {
"description": "The Search resources can sort query results by using the parameters within the sort object.",
"type": "object",
"title": "Search Sorting",
"properties": {
"field": {
"type": "string",
"minLength": 1,
"example": "name",
"description": "Any searchable attribute (available on the Simple Query “Allowed fields“)."
},
"order": {
"type": "string",
"minLength": 1,
"enum": [
"ascending",
"dfescending"
],
"example": "ascending",
"description": "Either “ascending” or “descending” - default to “descending” if none is provided."
}
},
"required": [
"field",
"order"
]
},
"UpdateCompanyRequest": {
"description": "Model used to create or update a company.",
"type": "object",
"title": "Update Company Request",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "The name of the company.",
"example": "Blue Sun"
},
"plan": {
"type": "string",
"minLength": 1,
"description": "The name of the plan you have associated with the company.",
"example": "Paid"
},
"company_id": {
"type": "string",
"minLength": 1,
"description": "The company id you have defined for the company. Can't be updated.",
"example": "6"
},
"remote_created_at": {
"type": "integer",
"example": 1394531169,
"description": "The time the company was created by you."
},
"size": {
"type": "integer",
"example": 750,
"description": "The number of employees in this company."
},
"website": {
"type": "string",
"minLength": 1,
"example": "http://www.example.com",
"description": "The URL for this company's website. Please note that the value specified here is not validated. Accepts any string."
},
"industry": {
"type": "string",
"minLength": 1,
"description": "The industry that this company operates in.",
"example": "Manufacturing"
},
"custom_attributes": {
"type": "object",
"description": "A hash of key/value pairs containing any other data about the company you want Intercom to store."
},
"monthly_spend": {
"type": "number",
"description": "How much revenue the company generates for your business. Note that this will truncate floats. i.e. it only allow for whole integers, 155.98 will be truncated to 155. Note that this has an upper limit of 2**31-1 or 2147483647..",
"example": 495,
"minimum": 0
}
},
"required": [
"name",
"company_id"
]
},
"DeleteCompanyResponse": {
"description": "An object with details on the deleted company.",
"type": "object",
"title": "Delete Company Response",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "The unique identifier for the company which is given by Intercom",
"example": "5ba682d23d7cf92bef87bfd4"
},
"object": {
"type": "string",
"minLength": 1,
"example": "company",
"description": "The type of object - company."
},
"deleted": {
"type": "boolean",
"description": "Whether the company has been deleted - true."
}
},
"required": [
"id",
"object",
"deleted"
]
},
"AttachCompanyToContactRequest": {
"description": "Model used to attach a company to a contact.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"example": "56cde0cc3deab1bd8c000100",
"description": "\t\nThe unique identifier for the company which is given by Intercom"
}
},
"required": [
"id"
],
"title": "Attach Company to Contact Request"
},
"CreateNoteRequest": {
"description": "Model used to create a note\n",
"type": "object",
"title": "Create Note Request",
"properties": {
"body": {
"type": "string",
"minLength": 1,
"description": "The text of the note.",
"example": "Shiny"
},
"admin_id": {
"type": "string",
"minLength": 1,
"description": "The unique identifier for the admin which is given by Intercom.",
"example": "12345"
}
},
"required": [
"body",
"admin_id"
],
"x-examples": {
"Example": {
"body": "Shiny",
"admin_id": "12345"
}
}
}
},
"securitySchemes": {
"Bearer": {
"type": "http",
"scheme": "bearer"
}
},
"responses": {
"BadRequest": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Errors"
},
"examples": {
"Validation Error": {
"value": {
"type": "error.list",
"request_id": "005h5sbchuinuc825nlg",
"errors": [
{
"code": "parameter_invalid",
"message": "Per Page isn't an integer using a starting_after value from a paginated response"
}
]
}
}
}
}
}
}
},
"examples": {
"Contact": {
"value": {
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"has_hard_bounced": false,
"marked_email_as_spam": false,
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"language_override": null,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"android_app_name": null,
"android_app_version": null,
"android_device": null,
"android_os_version": null,
"android_sdk_version": null,
"android_last_seen_at": null,
"ios_app_name": null,
"ios_app_version": null,
"ios_device": null,
"ios_os_version": null,
"ios_sdk_version": null,
"ios_last_seen_at": null,
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags",
"total_count": 3,
"has_more": false
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes",
"total_count": 1,
"has_more": false
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies",
"total_count": 3,
"has_more": false
}
}
},
"ContactList": {
"value": {
"type": "list",
"data": [
{
"type": "contact",
"id": "5ba682d23d7cf92bef87bfd4",
"workspace_id": "ecahpwf5",
"external_id": "25",
"role": "user",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"owner_id": 127,
"social_profiles": {
"type": "list",
"data": [
{
"type": "social_profile",
"name": "Twitter",
"url": "http://twitter.com/th1sland"
}
]
},
"unsubscribed_from_emails": false,
"created_at": 1571672154,
"updated_at": 1571672158,
"signed_up_at": 1571069751,
"last_seen_at": 1571069751,
"last_replied_at": 1571672158,
"last_contacted_at": 1571672158,
"last_email_opened_at": 1571673478,
"last_email_clicked_at": 1571676789,
"browser": "chrome",
"browser_version": "77.0.3865.90",
"browser_language": "en",
"os": "OS X 10.14.6",
"location": {
"type": "location",
"country": "Ireland",
"region": "Dublin",
"city": "Dublin"
},
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
},
"tags": {
"type": "list",
"data": [
{
"type": "tag",
"id": "2",
"url": "/tags/2"
},
{
"type": "tag",
"id": "4",
"url": "/tags/4"
},
{
"type": "tag",
"id": "5",
"url": "/tags/5"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/tags"
},
"notes": {
"type": "list",
"data": [
{
"type": "note",
"id": "20114858",
"url": "/notes/20114858"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/notes"
},
"companies": {
"type": "list",
"data": [
{
"type": "company",
"id": "5ba686093d7cf93552a3dc99",
"url": "/companies/5ba686093d7cf93552a3dc99"
},
{
"type": "company",
"id": "5cee64a03d7cf90c51b36f19",
"url": "/companies/5cee64a03d7cf90c51b36f19"
},
{
"type": "company",
"id": "5d7668883d7cf944dbc5c791",
"url": "/companies/5d7668883d7cf944dbc5c791"
}
],
"url": "/contacts/5ba682d23d7cf92bef87bfd4/companies"
}
}
],
"total_count": 436,
"pages": {
"type": "pages",
"next": {
"page": 2,
"starting_after": "WzE1NzEzMTc0NDYwMDAsIjViYTY4MmQyM2Q3Y2Y5MmJlZjg3YmZkNCIsMl0="
},
"page": 1,
"per_page": 1,
"total_pages": 436
}
}
},
"UpdateContactRequest": {
"value": {
"role": "user",
"external_id": "25",
"email": "wash@serenity.io",
"phone": "+1123456789",
"name": "Hoban Washburn",
"avatar": "https://example.org/128Wash.jpg",
"last_seen_at": 1571069751,
"signed_up_at": 1571069751,
"owner_id": 127,
"unsubscribed_from_emails": false,
"custom_attributes": {
"paid_subscriber": true,
"monthly_spend": 155.5,
"team_mates": 1
}
}
}
}
},
"tags": [
{
"name": "Contacts"
},
{
"name": "Notes"
},
{
"name": "Companies"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment