Small issue with Create conversation endpoint | Community
Skip to main content
Answered

Small issue with Create conversation endpoint

  • March 25, 2024
  • 1 reply
  • 60 views

Andrii Fedyk
Forum|alt.badge.img+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"
        }
    ]
}

```

 

Best answer by Jacob Cox

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!

1 reply

Jacob Cox
Intercom Team
Forum|alt.badge.img+5
  • Sr. Technical Support Engineer
  • Answer
  • March 31, 2024

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!