Create Feature.

POST /api/teams/{team}/features

Path parameters

  • team integer Required

    The ID of the team that features belong to.

application/json

Body Required

  • key string Required

    Must match the regex /[a-z0-9]+(?:_[a-z0-9]+)*$/i. Must not be greater than 255 characters.

  • description string
  • enabled boolean
  • value string

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
        • description string
        • enabled boolean
        • value 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
  • 402 application/json
    Hide response attribute Show response attribute object
    • message 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]
POST /api/teams/{team}/features
curl \
 -X POST https://checkmango.com/api/teams/20/features \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"key":"eounxrt","description":"Consequatur velit alias quam sit esse qui.","enabled":false,"value":"neque"}'
Request example
{
  "key": "eounxrt",
  "description": "Consequatur velit alias quam sit esse qui.",
  "enabled": false,
  "value": "neque"
}
Response examples (200)
{
  "data": {
    "id": "SUNT_CUPIDITATE_NISI_QUIA_LABORUM",
    "type": "features",
    "attributes": {
      "id": 3,
      "team_id": 61,
      "key": "SUNT_CUPIDITATE_NISI_QUIA_LABORUM",
      "description": "Eum ipsum error ab et quam assumenda eveniet. At occaecati laudantium veniam aut. Ut qui quisquam voluptatem a temporibus qui veniam. Rem voluptates voluptatum dignissimos velit voluptatibus eum voluptate.\n\nHarum sit incidunt ut. Architecto doloremque asperiores eos quae distinctio necessitatibus qui. Repellat assumenda vel sunt voluptas officia.\n\nReiciendis illo aliquam hic excepturi quia voluptatum. Rem quaerat veritatis ipsam ipsa. At sed sequi in voluptatem. Quia officia necessitatibus culpa omnis ullam.",
      "enabled": true,
      "value": null,
      "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/61/features/SUNT_CUPIDITATE_NISI_QUIA_LABORUM"
      }
    }
  }
}
Response examples (402)
{
  "message": "Subscription required."
}
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."
    ]
  }
}