Send a Direct Message with custom profile

To attach a custom profile to a Direct Message add a event.custom_profile_id parameter to the POST direct_messages/events/new.json request.

Note: See full documentation for all properties. Custom profiles can also be used with welcome messages.

Parameters

event.custom_profile_id The string ID of the custom profile to attach to the Direct Message.

Example Request

{
  "event": {
    "type": "message_create",
    "message_create": {
      "target": {
        "recipient_id": "844385345234"
      },
      "message_data": {
        "text": "Hi, my name is Jon. How can I help?",
      },
      "custom_profile_id": "100001"
    }
  }
}

Example request using Twurl

twurl -A 'Content-type: application/json' -X POST /1.1/direct_messages/events/new.json -d ' { "event": { "type": "message_create", "message_create": { "target": { "recipient_id": "844385345234" }, "message_data": { "text": "Hi, my name is Jon. How can I help?", }, "custom_profile_id": "100001" } } }'

Example Response

{
  "event": {
    "type": "message_create",
    "message_create": {
      "target": {
        "recipient_id": "844385345234"
      },
      "sender_id": "1241124",
      "message_data": {
        "text": "Hi, my name is Jon. How can I help?",
      },
      "custom_profile_id":  "100001"
    }
  }
}

Was this document helpful?

Thank you

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?

Thank you for the feedback. Your comments will help us improve our documents in the future.