Example Request
$ curl https://api.intercom.io/notes \
-X POST \
-H 'Authorization:Bearer <Your access token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' -d '
{
"admin_id" : "21",
"body": "Text for my note",
"user": {
"id" : "5310d8e8598c9a0b24000005"
}
}'
HTTP/1.1 200 OK
{
"type": "note",
"id": "16",
"created_at": 1389913941,
"body": "<p>Text for my note</p>",
"author": {
"type": "admin",
"id": "21",
"name": "Jayne Cobb",
"email": "[email protected]",
"companies": []
},
"user": {
"type": "user",
"id": "5310d8e8598c9a0b24000005"
}
}
intercom.notes.create(:body => "Text for the note", :email => '[email protected]')
<?php
$intercom->notes->create([
"body" => "Text for the note",
"user" => (["id" => "4956efd9aad5c02fc4750ee9"])]
);
?>
User user = new User().setEmail("[email protected]");
Author author = new Author().setId("1");
Note note = new Note()
.setUser(user)
.setAuthor(author)
.setBody("Text for the note");
Note.create(note);
Notes can be created via a POST
method to https://api.intercom.io/notes
, which accepts a JSON object describing the note.
Attributes
The table below shows the fields you can use to create a note -
Argument | Required | Description |
---|---|---|
user | Yes | Representation of the user the note is to be created about. |
user.user_id | one of | Your user_id for the user |
user.email | one of | Your email address for the user |
user.id | one of | The user id for the user |
admin_id | No | The id of the admin creating the note. |
body | Yes | The text of the note. |
Returns
A note object. The submitted body may be enclosed with html p
elements in the response.