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

# Upsert platform app credential

> Creates or updates an organization platform app credential. Secret values are accepted only in the request and are never returned.



## OpenAPI

````yaml /api/openapi.json post /v1/platform-app-credentials
openapi: 3.1.0
info:
  title: Kavenio API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://kavenio.com/terms
  description: Generated OpenAPI document for the stable Kavenio public API.
servers:
  - url: https://api.kavenio.com
security:
  - bearerAuth: []
tags:
  - name: API keys
    description: Manage Kavenio API keys for the authenticated user.
  - name: Integrations
    description: Connect automation clients and manage workflow subscriptions.
  - name: Feature requests
    description: Submit feature requests from authenticated users.
  - name: Posts
    description: Create, schedule, update, and manage post lifecycle actions.
  - name: Queue
    description: Manage reusable post queue schedules and preview slots.
  - name: Media
    description: Upload, presign, and validate media assets.
  - name: Validation
    description: Validate post payloads and platform content length limits.
  - name: Connect
    description: Start and complete account connection flows.
  - name: Accounts
    description: Manage connected social accounts and account health.
  - name: Telegram
    description: Manage Telegram-specific connected account settings.
  - name: Discord
    description: Manage Discord messages, roles, pins, events, and settings.
  - name: Google Business
    description: Manage Google Business locations, reviews, and helpers.
  - name: Ads
    description: Create, read, cancel, and inspect advertising resources.
  - name: Ad audiences
    description: Manage advertising audiences and audience members.
  - name: Ad catalogs
    description: Inspect advertising catalogs and product sets.
  - name: Ad targeting
    description: Search targeting entities and estimate audience reach.
  - name: Ad conversions
    description: Manage conversion destinations and send conversion events.
  - name: Ad leads
    description: Manage lead forms and retrieve advertising leads.
  - name: Tracking tags
    description: Manage Meta tracking tags and tag sharing.
  - name: Platform credentials
    description: Manage organization platform app credentials.
  - name: Analytics
    description: Read provider analytics and operational inbox data.
  - name: WhatsApp conversions
    description: Read and send WhatsApp conversion events.
  - name: Activity
    description: Read operational activity events.
  - name: Webhooks
    description: Manage webhook endpoints and delivery logs.
paths:
  /v1/platform-app-credentials:
    post:
      tags:
        - Platform credentials
      summary: Upsert platform app credential
      description: >-
        Creates or updates an organization platform app credential. Secret
        values are accepted only in the request and are never returned.
      operationId: upsertPlatformAppCredential
      requestBody:
        required: true
        content:
          application/json:
            example:
              platform: linkedin
              displayName: Production LinkedIn app
              values:
                clientId: linkedin_client_id_example
                clientSecret: linkedin_client_secret_redacted
            schema:
              type: object
              properties:
                platform:
                  type: string
                  enum:
                    - twitter
                    - facebook
                    - instagram
                    - linkedin
                    - tiktok
                    - youtube
                    - threads
                    - reddit
                    - pinterest
                    - bluesky
                    - mastodon
                    - googlebusiness
                    - telegram
                    - snapchat
                    - discord
                    - whatsapp
                    - metaads
                    - googleads
                    - tiktokads
                    - linkedinads
                    - pinterestads
                    - xads
                credentialFamily:
                  type: string
                  enum:
                    - x
                    - linkedin
                    - pinterest
                    - reddit
                    - meta
                    - threads
                    - tiktok
                    - google_ads
                    - google_business
                    - youtube
                    - x_ads
                    - bluesky
                    - mastodon
                    - telegram
                    - discord
                displayName:
                  type: string
                  minLength: 1
                  maxLength: 256
                availability:
                  type: string
                  enum:
                    - internal
                    - production
                values:
                  type: object
                  propertyNames:
                    type: string
                    minLength: 1
                  additionalProperties:
                    type: string
                    minLength: 1
                    maxLength: 8192
                metadata:
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
              required:
                - platform
                - values
              additionalProperties: false
      responses:
        '201':
          description: Upsert platform app credential completed.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      ok:
                        type: boolean
                        x-kavenio-const: true
                      data:
                        type: object
                        properties:
                          id:
                            type: string
                            minLength: 16
                            maxLength: 16
                            pattern: >-
                              ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                          scope:
                            type: string
                            enum:
                              - system
                              - organization
                          organizationId:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: 'null'
                          platform:
                            type: string
                            enum:
                              - twitter
                              - facebook
                              - instagram
                              - linkedin
                              - tiktok
                              - youtube
                              - threads
                              - reddit
                              - pinterest
                              - bluesky
                              - mastodon
                              - googlebusiness
                              - telegram
                              - snapchat
                              - discord
                              - whatsapp
                              - metaads
                              - googleads
                              - tiktokads
                              - linkedinads
                              - pinterestads
                              - xads
                          credentialFamily:
                            type: string
                            enum:
                              - x
                              - linkedin
                              - pinterest
                              - reddit
                              - meta
                              - threads
                              - tiktok
                              - google_ads
                              - google_business
                              - youtube
                              - x_ads
                              - bluesky
                              - mastodon
                              - telegram
                              - discord
                          credentialType:
                            type: string
                            enum:
                              - oauth_client
                              - token_app
                              - developer_token
                              - not_required
                          label:
                            type: string
                            minLength: 1
                          status:
                            type: string
                            enum:
                              - missing
                              - not_required
                              - untested
                              - verified
                              - invalid
                              - disabled
                              - needs_oauth_test
                              - test_failed
                          availability:
                            default: production
                            type: string
                            enum:
                              - internal
                              - production
                          displayName:
                            type: string
                            minLength: 1
                            maxLength: 256
                          appIdentifierSuffix:
                            type: string
                            minLength: 1
                            maxLength: 32
                          metadata:
                            default: {}
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties: {}
                          lastTestedAt:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: 'null'
                          lastError:
                            anyOf:
                              - type: string
                                minLength: 1
                                maxLength: 512
                              - type: 'null'
                          verifiedAt:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: 'null'
                          version:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          createdBy:
                            type: string
                            minLength: 1
                          updatedBy:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: 'null'
                          createdAt:
                            type: string
                            minLength: 1
                          updatedAt:
                            type: string
                            minLength: 1
                        required:
                          - id
                          - scope
                          - organizationId
                          - platform
                          - credentialFamily
                          - credentialType
                          - label
                          - status
                          - availability
                          - metadata
                          - lastTestedAt
                          - lastError
                          - verifiedAt
                          - version
                          - createdBy
                          - updatedBy
                          - createdAt
                          - updatedAt
                        additionalProperties: false
                    required:
                      - ok
                      - data
                    additionalProperties: false
                  - type: object
                    properties:
                      ok:
                        type: boolean
                        x-kavenio-const: false
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            minLength: 1
                          message:
                            type: string
                            minLength: 1
                          details: {}
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - ok
                      - error
                    additionalProperties: false
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
        '500':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Clerk session or OAuth token

````