# update bot

**POST** `/api/v1/update-bot`

Product: [RCS](https://devdocs.pinnacle.in/docs/rcs.md)  
Version: [1.0](https://devdocs.pinnacle.in/docs/rcs/1-0.md)

Request header should have **apikey** and **botId**

Request body validations:

- botName: max characters 40
    
- shortDescription: max characters 100
    
- botMessageType: should be either "TRANSACTIONAL" or "PROMOTIONAL"
    
- phoneNumbers: max array length 3
    
- websites: max array length 3
    
- emails: max array length 3
    
- color: should be in valid hex code format, example: #FFFFFF
    
- botLogoImage: should be valid url, max size 90 KB, size: 224 px X 224px, Image type: PNG, JPG, JPEG
    
- botBannerImage: should be valid url, max size 360KB, size: 1140px X 448px, Image type: PNG, JPG, JPEG
    
- termsofUseUrl: should be valid url
    
- privacyPolicyUrl: should be valid url
    

Example response

``` json
{
  "status": "SUCCESS",
  "code": 200,
  "data": "Bot Details Updated Successfully!"
}

 ```

## Request

URL: `https://api.example.com/rcs/api/v1/update-bot`

Authentication location: `none`

Authentication name: `none`

### Request schema


```json
{
  "type": "object",
  "properties": {
    "color": {
      "type": "string"
    },
    "emails": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      }
    },
    "botName": {
      "type": "string"
    },
    "websites": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        }
      }
    },
    "botLogoImage": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "phoneNumbers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "number": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          }
        }
      }
    },
    "termsofUseUrl": {
      "type": "string"
    },
    "botBannerImage": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "privacyPolicyUrl": {
      "type": "string"
    },
    "shortDescription": {
      "type": "string"
    },
    "languagesSupported": {
      "type": "string"
    }
  }
}
```

### Request example


```json
{
  "color": "#000000",
  "emails": [
    {
      "email": "botbot@gmail.com",
      "label": "Label for Primary Email"
    }
  ],
  "botName": "PinnacleTransBotProdUpdate1",
  "websites": [
    {
      "url": "https://bot-primary.com",
      "label": "Label for Primary Site"
    }
  ],
  "botLogoImage": {
    "url": "https://portal-vistaging.dotgo.com/rcsbotdirectory/vi/image/bot/6202/logoimage/1/XQPLDZ74R0WHRJDFDG6E.jpg",
    "type": "image/jpg"
  },
  "phoneNumbers": [
    {
      "label": "primary phone no label",
      "number": "9049566848",
      "country": "India",
      "countryCode": "+91"
    }
  ],
  "termsofUseUrl": "https://bot-terms.com",
  "botBannerImage": {
    "url": "https://portal-vistaging.dotgo.com/rcsbotdirectory/vi/image/bot/6202/bgimage/1/L6HKQOQLIMD85UD50SLW.jpg",
    "type": "image/jpg"
  },
  "privacyPolicyUrl": "https://bot-privacy.com",
  "shortDescription": "a very short message",
  "languagesSupported": "English "
}
```

## Response schema


```json
{}
```

## Response examples


```json
{}
```

## Status codes


```json
[
  {
    "code": 200,
    "description": "Successful response"
  }
]
```
