---     
tags: 
  - Regions
description: Updates a region.
parameters:
  - in: header
    name: Authorization
    type: string
    required: true
  - in: body
    name: body
    type: object
    required: true
    schema: {
        'region_polygon': '{"type": "Polygon", "coordinates": [[[-0.63720703125, 51.19812101610383], [-0.63720703125, 51.275504932210275], [-0.490264892578125, 51.275504932210275], [-0.490264892578125, 51.19812101610383], [-0.63720703125, 51.19812101610383]]]}', 
        'name': 'New Name', 
        'enabled': False, 
        'renderable': False, 
        'alerts_enabled': True, 
        'alerts_config': {
          "AlertThreshold": 1, 
          "AlertType": 2, 
          "LastDate": 3, 
          "MinPixels": 4, 
          "drift": 5,
          "nbors_flag": 6,
          "nbors_min": 7, 
          "nbors_range": 8, 
          "norecentdata": 9, 
          "recentalertdays": 10, 
          "seasonal_flag": 11, 
          "ts_colours": 12, 
          "velmap_colours": 13, 
          "zero_yaxis": 14
        },  
        'style': {
          'fill_opacity': 0.2,
          'fill_colour': "#ABCDEF",
          'border_weight': 5,
          'border_opacity': 0.3,
          'border_colour': "#FEDCBA"
        }, 
        'expires_at': '20240923'
      }
produces: 
  - 'application/json'
responses:
  200:
    schema:
      type: object
      example: {
        "message": "region updated"
      }
  400:
    schema:
      type: object
      properties:
        error:
          type: string
          example: {
            "message": "invalid polygon"
          }
  401:
    schema:
      type: object
      properties:
        error:
          type: string
          example: 'Unauthorised'