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 , nil allowed . 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.

comments powered by <span class='logo-disqus'>Disqus</span>
PUT /v2/notes/8
{
  "note": {
    "content": "flannel butcher roof freegan semiotics twee wayfarers literally farm-to-table migas chia tilde",
    "from": "andre@42.fr",
    "subject": "semiotics",
    "user_id": "30"
  }
}
204
curl  -X PUT -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -H "Content-Type: application/json" -d '{"note":{"content":"flannel butcher roof freegan semiotics twee wayfarers literally farm-to-table migas chia tilde","from":"andre@42.fr","subject":"semiotics","user_id":"30"}}' "https://api.intra.42.fr/v2/notes/8"
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: "flannel butcher roof freegan semiotics twee wayfarers literally farm-to-table migas chia tilde", from: "andre@42.fr", subject: "semiotics", user_id: "30"}}
response = token.put("/v2/notes/8", params: params)
response.status
# => 204
response.parsed
# =>