Update Event.

PUT /api/teams/{team}/events/{event}

Path parameters

  • team integer Required

    The ID of the team that the event belongs to.

  • event string Required

    The key of the event to show.

application/json

Body

  • key string

    The key to use for the event.

  • description string

    The description of the event.

  • type string

    The type of event to create.

    Values are unique or count.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • data object
      Hide data attributes Show data attributes object
      • id string
      • type string
      • attributes object
        Hide attributes attributes Show attributes attributes object
        • id integer
        • team_id integer
        • key string
        • type string
        • description string
        • created object
          Hide created attributes Show created attributes object
          • human string
          • string string
        • updated object
          Hide updated attributes Show updated attributes object
          • human string
          • string string
  • 403 application/json
    Hide response attribute Show response attribute object
    • message string
  • 404 application/json
    Hide response attribute Show response attribute object
    • message string
  • 422 application/json
    Hide response attributes Show response attributes object
    • message string
    • errors object
      Hide errors attribute Show errors attribute object
      • key array[string]
PUT /api/teams/{team}/events/{event}
curl \
 -X PUT https://checkmango.com/api/teams/1/events/quam \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"key":"MY_NEW_EVENT","description":"Perferendis excepturi rerum doloremque est ratione officia veritatis.","type":"unique"}'
Request example
{
  "key": "MY_NEW_EVENT",
  "description": "Perferendis excepturi rerum doloremque est ratione officia veritatis.",
  "type": "unique"
}
Response examples (200)
{
  "data": {
    "id": "ET_TOTAM_OMNIS_ET",
    "type": "events",
    "attributes": {
      "id": 21,
      "team_id": 47,
      "key": "ET_TOTAM_OMNIS_ET",
      "type": "unique",
      "description": "Error laboriosam voluptas perspiciatis et. Fuga voluptatem temporibus fugiat in quam aut sapiente. Reprehenderit nihil ea quia tempore assumenda architecto.\n\nCorrupti quis est hic laudantium molestias. Iste at eos blanditiis voluptas. Et aut qui in quia dolorem quod nesciunt occaecati.\n\nMaiores recusandae recusandae doloribus nesciunt et ad sit. Deserunt et enim magni distinctio est omnis. Nihil ducimus ex est ratione. Quo culpa exercitationem est sint asperiores.",
      "created": {
        "human": "1 second ago",
        "string": "2024-04-08 10:42:02"
      },
      "updated": {
        "human": "1 second ago",
        "string": "2024-04-08 10:42:02"
      }
    },
    "links": {
      "self": {
        "href": "http://checkmango.com/api/teams/47/events/ET_TOTAM_OMNIS_ET"
      }
    }
  }
}
Response examples (403)
{
  "message": "Unauthenticated."
}
Response examples (404)
{
  "message": "Not Found"
}
Response examples (422)
{
  "message": "The given data was invalid.",
  "errors": {
    "key": [
      "The key has already been taken."
    ]
  }
}