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

# Webhook SalesForce (Change Data Capture)

> Recebe notificações de criação/atualização da Carta de Serviços. Valida assinatura HMAC-SHA256 via header X-Salesforce-Signature.



## OpenAPI

````yaml https://raw.githubusercontent.com/prefeitura-rio/app-catalogo/refs/heads/main/docs/openapi-v3.json post /api/webhooks/salesforce
openapi: 3.0.0
info:
  description: >-
    Discovery layer unificada da Prefeitura do Rio de Janeiro. Indexa serviços
    públicos, cursos, vagas e oportunidades MEI com busca full-text e
    recomendação personalizada por perfil de cidadão.
  title: app-catalogo
  contact:
    name: Prefeitura do Rio de Janeiro
    url: https://github.com/prefeitura-rio/app-catalogo
  version: '1.0'
servers:
  - url: https://services.staging.app.dados.rio/catalogo
    description: Staging
  - url: https://services.pref.rio/catalogo
    description: Produção
security: []
paths:
  /api/webhooks/salesforce:
    post:
      tags:
        - webhooks
      summary: Webhook SalesForce (Change Data Capture)
      description: >-
        Recebe notificações de criação/atualização da Carta de Serviços. Valida
        assinatura HMAC-SHA256 via header X-Salesforce-Signature.
      parameters:
        - description: HMAC-SHA256 do body em hex
          name: X-Salesforce-Signature
          in: header
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1.sfWebhookPayload'
        description: Payload do evento
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
components:
  schemas:
    v1.sfWebhookPayload:
      type: object
      properties:
        event:
          type: object
          properties:
            created:
              type: string
            type:
              type: string
        sobject:
          type: object
          properties:
            Id:
              type: string
            type:
              type: string

````