Answered

Small issue with Create conversation endpoint

  • 25 March 2024
  • 1 reply
  • 13 views

Userlevel 1

When call API to create a conversation with empty `body` and one file attached, the API response with an error, but on https://app.intercom.com/a/inbox/ the chat appear.

Here an example of CURL:

```bash

curl --location 'https://api.intercom.io/conversations' \
--header 'Authorization: Bearer <admin_token>' \
--header 'Content-Type: application/json' \
--header 'Intercom-Version: 2.10' \
--data '{
    "from": {
        "type": "user",
        "id": "<contact_id>"
    },
    "subject": "Test Subject",
    "attachment_urls": [
        "https://picsum.photos/seed/picsum/512/512"
    ]
}'

```

The example of response:

```JSON

{
    "type": "error.list",
    "request_id": "0035jabkv5b82qmiu3cg",
    "errors": [
        {
            "code": "server_error",
            "message": "Server Error"
        }
    ]
}

```

 

icon

Best answer by Jacob Cox 31 March 2024, 22:21

View original

1 reply

Userlevel 4
Badge +5

Hey there @Andrii Fedyk !

Thanks for pointing this out! I was able to replicate this error.

It seems to be thrown because we expect a comment to be created, but there isn’t one present. But we create the conversation anyway.

I’ll let our Product Team know about this behavior and see if they can clean this up a bit!

Reply