> ## Documentation Index
> Fetch the complete documentation index at: https://help.teable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Patch adminannouncement withdraw

> Withdraw an announcement. Idempotent: re-withdrawing returns the same result

Required token scopes: `instance|update`



## OpenAPI

````yaml /swagger.json patch /admin/announcement/{announcementId}/withdraw
openapi: 3.0.0
info:
  version: 1.0.0
  title: Teable App
  description: Manage Data as easy as drink a cup of tea
  x-logo:
    backgroundColor: '#F0F0F0'
    altText: Teable logo
servers:
  - url: https://app.teable.ai/api
security: []
tags:
  - name: base
    x-group: project
  - name: base node
    x-group: project node
  - name: base-share
    x-group: project-share
paths:
  /admin/announcement/{announcementId}/withdraw:
    patch:
      tags:
        - admin
      description: >-
        Withdraw an announcement. Idempotent: re-withdrawing returns the same
        result


        Required token scopes: `instance|update`
      parameters:
        - schema:
            type: string
          required: true
          name: announcementId
          in: path
      responses:
        '200':
          description: The withdrawn announcement
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  form:
                    type: string
                    enum:
                      - banner
                      - toast
                      - modal
                      - sidebar-card
                  level:
                    type: string
                    enum:
                      - info
                      - warning
                      - critical
                      - success
                  title:
                    type: object
                    properties:
                      en:
                        type: string
                        maxLength: 5000
                      zh:
                        type: string
                        maxLength: 5000
                      it:
                        type: string
                        maxLength: 5000
                      fr:
                        type: string
                        maxLength: 5000
                      de:
                        type: string
                        maxLength: 5000
                      ja:
                        type: string
                        maxLength: 5000
                      ru:
                        type: string
                        maxLength: 5000
                      uk:
                        type: string
                        maxLength: 5000
                      tr:
                        type: string
                        maxLength: 5000
                      es:
                        type: string
                        maxLength: 5000
                      ar:
                        type: string
                        maxLength: 5000
                      he:
                        type: string
                        maxLength: 5000
                  message:
                    type: object
                    properties:
                      en:
                        type: string
                        maxLength: 5000
                      zh:
                        type: string
                        maxLength: 5000
                      it:
                        type: string
                        maxLength: 5000
                      fr:
                        type: string
                        maxLength: 5000
                      de:
                        type: string
                        maxLength: 5000
                      ja:
                        type: string
                        maxLength: 5000
                      ru:
                        type: string
                        maxLength: 5000
                      uk:
                        type: string
                        maxLength: 5000
                      tr:
                        type: string
                        maxLength: 5000
                      es:
                        type: string
                        maxLength: 5000
                      ar:
                        type: string
                        maxLength: 5000
                      he:
                        type: string
                        maxLength: 5000
                  options:
                    type: object
                    nullable: true
                    properties:
                      action:
                        type: object
                        properties:
                          label:
                            type: object
                            properties:
                              en:
                                type: string
                                maxLength: 5000
                              zh:
                                type: string
                                maxLength: 5000
                              it:
                                type: string
                                maxLength: 5000
                              fr:
                                type: string
                                maxLength: 5000
                              de:
                                type: string
                                maxLength: 5000
                              ja:
                                type: string
                                maxLength: 5000
                              ru:
                                type: string
                                maxLength: 5000
                              uk:
                                type: string
                                maxLength: 5000
                              tr:
                                type: string
                                maxLength: 5000
                              es:
                                type: string
                                maxLength: 5000
                              ar:
                                type: string
                                maxLength: 5000
                              he:
                                type: string
                                maxLength: 5000
                          url:
                            type: string
                            format: uri
                        required:
                          - url
                  startTime:
                    type: string
                  endTime:
                    type: string
                  audience:
                    oneOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - all
                        required:
                          - type
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - space
                          ids:
                            type: array
                            items:
                              type: string
                            minItems: 1
                            maxItems: 100
                        required:
                          - type
                          - ids
                      - type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - user
                          ids:
                            type: array
                            items:
                              type: string
                            minItems: 1
                            maxItems: 100
                        required:
                          - type
                          - ids
                  status:
                    type: string
                    enum:
                      - scheduled
                      - active
                      - expired
                      - withdrawn
                  withdrawnTime:
                    type: string
                    nullable: true
                  createdBy:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      avatar:
                        type: string
                        nullable: true
                    required:
                      - id
                      - name
                      - avatar
                  createdTime:
                    type: string
                required:
                  - id
                  - form
                  - level
                  - title
                  - message
                  - options
                  - startTime
                  - endTime
                  - audience
                  - status
                  - withdrawnTime
                  - createdBy
                  - createdTime
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: Shell
          source: |-
            curl --request PATCH \
              --url https://app.teable.ai/api/admin/announcement/%7BannouncementId%7D/withdraw \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: JavaScript
          source: >-
            const url =
            'https://app.teable.ai/api/admin/announcement/%7BannouncementId%7D/withdraw';

            const options = {method: 'PATCH', headers: {Authorization: 'Bearer
            REPLACE_BEARER_TOKEN'}};


            try {
              const response = await fetch(url, options);
              const data = await response.json();
              console.log(data);
            } catch (error) {
              console.error(error);
            }
        - lang: Node.js
          source: |-
            const http = require('https');

            const options = {
              method: 'PATCH',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/admin/announcement/%7BannouncementId%7D/withdraw',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN'
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on('data', function (chunk) {
                chunks.push(chunk);
              });

              res.on('end', function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: Python
          source: >-
            import http.client


            conn = http.client.HTTPSConnection("app.teable.ai")


            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }


            conn.request("PATCH",
            "/api/admin/announcement/%7BannouncementId%7D/withdraw",
            headers=headers)


            res = conn.getresponse()

            data = res.read()


            print(data.decode("utf-8"))
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````