live_help Notes

assignment_ind This action requires a token resource owner scoped on forum with enough privileges .

settings Params

Param name Description
id required . Must be String

The requested id

message optional , nil allowed . Must be a Hash
message[author_id] optional . Must be Fixnum

The author id.

message[content] optional . Must be String

The content.

message[content_html] optional , nil allowed . Must be String

The content html.

message[parent_id] optional , nil allowed . Must be Fixnum

The parent id.

message[reference_id] optional , nil allowed . Must be Fixnum

The reference id.

message[deleted_at] optional , nil allowed . Must be DateTime

The deleted at.

message[is_root] optional , nil allowed . Must be one of: true, false.

Is it is root ? Default to false.

message[messageable_type] optional , nil allowed . Must be String

The messageable type.

message[messageable_id] optional , nil allowed . Must be Fixnum

The messageable id.

message[write_at] optional , nil allowed . Must be DateTime

The write at.

message[readings_count] optional , nil allowed . Must be Fixnum

The readings count. Default to 0.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/messages/87
{
  "message": {
    "author_id": "83",
    "content": "Hello world",
    "messageable_id": "1",
    "messageable_type": "Topic"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"message":{"author_id":"83","content":"Hello world","messageable_id":"1","messageable_type":"Topic"}}' "https://api.intra.42.fr/v2/messages/87"
require "oauth2"
UID = "Your application uid"
SECRET = "Your application secret"
client = OAuth2::Client.new(UID, SECRET, site: "https://api.intra.42.fr")
token = client.client_credentials.get_token

params = {message: {author_id: "83", content: "Hello world", messageable_id: "1", messageable_type: "Topic"}}
response = token.put("/v2/messages/87", params: params)
response.status
# => 204
response.parsed
# =>