live_help Notes

assignment This action requires one of theses roles: Advanced staff

settings Params

Param name Description
id required . Must be String

The requested id

note optional , nil allowed . Must be a Hash
note[user_id] optional . Must be Fixnum

The user id.

note[from] optional , nil allowed . Must be String

The from.

note[subject] optional , nil allowed . Must be String

The subject.

note[content] optional , nil allowed . Must be String

The content.

note[kind] optional , nil allowed . Must be one of: manual, black_hole, school_record.

The kind.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/notes/9
{
  "note": {
    "content": "waistcoat sartorial cornhole dreamcatcher pop-up scenester cleanse hammock shoreditch pug iPhone freegan",
    "from": "andre@42.fr",
    "subject": "swag",
    "user_id": "109"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"note":{"content":"waistcoat sartorial cornhole dreamcatcher pop-up scenester cleanse hammock shoreditch pug iPhone freegan","from":"andre@42.fr","subject":"swag","user_id":"109"}}' "https://api.intra.42.fr/v2/notes/9"
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 = {note: {content: "waistcoat sartorial cornhole dreamcatcher pop-up scenester cleanse hammock shoreditch pug iPhone freegan", from: "andre@42.fr", subject: "swag", user_id: "109"}}
response = token.put("/v2/notes/9", params: params)
response.status
# => 204
response.parsed
# =>