# Crisp

> Work Crisp conversations, messages and contact profiles with a workspace API token.

App · Help Desk · 20 actions. Web page: https://docs.lodol.com/docs/integrations/crisp

## Actions

### Add Crisp people event

Add an event, such as 'Upgraded plan', to a profile's timeline.

**Inputs**

- People ID or email (`people_id`, text, required): The profile's people ID (from List or Create people profile), its email address, or its address in the Crisp app.
- Event (`text`, text, required): What happened.
- Colour (`color`, text): Optional colour for the event. One of: `red`, `orange`, `yellow`, `green`, `blue`, `purple`, `pink`, `brown`, `grey`, `black`.
- Event data (`data`, object): Optional key/value details for the event.

**Outputs**

- `color` (text)
- `people_id` (text)
- `text` (text)

**Example output**

```json
{
  "color": "green",
  "people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
  "text": "Upgraded plan"
}
```

### Assign Crisp conversation

Assign a conversation to an operator. Assignment may need a paid Crisp plan.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.
- Operator (`operator_id`, text, required): The operator to assign it to.
- Don't notify the operator (`silent`, true/false): Assign without notifying the operator. Default: `false`.

**Outputs**

- `assigned_user_id` (text)
- `session_id` (text)

**Example output**

```json
{
  "assigned_user_id": "a4c32c68-be91-4e29-8a05-976e93abbe3f",
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
}
```

### Change Crisp conversation state

Mark a conversation pending, unresolved or resolved.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.
- State (`state`, text, required): The new state. One of: `pending`, `unresolved`, `resolved`.

**Outputs**

- `session_id` (text)
- `state` (text)

**Example output**

```json
{
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881",
  "state": "resolved"
}
```

### Create Crisp conversation

Start a new conversation, optionally naming the visitor. Crisp only shows it in the inbox once the visitor has sent a message, so fill in First message to make it visible.

**Inputs**

- Visitor name (`nickname`, text): The visitor's name.
- Visitor email (`email`, text): The visitor's email.
- First message (from the visitor) (`first_message`, text): Posted as the visitor's opening message.

**Outputs**

- `email` (text)
- `first_message_fingerprint` (number)
- `nickname` (text)
- `session_id` (text)

**Example output**

```json
{
  "email": "jordan@example.com",
  "first_message_fingerprint": 150912675256156,
  "nickname": "Jordan Avery",
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
}
```

### Create Crisp people profile

Add a contact profile. The Free plan holds up to 100 profiles.

**Inputs**

- Email (`email`, text, required): The person's email; unique within the workspace.
- Name (`nickname`, text, required): The person's full name.
- Phone (`phone`, text): Phone number.
- Address (`address`, text): Postal address.
- Description (`description`, text): A short description.
- Website (`website`, text): The person's website URL.
- Gender (`gender`, text): Optional. One of: `male`, `female`.
- Company (`company_name`, text): The company the person works for.
- Job title (`job_title`, text): Their job title (needs Company to be set).
- Segments (`segments`, list): Segment tags for the profile.
- Notepad (`notepad`, text): Private notes about the person.

**Outputs**

- `email` (text)
- `nickname` (text)
- `people_id` (text)

**Example output**

```json
{
  "email": "jordan@example.com",
  "nickname": "Jordan Avery",
  "people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
}
```

### Delete Crisp conversation

Permanently delete a conversation and its messages.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.

**Outputs**

- `deleted` (true/false)
- `session_id` (text)

**Example output**

```json
{
  "deleted": true,
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
}
```

### Delete Crisp people profile

Permanently delete a contact profile.

**Inputs**

- People ID or email (`people_id`, text, required): The profile's people ID (from List or Create people profile), its email address, or its address in the Crisp app.

**Outputs**

- `deleted` (true/false)
- `people_id` (text)

**Example output**

```json
{
  "deleted": true,
  "people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50"
}
```

### Get Crisp availability

Whether the workspace shows as online, away or offline. It is online when at least one operator is online.

**Inputs**: None.

**Outputs**

- `since` (number)
- `status` (text)

**Example output**

```json
{
  "since": 1772452353000,
  "status": "online"
}
```

### Get Crisp conversation

Get a conversation's state, visitor and unread counts.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.

**Outputs**

- `active_now` (true/false)
- `assigned_user_id` (text)
- `availability` (text)
- `created_at` (number)
- `email` (text)
- `inbox_id` (text)
- `is_blocked` (true/false)
- `is_verified` (true/false)
- `last_message` (text)
- `nickname` (text)
- `origin` (text)
- `people_id` (text)
- `phone` (text)
- `segments` (list)
- `session_id` (text)
- `state` (text)
- `subject` (text)
- `topic` (text)
- `unread_by_operator` (number)
- `unread_by_visitor` (number)
- `updated_at` (number)
- `waiting_since` (number)
- `website_id` (text)

**Example output**

```json
{
  "active_now": false,
  "assigned_user_id": "a4c32c68-be91-4e29-8a05-976e93abbe3f",
  "availability": "offline",
  "created_at": 1772452353000,
  "email": "jordan@example.com",
  "inbox_id": "",
  "is_blocked": false,
  "is_verified": false,
  "last_message": "Hi, I need help with my order",
  "nickname": "Jordan Avery",
  "origin": "",
  "people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
  "phone": "",
  "segments": [],
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881",
  "state": "unresolved",
  "subject": "",
  "topic": "",
  "unread_by_operator": 1,
  "unread_by_visitor": 0,
  "updated_at": 1772452400000,
  "waiting_since": 0,
  "website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
}
```

### Get Crisp people profile

Get a contact profile by people ID or email.

**Inputs**

- People ID or email (`people_id`, text, required): The profile's people ID (from List or Create people profile), its email address, or its address in the Crisp app.

**Outputs**

- `address` (text)
- `avatar` (text)
- `company_name` (text)
- `created_at` (number)
- `description` (text)
- `email` (text)
- `gender` (text)
- `job_title` (text)
- `last_active_at` (number)
- `nickname` (text)
- `notepad` (text)
- `people_id` (text)
- `phone` (text)
- `score` (number)
- `segments` (list)
- `updated_at` (number)
- `website` (text)

**Example output**

```json
{
  "address": "",
  "avatar": "",
  "company_name": "Avery Consulting",
  "created_at": 1772452353000,
  "description": "",
  "email": "jordan@example.com",
  "gender": "",
  "job_title": "",
  "last_active_at": 0,
  "nickname": "Jordan Avery",
  "notepad": "",
  "people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
  "phone": "+1 555 0100",
  "score": 0,
  "segments": [
    "customer"
  ],
  "updated_at": 1772452353000,
  "website": ""
}
```

### Get Crisp visitor details

Get the visitor details on a conversation: name, email, phone, segments, custom data and location.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.

**Outputs**

- `address` (text)
- `avatar` (text)
- `city` (text)
- `country` (text)
- `data` (object)
- `email` (text)
- `ip` (text)
- `nickname` (text)
- `origin` (text)
- `phone` (text)
- `region` (text)
- `segments` (list)
- `session_id` (text)
- `subject` (text)

**Example output**

```json
{
  "address": "",
  "avatar": "",
  "city": "",
  "country": "",
  "data": {
    "plan": "starter"
  },
  "email": "jordan@example.com",
  "ip": "",
  "nickname": "Jordan Avery",
  "origin": "",
  "phone": "",
  "region": "",
  "segments": [
    "customer"
  ],
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881",
  "subject": ""
}
```

### Get Crisp workspace

Get the connected workspace's name, domain and status.

**Inputs**: None.

**Outputs**

- `domain` (text)
- `institutional` (true/false)
- `logo` (text)
- `name` (text)
- `verified` (true/false)
- `website_id` (text)

**Example output**

```json
{
  "domain": "example.com",
  "institutional": false,
  "logo": "",
  "name": "Avery Consulting",
  "verified": true,
  "website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
}
```

### List Crisp conversations

List conversations with optional search, status, assignment and date filters. On the Free plan Crisp only keeps recent history.

**Inputs**

- Page (`page`, number): Page number, starting at 1. At least 1. Default: `1`.
- Per page (`per_page`, number): Results per page, 20-50. From 20 to 50. Default: `20`.
- Search (`search_query`, text): Text to search for, or a segment name when Search type is Segment.
- Search type (`search_type`, text): How to read Search. One of: `text`, `segment`. Default: `text`.
- Status (`status`, text): Only resolved or only not-resolved conversations. One of: `any`, `resolved`, `not_resolved` (Not resolved). Default: `any`.
- Unread only (`unread_only`, true/false): Only conversations with unread messages. Default: `false`.
- Unassigned only (`unassigned_only`, true/false): Only conversations assigned to nobody. Default: `false`.
- Assigned to (`assigned_to`, text): Only conversations assigned to this operator.
- Include empty (`include_empty`, true/false): Also list conversations with no messages yet. Default: `false`.
- Updated after (`updated_after`, date and time): Only conversations updated after this time.
- Updated before (`updated_before`, date and time): Only conversations updated before this time.
- Order by (`order_by`, text): Sort newest first by this date. Waiting also leaves out conversations not waiting for a reply. One of: `updated` (Last updated), `created`, `waiting` (Waiting for a reply). Default: `updated`.

**Outputs**

- `conversations` (list)
- `count` (number)
- `has_more` (true/false)
- `page` (number)

**Example output**

```json
{
  "conversations": [
    {
      "active_now": false,
      "assigned_user_id": "a4c32c68-be91-4e29-8a05-976e93abbe3f",
      "availability": "offline",
      "created_at": 1772452353000,
      "email": "jordan@example.com",
      "inbox_id": "",
      "is_blocked": false,
      "is_verified": false,
      "last_message": "Hi, I need help with my order",
      "nickname": "Jordan Avery",
      "origin": "",
      "people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
      "phone": "",
      "segments": [],
      "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881",
      "state": "unresolved",
      "subject": "",
      "topic": "",
      "unread_by_operator": 1,
      "unread_by_visitor": 0,
      "updated_at": 1772452400000,
      "waiting_since": 0,
      "website_id": "8c842203-7ed8-4e29-a608-7cf78a7d2fcc"
    }
  ],
  "count": 1,
  "has_more": false,
  "page": 1
}
```

### List Crisp messages

Get the latest batch of messages in a conversation. To page back, pass the result's oldest_timestamp as Before.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.
- Before (`before`, date and time): Messages sent before this time.
- After (`after`, date and time): Messages sent after this time.
- Around (`around`, date and time): Messages centred on this time.

**Outputs**

- `count` (number)
- `messages` (list)
- `oldest_timestamp` (number)
- `session_id` (text)

**Example output**

```json
{
  "count": 1,
  "messages": [
    {
      "automated": false,
      "content": "Hi, I need help with my order",
      "content_data": {},
      "delivered": "",
      "edited": false,
      "fingerprint": 150912675256156,
      "origin": "chat",
      "read": "",
      "sender": "user",
      "timestamp": 1772452400000,
      "type": "text",
      "user_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881",
      "user_nickname": "Jordan Avery"
    }
  ],
  "oldest_timestamp": 1772452400000,
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
}
```

### List Crisp operators

List the workspace's operators (team members).

**Inputs**

- Include pending invites (`include_invites`, true/false): Also list people invited who have not joined yet. Default: `false`.

**Outputs**

- `count` (number)
- `operators` (list)

**Example output**

```json
{
  "count": 1,
  "operators": [
    {
      "availability": "online",
      "email": "sam@example.com",
      "first_name": "Sam",
      "last_name": "Lee",
      "role": "owner",
      "title": "",
      "two_factor_enabled": false,
      "type": "operator",
      "user_id": "a4c32c68-be91-4e29-8a05-976e93abbe3f"
    }
  ]
}
```

### List Crisp people profiles

List contact profiles, with optional search and dates.

**Inputs**

- Page (`page`, number): Page number, starting at 1. At least 1. Default: `1`.
- Per page (`per_page`, number): Results per page, 20-50. From 20 to 50. Default: `20`.
- Search (`search_text`, text): Quick search on name, email and more.
- Sort by field (`sort_field`, text): A profile field name to sort on, such as nickname.
- Sort order (`sort_order`, text): Direction of Sort by field. One of: `ascending`, `descending`.
- Created after (`created_after`, date and time): Only profiles created after this time.
- Created before (`created_before`, date and time): Only profiles created before this time.

**Outputs**

- `count` (number)
- `has_more` (true/false)
- `page` (number)
- `profiles` (list)

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page": 1,
  "profiles": [
    {
      "address": "",
      "avatar": "",
      "company_name": "Avery Consulting",
      "created_at": 1772452353000,
      "description": "",
      "email": "jordan@example.com",
      "gender": "",
      "job_title": "",
      "last_active_at": 0,
      "nickname": "Jordan Avery",
      "notepad": "",
      "people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
      "phone": "+1 555 0100",
      "score": 0,
      "segments": [
        "customer"
      ],
      "updated_at": 1772452353000,
      "website": ""
    }
  ]
}
```

### Mark Crisp messages read

Mark a conversation's messages as read: all of them, or only the listed fingerprints.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.
- Messages sent by (`sender`, text): Whose messages to mark as read. One of: `operator` (Operator (your team)), `user` (Visitor). Default: `user`.
- Message fingerprints (`fingerprints`, list): Only these messages (fingerprints from List messages). Leave empty for all.

**Outputs**

- `fingerprints` (list)
- `sender` (text)
- `session_id` (text)

**Example output**

```json
{
  "fingerprints": [],
  "sender": "user",
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881"
}
```

### Send Crisp message

Send a text message, or an internal note only your team sees, into a conversation. Notes need a paid Crisp plan.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.
- Message (`content`, text, required): The message text.
- Type (`message_type`, text): A message the visitor sees, or an internal note. One of: `text` (Message), `note` (Internal note). Default: `text`.
- Send as (`sender`, text): Who the message comes from. One of: `operator` (Operator (your team)), `user` (Visitor). Default: `operator`.

**Outputs**

- `fingerprint` (number)
- `sender` (text)
- `session_id` (text)
- `type` (text)

**Example output**

```json
{
  "fingerprint": 150912675256156,
  "sender": "operator",
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881",
  "type": "text"
}
```

### Update Crisp people profile

Change a contact profile. Only fields you fill in change.

**Inputs**

- People ID or email (`people_id`, text, required): The profile's people ID (from List or Create people profile), its email address, or its address in the Crisp app.
- Email (`email`, text): A new email for the profile.
- Name (`nickname`, text): The person's full name.
- Phone (`phone`, text): Phone number.
- Address (`address`, text): Postal address.
- Description (`description`, text): A short description.
- Website (`website`, text): The person's website URL.
- Gender (`gender`, text): Optional. One of: `male`, `female`.
- Company (`company_name`, text): The company the person works for.
- Job title (`job_title`, text): Their job title (needs Company to be set).
- Segments (`segments`, list): Segment tags for the profile. Replaces the profile's current segments.
- Notepad (`notepad`, text): Private notes about the person.

**Outputs**

- `people_id` (text)
- `updated_fields` (list)

**Example output**

```json
{
  "people_id": "c5a2f70c-f605-4648-b47f-8c39d4b03a50",
  "updated_fields": [
    "person"
  ]
}
```

### Update Crisp visitor details

Set the visitor's name, email, phone, subject, segments or custom data on a conversation. Only fields you fill in change.

**Inputs**

- Conversation session ID (`session_id`, text, required): The conversation, as session_... (from List conversations or Create conversation) or its address in the Crisp inbox.
- Visitor name (`nickname`, text): The visitor's name.
- Visitor email (`email`, text): The visitor's email.
- Phone (`phone`, text): The visitor's phone number.
- Address (`address`, text): The visitor's address.
- Subject (`subject`, text): The conversation's subject.
- Segments (`segments`, list): Segment tags for the conversation. Replaces the current ones.
- Custom data (`data`, object): Custom key/value data about the visitor.

**Outputs**

- `session_id` (text)
- `updated_fields` (list)

**Example output**

```json
{
  "session_id": "session_700c65e1-85e2-465a-b9ac-ecb5ec2c9881",
  "updated_fields": [
    "nickname"
  ]
}
```
