Launches an announcement

POST /api/sync/v1/announcements/launch

Operation id: launchAnnouncement

Description

This API can be used to launch a DRAFT announcement by providing the announcement id generated from CREATE API. The user can also update the sendNow value and this will be taken as the final value for the announcement whether it would be launched to the recipeints immediately or not.

The announcement will be launched with a LAUNCHED status.

Permission required: announcements which depends on wcc-chat(base)

Tags: Announcement APIs

Security

  • Bearer (http / bearer)
    • enter the client service token value.

Responses

200 — Announcement launched successfully

Content type: application/json

400 — Bad request

404 — Announcement not found

500 — Internal server error

Request body

Required: Yes

application/json

Schema

PropertyTypeRequiredDescription
announcementIdinteger (int32)Yesannouncement id which is to be launched.
sendNowbooleanNoflag to send notifications immediately
{
  "type": "object",
  "required": [
    "announcementId"
  ],
  "properties": {
    "announcementId": {
      "type": "integer",
      "format": "int32",
      "description": "announcement id which is to be launched."
    },
    "sendNow": {
      "type": "boolean",
      "description": "flag to send notifications immediately"
    }
  }
}

Response models

200 — Announcement launched successfully

Content type: application/json

Schema

PropertyTypeRequiredDescription
messagestringNoresponse message
statusstringNoresponse status
statusCodeinteger (int32)Noresponse status code
debugErrorMessagestringNoerror message
messageCodestringNomessage codes
messageParamsarrayNomessage parameters
dataobjectNo
announcementIdinteger (int32)Noannouncement Id
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "response message"
    },
    "status": {
      "type": "string",
      "description": "response status",
      "enum": [
        "SUCCESS",
        "FAIL",
        "BAD_REQUEST",
        "NO_CONTENT",
        "UNAUTHORIZED",
        "FORBIDDEN",
        "NOT_FOUND",
        "INTERNAL_SERVER_ERROR",
        "UNSUPPORTED_MEDIA_TYPE"
      ]
    },
    "statusCode": {
      "type": "integer",
      "format": "int32",
      "description": "response status code"
    },
    "debugErrorMessage": {
      "type": "string",
      "description": "error message"
    },
    "messageCode": {
      "type": "string",
      "description": "message codes",
      "items": {
        "type": "string",
        "example": [
          "ERROR62- Error launching announcement.",
          "ERROR44-Error creating announcement.",
          "ERROR45-Error updating announcement.",
          "Error49-Error deleting announcement"
        ]
      }
    },
    "messageParams": {
      "type": "array",
      "description": "message parameters",
      "items": {
        "type": "string"
      }
    },
    "data": {
      "type": "object"
    },
    "announcementId": {
      "type": "integer",
      "format": "int32",
      "description": "announcement Id"
    }
  }
}