> ## 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.

# Post adminannouncement

> Publish an announcement

Required token scopes: `instance|update`



## OpenAPI

````yaml /swagger.json post /admin/announcement
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:
    post:
      tags:
        - admin
      description: |-
        Publish an announcement

        Required token scopes: `instance|update`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                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
                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
                options:
                  type: object
                  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
                  format: date-time
                endTime:
                  type: string
                  format: date-time
              required:
                - form
                - level
                - title
                - message
                - audience
                - startTime
                - endTime
      responses:
        '201':
          description: The published 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 POST \
              --url https://app.teable.ai/api/admin/announcement \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"form":"banner","level":"info","title":{"en":"string","zh":"string","it":"string","fr":"string","de":"string","ja":"string","ru":"string","uk":"string","tr":"string","es":"string","ar":"string","he":"string"},"message":{"en":"string","zh":"string","it":"string","fr":"string","de":"string","ja":"string","ru":"string","uk":"string","tr":"string","es":"string","ar":"string","he":"string"},"audience":{"type":"all"},"options":{"action":{"label":{"en":"string","zh":"string","it":"string","fr":"string","de":"string","ja":"string","ru":"string","uk":"string","tr":"string","es":"string","ar":"string","he":"string"},"url":"http://example.com"}},"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"}'
        - lang: JavaScript
          source: |-
            const url = 'https://app.teable.ai/api/admin/announcement';
            const options = {
              method: 'POST',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              },
              body: '{"form":"banner","level":"info","title":{"en":"string","zh":"string","it":"string","fr":"string","de":"string","ja":"string","ru":"string","uk":"string","tr":"string","es":"string","ar":"string","he":"string"},"message":{"en":"string","zh":"string","it":"string","fr":"string","de":"string","ja":"string","ru":"string","uk":"string","tr":"string","es":"string","ar":"string","he":"string"},"audience":{"type":"all"},"options":{"action":{"label":{"en":"string","zh":"string","it":"string","fr":"string","de":"string","ja":"string","ru":"string","uk":"string","tr":"string","es":"string","ar":"string","he":"string"},"url":"http://example.com"}},"startTime":"2019-08-24T14:15:22Z","endTime":"2019-08-24T14:15:22Z"}'
            };

            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: 'POST',
              hostname: 'app.teable.ai',
              port: null,
              path: '/api/admin/announcement',
              headers: {
                Authorization: 'Bearer REPLACE_BEARER_TOKEN',
                'content-type': 'application/json'
              }
            };

            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.write(JSON.stringify({
              form: 'banner',
              level: 'info',
              title: {
                en: 'string',
                zh: 'string',
                it: 'string',
                fr: 'string',
                de: 'string',
                ja: 'string',
                ru: 'string',
                uk: 'string',
                tr: 'string',
                es: 'string',
                ar: 'string',
                he: 'string'
              },
              message: {
                en: 'string',
                zh: 'string',
                it: 'string',
                fr: 'string',
                de: 'string',
                ja: 'string',
                ru: 'string',
                uk: 'string',
                tr: 'string',
                es: 'string',
                ar: 'string',
                he: 'string'
              },
              audience: {type: 'all'},
              options: {
                action: {
                  label: {
                    en: 'string',
                    zh: 'string',
                    it: 'string',
                    fr: 'string',
                    de: 'string',
                    ja: 'string',
                    ru: 'string',
                    uk: 'string',
                    tr: 'string',
                    es: 'string',
                    ar: 'string',
                    he: 'string'
                  },
                  url: 'http://example.com'
                }
              },
              startTime: '2019-08-24T14:15:22Z',
              endTime: '2019-08-24T14:15:22Z'
            }));
            req.end();
        - lang: Python
          source: >-
            import http.client


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


            payload =
            "{\"form\":\"banner\",\"level\":\"info\",\"title\":{\"en\":\"string\",\"zh\":\"string\",\"it\":\"string\",\"fr\":\"string\",\"de\":\"string\",\"ja\":\"string\",\"ru\":\"string\",\"uk\":\"string\",\"tr\":\"string\",\"es\":\"string\",\"ar\":\"string\",\"he\":\"string\"},\"message\":{\"en\":\"string\",\"zh\":\"string\",\"it\":\"string\",\"fr\":\"string\",\"de\":\"string\",\"ja\":\"string\",\"ru\":\"string\",\"uk\":\"string\",\"tr\":\"string\",\"es\":\"string\",\"ar\":\"string\",\"he\":\"string\"},\"audience\":{\"type\":\"all\"},\"options\":{\"action\":{\"label\":{\"en\":\"string\",\"zh\":\"string\",\"it\":\"string\",\"fr\":\"string\",\"de\":\"string\",\"ja\":\"string\",\"ru\":\"string\",\"uk\":\"string\",\"tr\":\"string\",\"es\":\"string\",\"ar\":\"string\",\"he\":\"string\"},\"url\":\"http://example.com\"}},\"startTime\":\"2019-08-24T14:15:22Z\",\"endTime\":\"2019-08-24T14:15:22Z\"}"


            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
            }


            conn.request("POST", "/api/admin/announcement", payload, headers)


            res = conn.getresponse()

            data = res.read()


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

````