Import a Message as a Customer

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://reference.textline.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Textline API MCP server": {
    "url": "https://reference.textline.com/mcp"
  }
}

Close
POST /api/new_customer_post.json

This endpoint allows you to import a post into Textline as if the Customer sent an SMS to your account. This is useful for initiating conversations using another tool, like web chat, and then continuing over SMS.

application/json

Body

  • phone_number string Required

    The phone number of the contact whose conversation you want to retrieve

  • group_uuid string

    The uuid of the department from which you want to retrieve conversations

    Default value is <1st Department UUID>.

  • comment object

    The content visible to the customer

    Hide comment attribute Show comment attribute object
    • body string
  • attachments array

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • post object
      Hide post attributes Show post attributes object
      • attachments array
      • body string | null

        The body of the message, if there is one

      • conversation_uuid string

        The uuid of the parent conversation

      • created_at number

        The unix time stamp of the created time for the post

      • creator object

        If the creator is a customer or user, additional fields specific to those types will be included

        Hide creator attributes Show creator attributes object
        • name `Chuck Finley` string
        • type string

          Values are customer, system, or user.

      • is_whisper boolean
      • marked_as_resolved boolean

        Did this post mark the conversation as resolved

      • transferred_to object

        The agent that this post transferred the conversation to.

        Hide transferred_to attributes Show transferred_to attributes object
        • avatar_url string | null
        • name string
        • on_call boolean

          Is this agent available to receive notifications

        • username string
        • uuid string
        • email string
        • permission_level string
        • group_uuids array
      • assigned_to object

        The agent that claimed the conversation with this post.

        Hide assigned_to attributes Show assigned_to attributes object
        • avatar_url string | null
        • name string
        • on_call boolean

          Is this agent available to receive notifications

        • username string
        • uuid string
        • email string
        • permission_level string
        • group_uuids array
      • uuid string
      • first_post boolean

        Is this the first post in the conversation/thread

      • message_type string

        Outlines whether the message is one of: SMS, webchat, null.

    • group object
      Hide group attributes Show group attributes object
      • name string
      • phone_number string | null
      • uuid string
      • is_sms_group boolean
POST /api/new_customer_post.json
curl \
 --request POST 'https://application.textline.com/api/new_customer_post.json' \
 --header "Content-Type: application/json" \
 --data '{
  "phone_number": "(222) 222-2222",
  "group_uuid": "``",
  "comment": {
    "body": "hello world"
  },
  "attachments": [
    "Attachment_Upload_Payload"
  ]
}'
Request example
{
  "phone_number": "(222) 222-2222",
  "group_uuid": "``",
  "comment": {
    "body": "hello world"
  },
  "attachments": [
    "Attachment_Upload_Payload"
  ]
}
Response examples (200)
{
  "post": {
    "assigned_to": {
      "avatar_url": "https://example.com/image.png",
      "name": "Chuck Finley",
      "on_call": true,
      "username": "ChuckF",
      "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369",
      "email": "chuckf@textline.com",
      "permission_level": "Admin",
      "group_uuids": [
        "21ca50a9-a85d-49d1-9266-0df69fd5a9ef",
        "35c450e8-5b60-46e2-b691-481419462c16"
      ]
    },
    "attachments": [
      {
        "content_type": "image/jpeg",
        "name": "my_photo.png",
        "url": "https://example.com/image.png"
      }
    ],
    "body": "hello world",
    "conversation_uuid": "84a2c56f-6b79-4764-811d-90880e2757b4",
    "created_at": 1493923935,
    "creator": {
      "name `Chuck Finley`": "",
      "type": "user"
    },
    "first_post": false,
    "is_whisper": false,
    "marked_as_resolved": false,
    "message_type": "SMS",
    "transferred_to": {
      "avatar_url": "https://example.com/image.png",
      "name": "Chuck Finley",
      "on_call": true,
      "username": "ChuckF",
      "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369",
      "email": "chuckf@textline.com",
      "permission_level": "Admin",
      "group_uuids": [
        "21ca50a9-a85d-49d1-9266-0df69fd5a9ef",
        "35c450e8-5b60-46e2-b691-481419462c16"
      ]
    },
    "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369"
  },
  "group": {
    "name": "Sales",
    "phone_number": "(222) 222-2222",
    "uuid": "deb79a6a-0652-4e14-86f2-dc8c5c502369",
    "is_sms_group": true
  }
}