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

# Upsert Website Keys

> Update a Website's VAPID or FCM Keys

Note: this can directly impact your optin rate and/or push delivery. Only update these if you know what you are doing.



## OpenAPI

````yaml /api-reference/sites-openapi.json post /prod/site/{id}/keys/upsert
openapi: 3.1.0
info:
  title: sites
  version: '1.1'
servers:
  - url: https://api.aimtell.com
security:
  - sec0: []
paths:
  /prod/site/{id}/keys/upsert:
    post:
      tags:
        - Settings
      summary: Upsert Website Keys
      description: >-
        Update a Website's VAPID or FCM Keys


        Note: this can directly impact your optin rate and/or push delivery.
        Only update these if you know what you are doing.
      operationId: api-upsert-website-keys
      parameters:
        - name: id
          in: path
          description: Site ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - pub
                - priv
                - primary
                - type
              properties:
                pub:
                  type: string
                  description: Public ID (either VAPID ID or FCM ID)
                priv:
                  type: string
                  description: Private key attached to the public id
                primary:
                  type: string
                  description: 1 = primary, 0 = regular
                type:
                  type: string
                  description: Must use either "gcm" or "vapid" (without quotes)
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    result: success
                    message: Website Key added/updated successfully
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    result: error
                    message: 'Error #136.'
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Result:
                  value:
                    result: error
                    message: Please specify a valid auth_token.
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      name: X-Authorization-Api-Key
      in: header
      x-default: ''

````